From 2d236822ddba58f5546531816a6a0e4d75a6a438 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 27 Feb 2024 17:09:21 +0000 Subject: [PATCH] chore(release): 1.10.2 [skip ci] ## [1.10.2](https://github.com/kunalnagarco/action-cve/compare/v1.10.1...v1.10.2) (2024-02-27) ### Chores * **deps:** update dependency swiper to v11.0.7 ([9251552](https://github.com/kunalnagarco/action-cve/commit/925155259a1c317442ff20c4a94667ececf36b75)) --- CHANGELOG.md | 7 +++++++ dist/index.js | 6 +++--- dist/index.js.map | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25a3c132..1787e27c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.10.2](https://github.com/kunalnagarco/action-cve/compare/v1.10.1...v1.10.2) (2024-02-27) + + +### Chores + +* **deps:** update dependency swiper to v11.0.7 ([9251552](https://github.com/kunalnagarco/action-cve/commit/925155259a1c317442ff20c4a94667ececf36b75)) + ## [1.10.1](https://github.com/kunalnagarco/action-cve/compare/v1.10.0...v1.10.1) (2024-02-26) diff --git a/dist/index.js b/dist/index.js index 0d111149..809852cd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -77222,7 +77222,7 @@ function loopFix(_temp) { if (byMousewheel) { swiper.setTranslate(swiper.translate - diff); } else { - swiper.slideTo(activeIndex + slidesPrepended, 0, false, true); + swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true); if (setTranslate) { swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff; swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff; @@ -79113,7 +79113,7 @@ Swiper.use([Resize, Observer]); ;// CONCATENATED MODULE: ./node_modules/swiper/swiper.mjs /** - * Swiper 11.0.6 + * Swiper 11.0.7 * Most modern mobile touch slider and framework with hardware accelerated transitions * https://swiperjs.com * @@ -79121,7 +79121,7 @@ Swiper.use([Resize, Observer]); * * Released under the MIT License * - * Released on: February 5, 2024 + * Released on: February 27, 2024 */ diff --git a/dist/index.js.map b/dist/index.js.map index 0534ed42..756b07ab 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7tBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACl4PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5nBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACx9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3OA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACplBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChMA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACr0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1uEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5lBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnmEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACj7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9iCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACroBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrRA;;;;;;;;ACAA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AClwIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACNA;AACA;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":[".././lib/constants.js",".././lib/destinations/email.js",".././lib/destinations/index.js",".././lib/destinations/microsoft-teams.js",".././lib/destinations/pager-duty.js",".././lib/destinations/slack.js",".././lib/destinations/zenduty.js",".././lib/entities/advisory.js",".././lib/entities/alert.js",".././lib/entities/index.js",".././lib/entities/repository.js",".././lib/entities/vulnerability.js",".././lib/fetch-alerts.js",".././lib/utils/adaptive-card/index.js",".././lib/utils/index.js",".././lib/utils/request/index.js",".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/github/lib/context.js",".././node_modules/@actions/github/lib/github.js",".././node_modules/@actions/github/lib/internal/utils.js",".././node_modules/@actions/github/lib/utils.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/@octokit/auth-token/dist-node/index.js",".././node_modules/@octokit/core/dist-node/index.js",".././node_modules/@octokit/endpoint/dist-node/index.js",".././node_modules/@octokit/graphql/dist-node/index.js",".././node_modules/@octokit/plugin-paginate-rest/dist-node/index.js",".././node_modules/@octokit/plugin-request-log/dist-node/index.js",".././node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js",".././node_modules/@octokit/request-error/dist-node/index.js",".././node_modules/@octokit/request/dist-node/index.js",".././node_modules/@octokit/rest/dist-node/index.js",".././node_modules/@pagerduty/pdjs/build/src/api.js",".././node_modules/@pagerduty/pdjs/build/src/common.js",".././node_modules/@pagerduty/pdjs/build/src/events.js",".././node_modules/@pagerduty/pdjs/build/src/index.js",".././node_modules/@slack/webhook/dist/IncomingWebhook.js",".././node_modules/@slack/webhook/dist/errors.js",".././node_modules/@slack/webhook/dist/index.js",".././node_modules/@slack/webhook/dist/instrument.js",".././node_modules/adaptivecards/lib/activity-request.js",".././node_modules/adaptivecards/lib/adaptive-applet.js",".././node_modules/adaptivecards/lib/adaptivecards.js",".././node_modules/adaptivecards/lib/card-elements.js",".././node_modules/adaptivecards/lib/card-object.js",".././node_modules/adaptivecards/lib/carousel.js",".././node_modules/adaptivecards/lib/channel-adapter.js",".././node_modules/adaptivecards/lib/controls/collection.js",".././node_modules/adaptivecards/lib/controls/constants.js",".././node_modules/adaptivecards/lib/controls/index.js",".././node_modules/adaptivecards/lib/controls/menu-item.js",".././node_modules/adaptivecards/lib/controls/popup-control.js",".././node_modules/adaptivecards/lib/controls/popup-menu.js",".././node_modules/adaptivecards/lib/enums.js",".././node_modules/adaptivecards/lib/host-capabilities.js",".././node_modules/adaptivecards/lib/host-config.js",".././node_modules/adaptivecards/lib/registry.js",".././node_modules/adaptivecards/lib/serialization.js",".././node_modules/adaptivecards/lib/shared.js",".././node_modules/adaptivecards/lib/strings.js",".././node_modules/adaptivecards/lib/table.js",".././node_modules/adaptivecards/lib/text-formatters.js",".././node_modules/adaptivecards/lib/utils.js",".././node_modules/asynckit/index.js",".././node_modules/asynckit/lib/abort.js",".././node_modules/asynckit/lib/async.js",".././node_modules/asynckit/lib/defer.js",".././node_modules/asynckit/lib/iterate.js",".././node_modules/asynckit/lib/state.js",".././node_modules/asynckit/lib/terminator.js",".././node_modules/asynckit/parallel.js",".././node_modules/asynckit/serial.js",".././node_modules/asynckit/serialOrdered.js",".././node_modules/before-after-hook/index.js",".././node_modules/before-after-hook/lib/add.js",".././node_modules/before-after-hook/lib/register.js",".././node_modules/before-after-hook/lib/remove.js",".././node_modules/browser-or-node/lib/index.js",".././node_modules/combined-stream/lib/combined_stream.js",".././node_modules/cross-fetch/dist/node-ponyfill.js",".././node_modules/debug/node_modules/ms/index.js",".././node_modules/debug/src/browser.js",".././node_modules/debug/src/common.js",".././node_modules/debug/src/index.js",".././node_modules/debug/src/node.js",".././node_modules/delayed-stream/lib/delayed_stream.js",".././node_modules/deprecation/dist-node/index.js",".././node_modules/encoding/lib/encoding.js",".././node_modules/follow-redirects/debug.js",".././node_modules/follow-redirects/index.js",".././node_modules/form-data/lib/form_data.js",".././node_modules/form-data/lib/populate.js",".././node_modules/has-flag/index.js",".././node_modules/iconv-lite/encodings/dbcs-codec.js",".././node_modules/iconv-lite/encodings/dbcs-data.js",".././node_modules/iconv-lite/encodings/index.js",".././node_modules/iconv-lite/encodings/internal.js",".././node_modules/iconv-lite/encodings/sbcs-codec.js",".././node_modules/iconv-lite/encodings/sbcs-data-generated.js",".././node_modules/iconv-lite/encodings/sbcs-data.js",".././node_modules/iconv-lite/encodings/utf16.js",".././node_modules/iconv-lite/encodings/utf32.js",".././node_modules/iconv-lite/encodings/utf7.js",".././node_modules/iconv-lite/lib/bom-handling.js",".././node_modules/iconv-lite/lib/index.js",".././node_modules/iconv-lite/lib/streams.js",".././node_modules/mime-db/index.js",".././node_modules/mime-types/index.js",".././node_modules/node-fetch/lib/index.js",".././node_modules/nodemailer/lib/addressparser/index.js",".././node_modules/nodemailer/lib/base64/index.js",".././node_modules/nodemailer/lib/dkim/index.js",".././node_modules/nodemailer/lib/dkim/message-parser.js",".././node_modules/nodemailer/lib/dkim/relaxed-body.js",".././node_modules/nodemailer/lib/dkim/sign.js",".././node_modules/nodemailer/lib/fetch/cookies.js",".././node_modules/nodemailer/lib/fetch/index.js",".././node_modules/nodemailer/lib/json-transport/index.js",".././node_modules/nodemailer/lib/mail-composer/index.js",".././node_modules/nodemailer/lib/mailer/index.js",".././node_modules/nodemailer/lib/mailer/mail-message.js",".././node_modules/nodemailer/lib/mime-funcs/index.js",".././node_modules/nodemailer/lib/mime-funcs/mime-types.js",".././node_modules/nodemailer/lib/mime-node/index.js",".././node_modules/nodemailer/lib/mime-node/last-newline.js",".././node_modules/nodemailer/lib/mime-node/le-unix.js",".././node_modules/nodemailer/lib/mime-node/le-windows.js",".././node_modules/nodemailer/lib/nodemailer.js",".././node_modules/nodemailer/lib/punycode/index.js",".././node_modules/nodemailer/lib/qp/index.js",".././node_modules/nodemailer/lib/sendmail-transport/index.js",".././node_modules/nodemailer/lib/ses-transport/index.js",".././node_modules/nodemailer/lib/shared/index.js",".././node_modules/nodemailer/lib/smtp-connection/data-stream.js",".././node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js",".././node_modules/nodemailer/lib/smtp-connection/index.js",".././node_modules/nodemailer/lib/smtp-pool/index.js",".././node_modules/nodemailer/lib/smtp-pool/pool-resource.js",".././node_modules/nodemailer/lib/smtp-transport/index.js",".././node_modules/nodemailer/lib/stream-transport/index.js",".././node_modules/nodemailer/lib/well-known/index.js",".././node_modules/nodemailer/lib/xoauth2/index.js",".././node_modules/once/once.js",".././node_modules/proxy-from-env/index.js",".././node_modules/safer-buffer/safer.js",".././node_modules/supports-color/index.js",".././node_modules/tr46/index.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/undici/index.js",".././node_modules/undici/lib/agent.js",".././node_modules/undici/lib/api/abort-signal.js",".././node_modules/undici/lib/api/api-connect.js",".././node_modules/undici/lib/api/api-pipeline.js",".././node_modules/undici/lib/api/api-request.js",".././node_modules/undici/lib/api/api-stream.js",".././node_modules/undici/lib/api/api-upgrade.js",".././node_modules/undici/lib/api/index.js",".././node_modules/undici/lib/api/readable.js",".././node_modules/undici/lib/api/util.js",".././node_modules/undici/lib/balanced-pool.js",".././node_modules/undici/lib/cache/cache.js",".././node_modules/undici/lib/cache/cachestorage.js",".././node_modules/undici/lib/cache/symbols.js",".././node_modules/undici/lib/cache/util.js",".././node_modules/undici/lib/client.js",".././node_modules/undici/lib/compat/dispatcher-weakref.js",".././node_modules/undici/lib/cookies/constants.js",".././node_modules/undici/lib/cookies/index.js",".././node_modules/undici/lib/cookies/parse.js",".././node_modules/undici/lib/cookies/util.js",".././node_modules/undici/lib/core/connect.js",".././node_modules/undici/lib/core/errors.js",".././node_modules/undici/lib/core/request.js",".././node_modules/undici/lib/core/symbols.js",".././node_modules/undici/lib/core/util.js",".././node_modules/undici/lib/dispatcher-base.js",".././node_modules/undici/lib/dispatcher.js",".././node_modules/undici/lib/fetch/body.js",".././node_modules/undici/lib/fetch/constants.js",".././node_modules/undici/lib/fetch/dataURL.js",".././node_modules/undici/lib/fetch/file.js",".././node_modules/undici/lib/fetch/formdata.js",".././node_modules/undici/lib/fetch/global.js",".././node_modules/undici/lib/fetch/headers.js",".././node_modules/undici/lib/fetch/index.js",".././node_modules/undici/lib/fetch/request.js",".././node_modules/undici/lib/fetch/response.js",".././node_modules/undici/lib/fetch/symbols.js",".././node_modules/undici/lib/fetch/util.js",".././node_modules/undici/lib/fetch/webidl.js",".././node_modules/undici/lib/fileapi/encoding.js",".././node_modules/undici/lib/fileapi/filereader.js",".././node_modules/undici/lib/fileapi/progressevent.js",".././node_modules/undici/lib/fileapi/symbols.js",".././node_modules/undici/lib/fileapi/util.js",".././node_modules/undici/lib/global.js",".././node_modules/undici/lib/handler/DecoratorHandler.js",".././node_modules/undici/lib/handler/RedirectHandler.js",".././node_modules/undici/lib/handler/RetryHandler.js",".././node_modules/undici/lib/interceptor/redirectInterceptor.js",".././node_modules/undici/lib/llhttp/constants.js",".././node_modules/undici/lib/llhttp/llhttp-wasm.js",".././node_modules/undici/lib/llhttp/llhttp_simd-wasm.js",".././node_modules/undici/lib/llhttp/utils.js",".././node_modules/undici/lib/mock/mock-agent.js",".././node_modules/undici/lib/mock/mock-client.js",".././node_modules/undici/lib/mock/mock-errors.js",".././node_modules/undici/lib/mock/mock-interceptor.js",".././node_modules/undici/lib/mock/mock-pool.js",".././node_modules/undici/lib/mock/mock-symbols.js",".././node_modules/undici/lib/mock/mock-utils.js",".././node_modules/undici/lib/mock/pending-interceptors-formatter.js",".././node_modules/undici/lib/mock/pluralizer.js",".././node_modules/undici/lib/node/fixed-queue.js",".././node_modules/undici/lib/pool-base.js",".././node_modules/undici/lib/pool-stats.js",".././node_modules/undici/lib/pool.js",".././node_modules/undici/lib/proxy-agent.js",".././node_modules/undici/lib/timers.js",".././node_modules/undici/lib/websocket/connection.js",".././node_modules/undici/lib/websocket/constants.js",".././node_modules/undici/lib/websocket/events.js",".././node_modules/undici/lib/websocket/frame.js",".././node_modules/undici/lib/websocket/receiver.js",".././node_modules/undici/lib/websocket/symbols.js",".././node_modules/undici/lib/websocket/util.js",".././node_modules/undici/lib/websocket/websocket.js",".././node_modules/universal-user-agent/dist-node/index.js",".././node_modules/uuid/dist/index.js",".././node_modules/uuid/dist/md5.js",".././node_modules/uuid/dist/nil.js",".././node_modules/uuid/dist/parse.js",".././node_modules/uuid/dist/regex.js",".././node_modules/uuid/dist/rng.js",".././node_modules/uuid/dist/sha1.js",".././node_modules/uuid/dist/stringify.js",".././node_modules/uuid/dist/v1.js",".././node_modules/uuid/dist/v3.js",".././node_modules/uuid/dist/v35.js",".././node_modules/uuid/dist/v4.js",".././node_modules/uuid/dist/v5.js",".././node_modules/uuid/dist/validate.js",".././node_modules/uuid/dist/version.js",".././node_modules/webidl-conversions/lib/index.js",".././node_modules/whatwg-url/lib/URL-impl.js",".././node_modules/whatwg-url/lib/URL.js",".././node_modules/whatwg-url/lib/public-api.js",".././node_modules/whatwg-url/lib/url-state-machine.js",".././node_modules/whatwg-url/lib/utils.js",".././node_modules/wrappy/wrappy.js","../external node-commonjs \"assert\"","../external node-commonjs \"async_hooks\"","../external node-commonjs \"buffer\"","../external node-commonjs \"child_process\"","../external node-commonjs \"console\"","../external node-commonjs \"crypto\"","../external node-commonjs \"diagnostics_channel\"","../external node-commonjs \"dns\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"http\"","../external node-commonjs \"http2\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"node:events\"","../external node-commonjs \"node:stream\"","../external node-commonjs \"node:util\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"perf_hooks\"","../external node-commonjs \"punycode\"","../external node-commonjs \"querystring\"","../external node-commonjs \"stream\"","../external node-commonjs \"stream/web\"","../external node-commonjs \"string_decoder\"","../external node-commonjs \"tls\"","../external node-commonjs \"tty\"","../external node-commonjs \"url\"","../external node-commonjs \"util\"","../external node-commonjs \"util/types\"","../external node-commonjs \"worker_threads\"","../external node-commonjs \"zlib\"",".././node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js",".././node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js",".././node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js",".././node_modules/@fastify/busboy/deps/streamsearch/sbmh.js",".././node_modules/@fastify/busboy/lib/main.js",".././node_modules/@fastify/busboy/lib/types/multipart.js",".././node_modules/@fastify/busboy/lib/types/urlencoded.js",".././node_modules/@fastify/busboy/lib/utils/Decoder.js",".././node_modules/@fastify/busboy/lib/utils/basename.js",".././node_modules/@fastify/busboy/lib/utils/decodeText.js",".././node_modules/@fastify/busboy/lib/utils/getLimit.js",".././node_modules/@fastify/busboy/lib/utils/parseParams.js",".././node_modules/axios/dist/node/axios.cjs",".././node_modules/swiper/shared/ssr-window.esm.mjs",".././node_modules/swiper/shared/utils.mjs",".././node_modules/swiper/shared/swiper-core.mjs",".././node_modules/swiper/swiper.mjs","../webpack/bootstrap","../webpack/runtime/define property getters","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/make namespace object","../webpack/runtime/compat",".././lib/main.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ACTION_URL = exports.ACTION_SHORT_SUMMARY = exports.ACTION_ICON = void 0;\nexports.ACTION_ICON = 'https://github.com/kunalnagarco/action-cve/raw/main/icons/ladybug.png';\nexports.ACTION_SHORT_SUMMARY = 'GitHub Action - @kunalnagarco/action-cve';\nexports.ACTION_URL = 'https://github.com/kunalnagarco/action-cve';\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToEmailSmtp = void 0;\nconst nodemailer_1 = require(\"nodemailer\");\nconst constants_1 = require(\"../constants\");\nconst entities_1 = require(\"../entities\");\nconst createTableRow = (alert) => `\n \n ${alert.packageName}\n ${alert.vulnerability?.vulnerableVersionRange}\n ${alert.vulnerability?.firstPatchedVersion}\n ${alert.advisory?.severity}\n ${alert.advisory?.summary}\n View\n \n `;\nconst createTable = (alerts) => {\n let rowData = '';\n alerts.forEach((alert) => {\n rowData += createTableRow(alert);\n });\n return `\n \n \n \n \n \n \n \n \n \n \n ${rowData}\n \n
Package nameVulnerability Version RangePatched VersionSeveritySummary
\n `;\n};\nconst createEmailBody = (alerts) => `\n

Hello,

\n

You are receiving this message as you have set up email notifications for vulnerabilities in ${(0, entities_1.getFullRepositoryNameFromAlert)(alerts[0])} via ${constants_1.ACTION_SHORT_SUMMARY}.

\n ${createTable(alerts)}\n `;\nconst sendAlertsToEmailSmtp = async (config, alerts, emailList, emailFrom, subject) => {\n const transporter = (0, nodemailer_1.createTransport)(config);\n await transporter.sendMail({\n from: emailFrom,\n bcc: emailList,\n subject: subject ||\n `${constants_1.ACTION_SHORT_SUMMARY} - ${alerts.length} vulnerabilities in ${(0, entities_1.getFullRepositoryNameFromAlert)(alerts[0])}`,\n html: createEmailBody(alerts),\n });\n};\nexports.sendAlertsToEmailSmtp = sendAlertsToEmailSmtp;\n//# sourceMappingURL=email.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./slack\"), exports);\n__exportStar(require(\"./pager-duty\"), exports);\n__exportStar(require(\"./zenduty\"), exports);\n__exportStar(require(\"./microsoft-teams\"), exports);\n__exportStar(require(\"./email\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToMicrosoftTeams = void 0;\nconst utils_1 = require(\"../utils\");\nconst constants_1 = require(\"../constants\");\nconst createTableRow = (key, value) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)(key, true));\n row.addColumn(keyColumn);\n const valueColumn = (0, utils_1.createColumn)();\n valueColumn.addItem((0, utils_1.createTextBlock)(value));\n row.addColumn(valueColumn);\n return row;\n};\nconst createTableButtonRow = (url) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)('Advisory URL', true));\n row.addColumn(keyColumn);\n const urlColumn = (0, utils_1.createColumn)();\n urlColumn.addItem((0, utils_1.createLinkButton)('View Advisory', url));\n row.addColumn(urlColumn);\n return row;\n};\nconst sendAlertsToMicrosoftTeams = async (webhookUrl, alerts) => {\n const alertCount = alerts.length;\n const repositoryOwner = alerts[0].repository.owner;\n const repositoryName = alerts[0].repository.name;\n const adaptiveCard = (0, utils_1.createAdaptiveCard)();\n adaptiveCard.addItem((0, utils_1.createTextBlock)(constants_1.ACTION_SHORT_SUMMARY));\n adaptiveCard.addItem((0, utils_1.createTextBlock)(`You have ${alertCount} vulnerabilities in ${repositoryOwner}/${repositoryName}`));\n alerts.forEach((alert) => {\n const container = (0, utils_1.createContainer)(true, true);\n container.addItem(createTableRow('Package Name', alert.packageName));\n container.addItem(createTableRow('Vulnerability Version Range', alert.vulnerability?.vulnerableVersionRange || ''));\n container.addItem(createTableRow('Patched Version', alert.vulnerability?.firstPatchedVersion || ''));\n container.addItem(createTableRow('Severity', alert.advisory?.severity || ''));\n container.addItem(createTableRow('Summary', alert.advisory?.summary || ''));\n container.addItem(createTableButtonRow(alert.advisory?.url || ''));\n adaptiveCard.addItem(container);\n });\n const body = {\n type: 'message',\n attachments: [\n {\n contentType: 'application/vnd.microsoft.card.adaptive',\n contentUrl: null,\n content: adaptiveCard.toJSON(),\n },\n ],\n };\n await (0, utils_1.request)(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n });\n};\nexports.sendAlertsToMicrosoftTeams = sendAlertsToMicrosoftTeams;\n//# sourceMappingURL=microsoft-teams.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToPagerDuty = void 0;\nconst pdjs_1 = require(\"@pagerduty/pdjs\");\nconst constants_1 = require(\"../constants\");\nconst sendAlertsToPagerDuty = async (integrationKey, alerts) => {\n await (0, pdjs_1.event)({\n data: {\n routing_key: integrationKey,\n event_action: 'trigger',\n payload: {\n summary: `You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}`,\n source: 'GitHub Dependabot Alerts',\n severity: 'info',\n custom_details: { ...alerts },\n },\n images: [\n {\n src: constants_1.ACTION_ICON,\n alt: constants_1.ACTION_SHORT_SUMMARY,\n href: constants_1.ACTION_URL,\n },\n ],\n },\n });\n};\nexports.sendAlertsToPagerDuty = sendAlertsToPagerDuty;\n//# sourceMappingURL=pager-duty.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToSlack = exports.validateSlackWebhookUrl = exports.MAX_COUNT_SLACK = void 0;\nconst webhook_1 = require(\"@slack/webhook\");\nconst constants_1 = require(\"../constants\");\nexports.MAX_COUNT_SLACK = 30;\nconst createMaxAlertsMarkdownNotice = () => `*Note:* Only ${exports.MAX_COUNT_SLACK} have been sent due to message length restrictions.`;\nconst createSummaryBlock = (alertCount, repositoryName, repositoryOwner) => ({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `\n You have ${alertCount} vulnerabilities in *${repositoryOwner}/${repositoryName}*.\n${alertCount > exports.MAX_COUNT_SLACK ? createMaxAlertsMarkdownNotice() : ''}\n `,\n },\n});\nconst createDividerBlock = () => ({\n type: 'divider',\n});\nconst createAlertBlock = (alert) => ({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `\n*Package name:* ${alert.packageName}\n*Vulnerability Version Range:* ${alert.vulnerability?.vulnerableVersionRange}\n*Patched Version:* ${alert.vulnerability?.firstPatchedVersion}\n*Severity:* ${alert.advisory?.severity}\n*Summary:* ${alert.advisory?.summary}\n `,\n },\n accessory: {\n type: 'button',\n text: {\n type: 'plain_text',\n text: 'View Advisory',\n emoji: true,\n },\n style: 'danger',\n url: alert.advisory?.url,\n },\n});\nconst validateSlackWebhookUrl = (url) => {\n const regexPattern = /^https:\\/\\/hooks\\.slack\\.com\\/services\\/T[a-zA-Z0-9_]{8,10}\\/B[a-zA-Z0-9_]{10}\\/[a-zA-Z0-9_]{24}/;\n return regexPattern.test(url);\n};\nexports.validateSlackWebhookUrl = validateSlackWebhookUrl;\nconst sendAlertsToSlack = async (webhookUrl, alerts) => {\n const webhook = new webhook_1.IncomingWebhook(webhookUrl);\n const alertBlocks = [];\n alerts.forEach((alert) => {\n alertBlocks.push(createAlertBlock(alert));\n });\n await webhook.send({\n blocks: [\n createSummaryBlock(alerts.length, alerts[0].repository.name, alerts[0].repository.owner),\n createDividerBlock(),\n ...alertBlocks,\n ],\n icon_url: constants_1.ACTION_ICON,\n username: constants_1.ACTION_SHORT_SUMMARY,\n });\n};\nexports.sendAlertsToSlack = sendAlertsToSlack;\n//# sourceMappingURL=slack.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToZenduty = void 0;\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\nconst sendAlertsToZenduty = async (apiKey, serviceId, escalationPolicyId, alerts) => {\n let summary = `\n You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}\n\n ---\n\n `;\n alerts.forEach((alert) => {\n summary += `\n Package name: ${alert.packageName}\n Vulnerability Version Range: ${alert.vulnerability?.vulnerableVersionRange}\n Patched Version: ${alert.vulnerability?.firstPatchedVersion}\n Severity: ${alert.advisory?.severity}\n Summary: ${alert.advisory?.summary}\n `;\n });\n summary += `\n\n ---\n `;\n const payload = {\n service: serviceId,\n escalation_policy: escalationPolicyId,\n title: `${constants_1.ACTION_SHORT_SUMMARY} - ${alerts[0].repository.name}`,\n urgency: 0,\n summary,\n };\n const bearer = `Token ${apiKey}`;\n await (0, utils_1.request)('https://www.zenduty.com/api/incidents/', {\n method: 'POST',\n headers: {\n Authorization: bearer,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n};\nexports.sendAlertsToZenduty = sendAlertsToZenduty;\n//# sourceMappingURL=zenduty.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAdvisory = void 0;\nconst toAdvisory = (securityAdvisory) => ({\n cvssScore: securityAdvisory.cvss?.score || 0,\n severity: securityAdvisory.severity?.toUpperCase() || 'LOW',\n summary: securityAdvisory.summary,\n description: securityAdvisory.description || '',\n url: securityAdvisory.references[0].url,\n publishedAt: securityAdvisory.published_at || '',\n updatedAt: securityAdvisory.updated_at || '',\n withdrawnAt: securityAdvisory.withdrawn_at || '',\n});\nexports.toAdvisory = toAdvisory;\n//# sourceMappingURL=advisory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isActiveAlert = exports.toAlert = void 0;\nconst advisory_1 = require(\"./advisory\");\nconst vulnerability_1 = require(\"./vulnerability\");\nconst toAlert = (dependabotAlert, repositoryName, repositoryOwner) => ({\n repository: {\n name: repositoryName,\n owner: repositoryOwner,\n },\n packageName: dependabotAlert.security_vulnerability.package.name || '',\n advisory: dependabotAlert.security_advisory\n ? (0, advisory_1.toAdvisory)(dependabotAlert.security_advisory)\n : undefined,\n vulnerability: dependabotAlert.security_vulnerability\n ? (0, vulnerability_1.toVulnerability)(dependabotAlert.security_vulnerability)\n : undefined,\n createdAt: dependabotAlert.created_at,\n});\nexports.toAlert = toAlert;\nconst isActiveAlert = (dependabotAlert) => {\n if (dependabotAlert.dismissed_at === null &&\n dependabotAlert.fixed_at === null) {\n return true;\n }\n return false;\n};\nexports.isActiveAlert = isActiveAlert;\n//# sourceMappingURL=alert.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./repository\"), exports);\n__exportStar(require(\"./advisory\"), exports);\n__exportStar(require(\"./alert\"), exports);\n__exportStar(require(\"./vulnerability\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFullRepositoryNameFromAlert = void 0;\nconst getFullRepositoryNameFromAlert = (alert) => `${alert.repository.owner}/${alert.repository.name}`;\nexports.getFullRepositoryNameFromAlert = getFullRepositoryNameFromAlert;\n//# sourceMappingURL=repository.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toVulnerability = void 0;\nconst toVulnerability = (securityVulnerability) => ({\n firstPatchedVersion: securityVulnerability.first_patched_version?.identifier,\n vulnerableVersionRange: securityVulnerability.vulnerable_version_range,\n});\nexports.toVulnerability = toVulnerability;\n//# sourceMappingURL=vulnerability.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAlerts = void 0;\nconst rest_1 = require(\"@octokit/rest\");\nconst entities_1 = require(\"./entities\");\nconst fetchAlerts = async (gitHubPersonalAccessToken, repositoryName, repositoryOwner, severity, count) => {\n const octokit = new rest_1.Octokit({\n auth: gitHubPersonalAccessToken,\n request: {\n fetch,\n },\n });\n const response = await octokit.dependabot.listAlertsForRepo({\n owner: repositoryOwner,\n repo: repositoryName,\n severity,\n per_page: count,\n });\n const alerts = response.data\n .filter((dependabotAlert) => (0, entities_1.isActiveAlert)(dependabotAlert))\n .map((dependabotAlert) => (0, entities_1.toAlert)(dependabotAlert, repositoryName, repositoryOwner));\n return alerts;\n};\nexports.fetchAlerts = fetchAlerts;\n//# sourceMappingURL=fetch-alerts.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAdaptiveCard = exports.createLinkButton = exports.createColumn = exports.createTextBlock = exports.createRow = exports.createContainer = void 0;\nconst adaptivecards_1 = require(\"adaptivecards\");\nconst createContainer = (isSpacingLarge, isStyleEmphasis) => {\n const container = new adaptivecards_1.Container();\n if (isSpacingLarge) {\n container.spacing = adaptivecards_1.Spacing.Large;\n }\n if (isStyleEmphasis) {\n container.style = 'emphasis';\n }\n return container;\n};\nexports.createContainer = createContainer;\nconst createRow = () => {\n return new adaptivecards_1.ColumnSet();\n};\nexports.createRow = createRow;\nconst createTextBlock = (text, isBold = false, isWrap = true) => {\n const textBlock = new adaptivecards_1.TextBlock(text);\n if (isBold) {\n textBlock.weight = adaptivecards_1.TextWeight.Bolder;\n }\n textBlock.wrap = isWrap;\n return textBlock;\n};\nexports.createTextBlock = createTextBlock;\nconst createColumn = () => {\n return new adaptivecards_1.Column();\n};\nexports.createColumn = createColumn;\nconst createLinkButton = (text, url) => {\n const linkButton = new adaptivecards_1.ActionSet();\n const action = new adaptivecards_1.OpenUrlAction();\n action.title = text;\n action.url = url;\n linkButton.addAction(action);\n return linkButton;\n};\nexports.createLinkButton = createLinkButton;\nconst createAdaptiveCard = () => {\n const adaptiveCard = new adaptivecards_1.AdaptiveCard();\n adaptiveCard.version = new adaptivecards_1.Version(1, 2);\n return adaptiveCard;\n};\nexports.createAdaptiveCard = createAdaptiveCard;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./request\"), exports);\n__exportStar(require(\"./adaptive-card\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\nconst request = async (url, options) => fetch(url, {\n ...options,\n});\nexports.request = request;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nclass Context {\n /**\n * Hydrate the context from the environment\n */\n constructor() {\n var _a, _b, _c;\n this.payload = {};\n if (process.env.GITHUB_EVENT_PATH) {\n if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {\n this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));\n }\n else {\n const path = process.env.GITHUB_EVENT_PATH;\n process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);\n }\n }\n this.eventName = process.env.GITHUB_EVENT_NAME;\n this.sha = process.env.GITHUB_SHA;\n this.ref = process.env.GITHUB_REF;\n this.workflow = process.env.GITHUB_WORKFLOW;\n this.action = process.env.GITHUB_ACTION;\n this.actor = process.env.GITHUB_ACTOR;\n this.job = process.env.GITHUB_JOB;\n this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);\n this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);\n this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;\n this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;\n this.graphqlUrl =\n (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;\n }\n get issue() {\n const payload = this.payload;\n return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });\n }\n get repo() {\n if (process.env.GITHUB_REPOSITORY) {\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');\n return { owner, repo };\n }\n if (this.payload.repository) {\n return {\n owner: this.payload.repository.owner.login,\n repo: this.payload.repository.name\n };\n }\n throw new Error(\"context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'\");\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokit = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst utils_1 = require(\"./utils\");\nexports.context = new Context.Context();\n/**\n * Returns a hydrated octokit ready to use for GitHub Actions\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokit(token, options, ...additionalPlugins) {\n const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);\n return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options));\n}\nexports.getOctokit = getOctokit;\n//# sourceMappingURL=github.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0;\nconst httpClient = __importStar(require(\"@actions/http-client\"));\nconst undici_1 = require(\"undici\");\nfunction getAuthString(token, options) {\n if (!token && !options.auth) {\n throw new Error('Parameter token or opts.auth is required');\n }\n else if (token && options.auth) {\n throw new Error('Parameters token and opts.auth may not both be specified');\n }\n return typeof options.auth === 'string' ? options.auth : `token ${token}`;\n}\nexports.getAuthString = getAuthString;\nfunction getProxyAgent(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgent(destinationUrl);\n}\nexports.getProxyAgent = getProxyAgent;\nfunction getProxyAgentDispatcher(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgentDispatcher(destinationUrl);\n}\nexports.getProxyAgentDispatcher = getProxyAgentDispatcher;\nfunction getProxyFetch(destinationUrl) {\n const httpDispatcher = getProxyAgentDispatcher(destinationUrl);\n const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () {\n return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));\n });\n return proxyFetch;\n}\nexports.getProxyFetch = getProxyFetch;\nfunction getApiBaseUrl() {\n return process.env['GITHUB_API_URL'] || 'https://api.github.com';\n}\nexports.getApiBaseUrl = getApiBaseUrl;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst Utils = __importStar(require(\"./internal/utils\"));\n// octokit + plugins\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst plugin_paginate_rest_1 = require(\"@octokit/plugin-paginate-rest\");\nexports.context = new Context.Context();\nconst baseUrl = Utils.getApiBaseUrl();\nexports.defaults = {\n baseUrl,\n request: {\n agent: Utils.getProxyAgent(baseUrl),\n fetch: Utils.getProxyFetch(baseUrl)\n }\n};\nexports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);\n/**\n * Convience function to correctly format Octokit Options to pass into the constructor.\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokitOptions(token, options) {\n const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller\n // Auth\n const auth = Utils.getAuthString(token, opts);\n if (auth) {\n opts.auth = auth;\n }\n return opts;\n}\nexports.getOctokitOptions = getOctokitOptions;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nconst undici_1 = require(\"undici\");\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (exports.Headers = Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return;\n }\n return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {\n token: `${proxyUrl.username}:${proxyUrl.password}`\n })));\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.1.0\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: consoleWarn,\n error: consoleError\n },\n options.log\n );\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.4\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/util/merge-deep.js\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.0.2\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.2.0\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n requestLog: () => requestLog\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"4.0.0\";\n\n// pkg/dist-src/index.js\nfunction requestLog(octokit) {\n octokit.hook.wrap(\"request\", (request, options) => {\n octokit.log.debug(\"request\", options);\n const start = Date.now();\n const requestOptions = octokit.request.endpoint.parse(options);\n const path = requestOptions.url.replace(options.baseUrl, \"\");\n return request(options).then((response) => {\n octokit.log.info(\n `${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`\n );\n return response;\n }).catch((error) => {\n octokit.log.info(\n `${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`\n );\n throw error;\n });\n });\n}\nrequestLog.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n requestLog\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.0\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n / .*$/,\n \" [REDACTED]\"\n )\n });\n }\n requestCopy.url = requestCopy.url.replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\").replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"\n )\n );\n return statusCode;\n }\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"\n )\n );\n return headers || {};\n }\n });\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestError\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.2.0\";\n\n// pkg/dist-src/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n signal: (_c = requestOptions.request) == null ? void 0 : _c.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n let suffix;\n if (\"documentation_url\" in data) {\n suffix = ` - ${data.documentation_url}`;\n } else {\n suffix = \"\";\n }\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}${suffix}`;\n }\n return `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_core = require(\"@octokit/core\");\nvar import_plugin_request_log = require(\"@octokit/plugin-request-log\");\nvar import_plugin_paginate_rest = require(\"@octokit/plugin-paginate-rest\");\nvar import_plugin_rest_endpoint_methods = require(\"@octokit/plugin-rest-endpoint-methods\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"20.0.2\";\n\n// pkg/dist-src/index.js\nvar Octokit = import_core.Octokit.plugin(\n import_plugin_request_log.requestLog,\n import_plugin_rest_endpoint_methods.legacyRestEndpointMethods,\n import_plugin_paginate_rest.paginateRest\n).defaults({\n userAgent: `octokit-rest.js/${VERSION}`\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.api = void 0;\nconst common_1 = require(\"./common\");\nfunction api(apiParameters) {\n var _a;\n // If the apiParameters don't include `endpoint` treat it as a partial\n // application.\n if (!apiParameters.endpoint && !apiParameters.url) {\n return partialCall(apiParameters);\n }\n const types = {\n bearer: 'Bearer ',\n token: 'Token token=',\n };\n const { endpoint, server = 'api.pagerduty.com', token, tokenType = apiParameters.tokenType || 'token', url, version = 2, data, ...rest } = apiParameters;\n const config = {\n method: 'GET',\n ...rest,\n headers: {\n Accept: `application/vnd.pagerduty+json;version=${version}`,\n Authorization: `${types[tokenType]}${token}`,\n ...rest.headers,\n },\n };\n // Allow `data` for `queryParameters` for requests without bodies.\n if (isReadonlyRequest(config.method) && data) {\n config.queryParameters =\n (_a = config.queryParameters) !== null && _a !== void 0 ? _a : data;\n }\n else {\n config.body = JSON.stringify(data);\n }\n return apiRequest(url !== null && url !== void 0 ? url : `https://${server}/${endpoint.replace(/^\\/+/, '')}`, config);\n}\nexports.api = api;\nfunction apiRequest(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n apiResponse.response = response;\n if (response.status === 204) {\n return Promise.resolve(apiResponse);\n }\n return response\n .json()\n .then((data) => {\n const resource = resourceKey(url, options.method);\n apiResponse.next = nextFunc(url, options, data);\n apiResponse.data = data;\n apiResponse.resource = resource ? data[resource] : null;\n return apiResponse;\n })\n .catch(() => Promise.reject(apiResponse));\n });\n}\nfunction resourceKey(url, method) {\n const resource = url.match(/.+.com\\/(?[\\w]+)/);\n if (resource) {\n const resourceName = resource[1];\n if (method && method.toLowerCase() === 'get') {\n return resourceName;\n }\n if (resourceName.endsWith('ies')) {\n return resourceName.slice(0, -3) + 'y';\n }\n else if (resourceName.endsWith('s')) {\n return resourceName.slice(0, -1);\n }\n return resourceName;\n }\n return null;\n}\nfunction isReadonlyRequest(method) {\n var _a;\n return !['PUT', 'POST', 'DELETE', 'PATCH'].includes((_a = method.toUpperCase()) !== null && _a !== void 0 ? _a : 'GET');\n}\nfunction isOffsetPagination(data) {\n if (data.offset !== undefined) {\n return true;\n }\n return false;\n}\nfunction isCursorPagination(data) {\n if (data.cursor !== undefined) {\n return true;\n }\n return false;\n}\nfunction nextFunc(url, options, data) {\n if (isOffsetPagination(data)) {\n if ((data === null || data === void 0 ? void 0 : data.more) && typeof data.offset !== undefined && data.limit) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n limit: data.limit.toString(),\n offset: (data.limit + data.offset).toString(),\n },\n });\n }\n }\n else if (isCursorPagination(data)) {\n if (data === null || data === void 0 ? void 0 : data.cursor) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n cursor: data.cursor,\n limit: data.limit.toString(),\n },\n });\n }\n }\n return undefined;\n}\nfunction partialCall(apiParameters) {\n const partialParameters = apiParameters;\n const partial = ((apiParameters) => api({ ...partialParameters, ...apiParameters }));\n const shorthand = (method) => (endpoint, shorthandParameters) => api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n });\n partial.get = shorthand('get');\n partial.post = shorthand('post');\n partial.put = shorthand('put');\n partial.patch = shorthand('patch');\n partial.delete = shorthand('delete');\n partial.all = (endpoint, shorthandParameters) => {\n function allInner(responses) {\n const response = responses[responses.length - 1];\n if (!response.next) {\n // Base case, resolve and return all responses.\n return Promise.resolve(responses);\n }\n // If there are still more resources to get then concat and repeat.\n return response\n .next()\n .then(response => allInner(responses.concat([response])));\n }\n function repackResponses(responses) {\n // Repack the responses object to make it more user friendly.\n const repackedResponse = responses.shift(); // Use the first response to build the standard response object\n repackedResponse.data = [repackedResponse.data];\n responses.forEach(response => {\n repackedResponse.data = repackedResponse.data.concat(response.data);\n repackedResponse.resource = repackedResponse.resource.concat(response.resource);\n });\n return Promise.resolve(repackedResponse);\n }\n const method = 'get';\n return api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n })\n .then(response => allInner([response]))\n .then(responses => repackResponses(responses));\n };\n return partial;\n}\n//# sourceMappingURL=api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\n/* LEGACY-BROWSER-SUPPORT-START */\nconst cross_fetch_1 = require(\"cross-fetch\");\nconst browser_or_node_1 = require(\"browser-or-node\");\n/* LEGACY-BROWSER-SUPPORT-END */\nconst VERSION = '2.0.0';\nfunction request(url, options = {}) {\n const { queryParameters, requestTimeout = 30000 } = options;\n url = new URL(url.toString());\n url = applyParameters(url, queryParameters);\n options = applyTimeout(options, requestTimeout);\n return fetch_retry(url.toString(), 3, {\n ...options,\n headers: new cross_fetch_1.Headers({\n 'Content-Type': 'application/json; charset=utf-8',\n /* LEGACY-BROWSER-SUPPORT-START */\n ...userAgentHeader(),\n /* LEGACY-BROWSER-SUPPORT-END */\n ...options.headers,\n }),\n });\n}\nexports.request = request;\nfunction fetch_retry(url, retries, options) {\n return new Promise((resolve, reject) => {\n (0, cross_fetch_1.default)(url, options)\n .then(response => {\n // We don't want to `reject` when retries have finished\n // Instead simply stop trying and return.\n if (retries === 0)\n return resolve(response);\n if (response.status === 429) {\n const { retryTimeout = 20000 } = options;\n retryTimeoutPromise(retryTimeout).then(() => {\n fetch_retry(url, retries - 1, options)\n .then(resolve)\n .catch(reject);\n });\n }\n else {\n clearTimeout(options.requestTimer);\n resolve(response);\n }\n })\n .catch(reject);\n });\n}\nconst retryTimeoutPromise = (milliseconds) => {\n return new Promise(resolve => setTimeout(resolve, milliseconds));\n};\nfunction userAgentHeader() {\n if (browser_or_node_1.isNode) {\n return {\n 'User-Agent': `pdjs/${VERSION} (${process.version}/${process.platform})`,\n };\n }\n else if (browser_or_node_1.isWebWorker) {\n return {\n 'User-Agent': `pdjs/${VERSION} (WebWorker)`,\n };\n }\n else if (browser_or_node_1.isJsDom) {\n return {\n 'User-Agent': `pdjs/${VERSION} (JsDom)`,\n };\n }\n else if (browser_or_node_1.isDeno) {\n return {\n 'User-Agent': `pdjs/${VERSION} (Deno)`,\n };\n }\n else if (browser_or_node_1.isBrowser) {\n return {\n // Note: This will not work consistently for all browsers as some silently drop the userAgent Header.\n 'User-Agent': `pdjs/${VERSION} (${window.navigator.userAgent})`,\n };\n }\n else {\n return {};\n }\n}\nfunction applyParameters(url, queryParameters) {\n if (!queryParameters)\n return url;\n const combinedParameters = url.searchParams;\n for (const key of Object.keys(queryParameters)) {\n const parameter = queryParameters[key];\n if (Array.isArray(parameter)) {\n // Support for array based keys like `additional_fields[]`\n parameter.forEach(item => {\n combinedParameters.append(key, item);\n });\n }\n else {\n combinedParameters.append(key, parameter);\n }\n }\n url.search = combinedParameters.toString();\n return url;\n}\nfunction applyTimeout(init, timeout) {\n if (!timeout)\n return init;\n const timer = setTimeout(() => { }, timeout);\n return {\n ...init,\n requestTimer: timer,\n };\n}\n//# sourceMappingURL=common.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.change = exports.resolve = exports.acknowledge = exports.trigger = exports.event = void 0;\nconst common_1 = require(\"./common\");\nfunction event(eventParameters) {\n const { server = 'events.pagerduty.com', type = 'event', data, ...config } = eventParameters;\n let url = `https://${server}/v2/enqueue`;\n if (type === 'change') {\n url = `https://${server}/v2/change/enqueue`;\n }\n return eventFetch(url, {\n method: 'POST',\n body: JSON.stringify(data),\n ...config,\n });\n}\nexports.event = event;\nconst shorthand = (action) => (eventParameters) => {\n const typeField = 'event_action';\n return event({\n ...eventParameters,\n data: {\n ...eventParameters.data,\n [typeField]: action,\n },\n });\n};\nexports.trigger = shorthand('trigger');\nexports.acknowledge = shorthand('acknowledge');\nexports.resolve = shorthand('resolve');\nconst change = (eventParameters) => event({ ...eventParameters, type: 'change' });\nexports.change = change;\nfunction eventFetch(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n return response.json().then((data) => {\n apiResponse.data = data;\n apiResponse.response = response;\n return apiResponse;\n });\n });\n}\n//# sourceMappingURL=events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolve = exports.acknowledge = exports.trigger = exports.change = exports.event = exports.api = void 0;\nvar api_1 = require(\"./api\");\nObject.defineProperty(exports, \"api\", { enumerable: true, get: function () { return api_1.api; } });\nvar events_1 = require(\"./events\");\nObject.defineProperty(exports, \"event\", { enumerable: true, get: function () { return events_1.event; } });\nObject.defineProperty(exports, \"change\", { enumerable: true, get: function () { return events_1.change; } });\nObject.defineProperty(exports, \"trigger\", { enumerable: true, get: function () { return events_1.trigger; } });\nObject.defineProperty(exports, \"acknowledge\", { enumerable: true, get: function () { return events_1.acknowledge; } });\nObject.defineProperty(exports, \"resolve\", { enumerable: true, get: function () { return events_1.resolve; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IncomingWebhook = void 0;\nconst axios_1 = __importDefault(require(\"axios\"));\nconst errors_1 = require(\"./errors\");\nconst instrument_1 = require(\"./instrument\");\n/**\n * A client for Slack's Incoming Webhooks\n */\nclass IncomingWebhook {\n constructor(url, defaults = {\n timeout: 0,\n }) {\n if (url === undefined) {\n throw new Error('Incoming webhook URL is required');\n }\n this.url = url;\n this.defaults = defaults;\n this.axios = axios_1.default.create({\n baseURL: url,\n httpAgent: defaults.agent,\n httpsAgent: defaults.agent,\n maxRedirects: 0,\n proxy: false,\n timeout: defaults.timeout,\n headers: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'User-Agent': (0, instrument_1.getUserAgent)(),\n },\n });\n delete this.defaults.agent;\n }\n /**\n * Send a notification to a conversation\n * @param message - the message (a simple string, or an object describing the message)\n */\n async send(message) {\n // NOTE: no support for TLS config\n let payload = Object.assign({}, this.defaults);\n if (typeof message === 'string') {\n payload.text = message;\n }\n else {\n payload = Object.assign(payload, message);\n }\n try {\n const response = await this.axios.post(this.url, payload);\n return this.buildResult(response);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }\n catch (error) {\n // Wrap errors in this packages own error types (abstract the implementation details' types)\n if (error.response !== undefined) {\n throw (0, errors_1.httpErrorWithOriginal)(error);\n }\n else if (error.request !== undefined) {\n throw (0, errors_1.requestErrorWithOriginal)(error);\n }\n else {\n throw error;\n }\n }\n }\n /**\n * Processes an HTTP response into an IncomingWebhookResult.\n */\n // eslint-disable-next-line class-methods-use-this\n buildResult(response) {\n return {\n text: response.data,\n };\n }\n}\nexports.IncomingWebhook = IncomingWebhook;\n//# sourceMappingURL=IncomingWebhook.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.httpErrorWithOriginal = exports.requestErrorWithOriginal = exports.ErrorCode = void 0;\n/**\n * A dictionary of codes for errors produced by this package\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[\"RequestError\"] = \"slack_webhook_request_error\";\n ErrorCode[\"HTTPError\"] = \"slack_webhook_http_error\";\n})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));\n/**\n * Factory for producing a {@link CodedError} from a generic error\n */\nfunction errorWithCode(error, code) {\n // NOTE: might be able to return something more specific than a CodedError with conditional typing\n const codedError = error;\n codedError.code = code;\n return codedError;\n}\n/**\n * A factory to create IncomingWebhookRequestError objects\n * @param original The original error\n */\nfunction requestErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`A request error occurred: ${original.message}`), ErrorCode.RequestError);\n error.original = original;\n return error;\n}\nexports.requestErrorWithOriginal = requestErrorWithOriginal;\n/**\n * A factory to create IncomingWebhookHTTPError objects\n * @param original The original error\n */\nfunction httpErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`An HTTP protocol error occurred: statusCode = ${original.response.status}`), ErrorCode.HTTPError);\n error.original = original;\n return error;\n}\nexports.httpErrorWithOriginal = httpErrorWithOriginal;\n//# sourceMappingURL=errors.js.map","\"use strict\";\n/// \nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorCode = exports.IncomingWebhook = void 0;\nvar IncomingWebhook_1 = require(\"./IncomingWebhook\");\nObject.defineProperty(exports, \"IncomingWebhook\", { enumerable: true, get: function () { return IncomingWebhook_1.IncomingWebhook; } });\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ErrorCode\", { enumerable: true, get: function () { return errors_1.ErrorCode; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUserAgent = exports.addAppMetadata = void 0;\nconst os = __importStar(require(\"os\"));\nconst packageJson = require('../package.json'); // eslint-disable-line import/no-commonjs, @typescript-eslint/no-var-requires\n/**\n * Replaces occurrences of '/' with ':' in a string, since '/' is meaningful inside User-Agent strings as a separator.\n */\nfunction replaceSlashes(s) {\n return s.replace('/', ':');\n}\nconst baseUserAgent = `${replaceSlashes(packageJson.name)}/${packageJson.version} ` +\n `node/${process.version.replace('v', '')} ` +\n `${os.platform()}/${os.release()}`;\nconst appMetadata = {};\n/**\n * Appends the app metadata into the User-Agent value\n * @param appMetadata.name name of tool to be counted in instrumentation\n * @param appMetadata.version version of tool to be counted in instrumentation\n */\nfunction addAppMetadata({ name, version }) {\n appMetadata[replaceSlashes(name)] = version;\n}\nexports.addAppMetadata = addAppMetadata;\n/**\n * Returns the current User-Agent value for instrumentation\n */\nfunction getUserAgent() {\n const appIdentifier = Object.entries(appMetadata).map(([name, version]) => `${name}/${version}`).join(' ');\n // only prepend the appIdentifier when its not empty\n return ((appIdentifier.length > 0) ? `${appIdentifier} ` : '') + baseUserAgent;\n}\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=instrument.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.LoginRequestResponse = exports.ErrorResponse = exports.SuccessResponse = exports.ActivityResponse = exports.ActivityRequestError = exports.ActivityRequestTrigger = void 0;\r\nvar ActivityRequestTrigger;\r\n(function (ActivityRequestTrigger) {\r\n ActivityRequestTrigger[\"Automatic\"] = \"automatic\";\r\n ActivityRequestTrigger[\"Manual\"] = \"manual\";\r\n})(ActivityRequestTrigger = exports.ActivityRequestTrigger || (exports.ActivityRequestTrigger = {}));\r\nvar ActivityRequestError = /** @class */ (function () {\r\n function ActivityRequestError(code, message) {\r\n this.code = code;\r\n this.message = message;\r\n }\r\n return ActivityRequestError;\r\n}());\r\nexports.ActivityRequestError = ActivityRequestError;\r\nvar ActivityResponse = /** @class */ (function () {\r\n function ActivityResponse(request) {\r\n this.request = request;\r\n }\r\n return ActivityResponse;\r\n}());\r\nexports.ActivityResponse = ActivityResponse;\r\nvar SuccessResponse = /** @class */ (function (_super) {\r\n __extends(SuccessResponse, _super);\r\n function SuccessResponse(request, rawContent) {\r\n var _this = _super.call(this, request) || this;\r\n _this.request = request;\r\n _this.rawContent = rawContent;\r\n return _this;\r\n }\r\n return SuccessResponse;\r\n}(ActivityResponse));\r\nexports.SuccessResponse = SuccessResponse;\r\nvar ErrorResponse = /** @class */ (function (_super) {\r\n __extends(ErrorResponse, _super);\r\n function ErrorResponse(request, error) {\r\n var _this = _super.call(this, request) || this;\r\n _this.request = request;\r\n _this.error = error;\r\n return _this;\r\n }\r\n return ErrorResponse;\r\n}(ActivityResponse));\r\nexports.ErrorResponse = ErrorResponse;\r\nvar LoginRequestResponse = /** @class */ (function (_super) {\r\n __extends(LoginRequestResponse, _super);\r\n function LoginRequestResponse(request, auth) {\r\n var _this = _super.call(this, request) || this;\r\n _this.request = request;\r\n _this._auth = auth;\r\n for (var _i = 0, _a = _this._auth.buttons; _i < _a.length; _i++) {\r\n var button = _a[_i];\r\n if (button.type === \"signin\" && button.value !== undefined) {\r\n try {\r\n new URL(button.value);\r\n _this.signinButton = button;\r\n break;\r\n }\r\n catch (e) {\r\n // Ignore parsing error\r\n }\r\n }\r\n }\r\n return _this;\r\n }\r\n Object.defineProperty(LoginRequestResponse.prototype, \"tokenExchangeResource\", {\r\n get: function () {\r\n return this._auth.tokenExchangeResource;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return LoginRequestResponse;\r\n}(ActivityResponse));\r\nexports.LoginRequestResponse = LoginRequestResponse;\r\n//# sourceMappingURL=activity-request.js.map","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AdaptiveApplet = void 0;\r\n// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar Utils = require(\"./utils\");\r\nvar shared_1 = require(\"./shared\");\r\nvar activity_request_1 = require(\"./activity-request\");\r\nvar strings_1 = require(\"./strings\");\r\nvar card_elements_1 = require(\"./card-elements\");\r\nvar serialization_1 = require(\"./serialization\");\r\nfunction logEvent(level, message) {\r\n var optionalParams = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n optionalParams[_i - 2] = arguments[_i];\r\n }\r\n if (shared_1.GlobalSettings.applets.logEnabled) {\r\n if (shared_1.GlobalSettings.applets.onLogEvent) {\r\n shared_1.GlobalSettings.applets.onLogEvent(level, message, optionalParams);\r\n }\r\n else {\r\n /* eslint-disable no-console */\r\n switch (level) {\r\n case Enums.LogLevel.Warning:\r\n console.warn(message, optionalParams);\r\n break;\r\n case Enums.LogLevel.Error:\r\n console.error(message, optionalParams);\r\n break;\r\n default:\r\n console.log(message, optionalParams);\r\n break;\r\n }\r\n /* eslint-enable no-console */\r\n }\r\n }\r\n}\r\nvar ActivityRequest = /** @class */ (function () {\r\n function ActivityRequest(action, trigger, consecutiveActions) {\r\n this.action = action;\r\n this.trigger = trigger;\r\n this.consecutiveActions = consecutiveActions;\r\n this.attemptNumber = 0;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/require-await\r\n ActivityRequest.prototype.retryAsync = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n if (this.onSend) {\r\n this.onSend(this);\r\n }\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n return ActivityRequest;\r\n}());\r\nvar AdaptiveApplet = /** @class */ (function () {\r\n function AdaptiveApplet() {\r\n this._allowAutomaticCardUpdate = false;\r\n this.renderedElement = document.createElement(\"div\");\r\n this.renderedElement.className = \"aaf-cardHost\";\r\n this.renderedElement.style.position = \"relative\";\r\n this.renderedElement.style.display = \"flex\";\r\n this.renderedElement.style.flexDirection = \"column\";\r\n this._cardHostElement = document.createElement(\"div\");\r\n this._refreshButtonHostElement = document.createElement(\"div\");\r\n this._refreshButtonHostElement.className = \"aaf-refreshButtonHost\";\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n this.renderedElement.appendChild(this._cardHostElement);\r\n this.renderedElement.appendChild(this._refreshButtonHostElement);\r\n }\r\n AdaptiveApplet.prototype.displayCard = function (card) {\r\n if (card.renderedElement) {\r\n Utils.clearElementChildren(this._cardHostElement);\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n this._cardHostElement.appendChild(card.renderedElement);\r\n }\r\n else {\r\n throw new Error(\"displayCard: undefined card.\");\r\n }\r\n };\r\n AdaptiveApplet.prototype.showManualRefreshButton = function (refreshAction) {\r\n var _this = this;\r\n var displayBuiltInManualRefreshButton = this.onShowManualRefreshButton\r\n ? this.onShowManualRefreshButton(this)\r\n : true;\r\n if (displayBuiltInManualRefreshButton) {\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n var renderedRefreshButton = undefined;\r\n if (this.onRenderManualRefreshButton) {\r\n renderedRefreshButton = this.onRenderManualRefreshButton(this);\r\n }\r\n else {\r\n var message = strings_1.Strings.runtime.refreshThisCard();\r\n if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) {\r\n var autoRefreshPausedMessage = strings_1.Strings.runtime.automaticRefreshPaused();\r\n if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== \" \") {\r\n autoRefreshPausedMessage += \" \";\r\n }\r\n message = strings_1.Strings.runtime.clckToRestartAutomaticRefresh();\r\n }\r\n var cardPayload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.2\",\r\n body: [\r\n {\r\n type: \"RichTextBlock\",\r\n horizontalAlignment: \"right\",\r\n inlines: [\r\n {\r\n type: \"TextRun\",\r\n text: message,\r\n selectAction: {\r\n type: \"Action.Submit\",\r\n id: \"refreshCard\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n var card = new card_elements_1.AdaptiveCard();\r\n card.parse(cardPayload, new card_elements_1.SerializationContext(serialization_1.Versions.v1_2));\r\n card.onExecuteAction = function (action) {\r\n if (action.id === \"refreshCard\") {\r\n Utils.clearElementChildren(_this._refreshButtonHostElement);\r\n _this.internalExecuteAction(refreshAction, activity_request_1.ActivityRequestTrigger.Automatic, 0);\r\n }\r\n };\r\n renderedRefreshButton = card.render();\r\n }\r\n if (renderedRefreshButton) {\r\n Utils.clearElementChildren(this._refreshButtonHostElement);\r\n this._refreshButtonHostElement.appendChild(renderedRefreshButton);\r\n this._refreshButtonHostElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n };\r\n AdaptiveApplet.prototype.createActivityRequest = function (action, trigger, consecutiveActions) {\r\n var _this = this;\r\n if (this.card) {\r\n var request_1 = new ActivityRequest(action, trigger, consecutiveActions);\r\n request_1.onSend = function (sender) {\r\n sender.attemptNumber++;\r\n void _this.internalSendActivityRequestAsync(request_1);\r\n };\r\n var cancel = this.onPrepareActivityRequest\r\n ? !this.onPrepareActivityRequest(this, request_1, action)\r\n : false;\r\n return cancel ? undefined : request_1;\r\n }\r\n else {\r\n throw new Error(\"createActivityRequest: no card has been set.\");\r\n }\r\n };\r\n AdaptiveApplet.prototype.createMagicCodeInputCard = function (attemptNumber) {\r\n var payload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.0\",\r\n body: [\r\n {\r\n type: \"TextBlock\",\r\n color: \"attention\",\r\n text: attemptNumber === 1 ? undefined : \"That didn't work... let's try again.\",\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"TextBlock\",\r\n text: 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"',\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"Input.Text\",\r\n id: \"magicCode\",\r\n placeholder: \"Enter magic code\"\r\n },\r\n {\r\n type: \"ActionSet\",\r\n horizontalAlignment: \"center\",\r\n actions: [\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._submitMagicCodeActionId,\r\n title: \"Submit\"\r\n },\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._cancelMagicCodeAuthActionId,\r\n title: \"Cancel\"\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n var card = new card_elements_1.AdaptiveCard();\r\n card.parse(payload);\r\n return card;\r\n };\r\n AdaptiveApplet.prototype.cancelAutomaticRefresh = function () {\r\n if (this._allowAutomaticCardUpdate) {\r\n logEvent(Enums.LogLevel.Warning, \"Automatic card refresh has been cancelled as a result of the user interacting with the card.\");\r\n }\r\n this._allowAutomaticCardUpdate = false;\r\n };\r\n AdaptiveApplet.prototype.createSerializationContext = function () {\r\n return this.onCreateSerializationContext\r\n ? this.onCreateSerializationContext(this)\r\n : new card_elements_1.SerializationContext();\r\n };\r\n AdaptiveApplet.prototype.internalSetCard = function (payload, consecutiveActions) {\r\n var _this = this;\r\n if (typeof payload === \"object\" && payload[\"type\"] === \"AdaptiveCard\") {\r\n this._cardPayload = payload;\r\n }\r\n if (this._cardPayload) {\r\n try {\r\n var card = new card_elements_1.AdaptiveCard();\r\n if (this.hostConfig) {\r\n card.hostConfig = this.hostConfig;\r\n }\r\n var serializationContext = this.createSerializationContext();\r\n card.parse(this._cardPayload, serializationContext);\r\n var doChangeCard = this.onCardChanging\r\n ? this.onCardChanging(this, this._cardPayload)\r\n : true;\r\n if (doChangeCard) {\r\n this._card = card;\r\n if (this._card.authentication &&\r\n this._card.authentication.tokenExchangeResource &&\r\n this.onPrefetchSSOToken) {\r\n this.onPrefetchSSOToken(this, this._card.authentication.tokenExchangeResource);\r\n }\r\n this._card.onExecuteAction = function (action) {\r\n // If the user takes an action, cancel any pending automatic refresh\r\n _this.cancelAutomaticRefresh();\r\n _this.internalExecuteAction(action, activity_request_1.ActivityRequestTrigger.Manual, 0);\r\n };\r\n this._card.onInputValueChanged = function (input) {\r\n var _a, _b, _c;\r\n // If the user modifies an input, cancel any pending automatic refresh\r\n _this.cancelAutomaticRefresh();\r\n if (input instanceof card_elements_1.ChoiceSetInput && input.isDynamicTypeahead()) {\r\n var filter = input.getFilterForDynamicSearch();\r\n if (filter) {\r\n var dataQueryAction = new card_elements_1.DataQuery();\r\n dataQueryAction.filter = filter;\r\n dataQueryAction.dataset = ((_a = input.choicesData) === null || _a === void 0 ? void 0 : _a.dataset) || \"\";\r\n dataQueryAction.count = (_b = input.choicesData) === null || _b === void 0 ? void 0 : _b.count;\r\n dataQueryAction.skip = (_c = input.choicesData) === null || _c === void 0 ? void 0 : _c.skip;\r\n _this._choiceSet = input;\r\n _this.internalExecuteAction(dataQueryAction, activity_request_1.ActivityRequestTrigger.Manual, 0 // consecutiveActions\r\n );\r\n }\r\n }\r\n };\r\n this._card.render();\r\n if (this._card.renderedElement) {\r\n this.displayCard(this._card);\r\n if (this.onCardChanged) {\r\n this.onCardChanged(this);\r\n }\r\n if (this._card.refresh) {\r\n if (shared_1.GlobalSettings.applets.refresh.mode ===\r\n Enums.RefreshMode.Automatic &&\r\n consecutiveActions <\r\n shared_1.GlobalSettings.applets.refresh\r\n .maximumConsecutiveAutomaticRefreshes) {\r\n if (shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <=\r\n 0) {\r\n logEvent(Enums.LogLevel.Info, \"Triggering automatic card refresh number \" +\r\n (consecutiveActions + 1));\r\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveActions + 1);\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Info, \"Scheduling automatic card refresh number \" +\r\n (consecutiveActions + 1) +\r\n \" in \" +\r\n shared_1.GlobalSettings.applets.refresh\r\n .timeBetweenAutomaticRefreshes +\r\n \"ms\");\r\n var action_1 = this._card.refresh.action;\r\n this._allowAutomaticCardUpdate = true;\r\n window.setTimeout(function () {\r\n if (_this._allowAutomaticCardUpdate) {\r\n _this.internalExecuteAction(action_1, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveActions + 1);\r\n }\r\n }, shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes);\r\n }\r\n }\r\n else if (shared_1.GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled) {\r\n if (consecutiveActions > 0) {\r\n logEvent(Enums.LogLevel.Warning, \"Stopping automatic refreshes after \" +\r\n consecutiveActions +\r\n \" consecutive refreshes.\");\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Warning, \"The card has a refresh section, but automatic refreshes are disabled.\");\r\n }\r\n if (shared_1.GlobalSettings.applets.refresh\r\n .allowManualRefreshesAfterAutomaticRefreshes ||\r\n shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual) {\r\n logEvent(Enums.LogLevel.Info, \"Showing manual refresh button.\");\r\n this.showManualRefreshButton(this._card.refresh.action);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (error) {\r\n // Ignore all errors\r\n logEvent(Enums.LogLevel.Error, \"setCard: \" + error);\r\n }\r\n }\r\n };\r\n AdaptiveApplet.prototype.internalExecuteAction = function (action, trigger, consecutiveActions) {\r\n if (action instanceof card_elements_1.UniversalAction) {\r\n if (this.channelAdapter) {\r\n var request = this.createActivityRequest(action, trigger, consecutiveActions);\r\n if (request) {\r\n void request.retryAsync();\r\n }\r\n }\r\n else {\r\n throw new Error(\"internalExecuteAction: No channel adapter set.\");\r\n }\r\n }\r\n if (this.onAction) {\r\n this.onAction(this, action);\r\n }\r\n };\r\n AdaptiveApplet.prototype.createProgressOverlay = function (request) {\r\n if (!this._progressOverlay) {\r\n if (this.onCreateProgressOverlay) {\r\n this._progressOverlay = this.onCreateProgressOverlay(this, request);\r\n }\r\n else {\r\n this._progressOverlay = document.createElement(\"div\");\r\n this._progressOverlay.className = \"aaf-progress-overlay\";\r\n var spinner = document.createElement(\"div\");\r\n spinner.className = \"aaf-spinner\";\r\n spinner.style.width = \"28px\";\r\n spinner.style.height = \"28px\";\r\n this._progressOverlay.appendChild(spinner);\r\n }\r\n }\r\n return this._progressOverlay;\r\n };\r\n AdaptiveApplet.prototype.removeProgressOverlay = function (request) {\r\n if (this.onRemoveProgressOverlay) {\r\n this.onRemoveProgressOverlay(this, request);\r\n }\r\n if (this._progressOverlay !== undefined) {\r\n this.renderedElement.removeChild(this._progressOverlay);\r\n this._progressOverlay = undefined;\r\n }\r\n };\r\n AdaptiveApplet.prototype.activityRequestSucceeded = function (response, parsedContent) {\r\n if (this.onActivityRequestSucceeded) {\r\n this.onActivityRequestSucceeded(this, response, parsedContent);\r\n }\r\n };\r\n AdaptiveApplet.prototype.activityRequestFailed = function (response) {\r\n return this.onActivityRequestFailed\r\n ? this.onActivityRequestFailed(this, response)\r\n : shared_1.GlobalSettings.applets.defaultTimeBetweenRetryAttempts;\r\n };\r\n AdaptiveApplet.prototype.showAuthCodeInputDialog = function (request) {\r\n var _this = this;\r\n var showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog\r\n ? this.onShowAuthCodeInputDialog(this, request)\r\n : true;\r\n if (showBuiltInAuthCodeInputCard) {\r\n var authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber);\r\n authCodeInputCard.render();\r\n authCodeInputCard.onExecuteAction = function (submitMagicCodeAction) {\r\n if (_this.card && submitMagicCodeAction instanceof card_elements_1.SubmitAction) {\r\n switch (submitMagicCodeAction.id) {\r\n case AdaptiveApplet._submitMagicCodeActionId:\r\n var authCode = undefined;\r\n if (submitMagicCodeAction.data &&\r\n typeof submitMagicCodeAction.data[\"magicCode\"] === \"string\") {\r\n authCode = submitMagicCodeAction.data[\"magicCode\"];\r\n }\r\n if (authCode) {\r\n _this.displayCard(_this.card);\r\n request.authCode = authCode;\r\n void request.retryAsync();\r\n }\r\n else {\r\n alert(\"Please enter the magic code you received.\");\r\n }\r\n break;\r\n case AdaptiveApplet._cancelMagicCodeAuthActionId:\r\n logEvent(Enums.LogLevel.Warning, \"Authentication cancelled by user.\");\r\n _this.displayCard(_this.card);\r\n break;\r\n default:\r\n logEvent(Enums.LogLevel.Error, \"Unexpected action taken from magic code input card (id = \" +\r\n submitMagicCodeAction.id +\r\n \")\");\r\n alert(strings_1.Strings.magicCodeInputCard.somethingWentWrong());\r\n break;\r\n }\r\n }\r\n };\r\n this.displayCard(authCodeInputCard);\r\n }\r\n };\r\n AdaptiveApplet.prototype.internalSendActivityRequestAsync = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var action;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendActivityRequestAsync: channelAdapter is not set.\");\r\n }\r\n action = request.action;\r\n if (!(action instanceof card_elements_1.ExecuteAction)) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.internalSendExecuteRequestAsync(request)];\r\n case 1:\r\n _a.sent();\r\n return [3 /*break*/, 5];\r\n case 2:\r\n if (!(action instanceof card_elements_1.DataQuery)) return [3 /*break*/, 4];\r\n return [4 /*yield*/, this.internalSendDataQueryRequestAsync(request)];\r\n case 3:\r\n _a.sent();\r\n return [3 /*break*/, 5];\r\n case 4: throw new Error(\"internalSendActivityRequestAsync: Unhandled Action Type\");\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n AdaptiveApplet.prototype.internalSendExecuteRequestAsync = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var overlay, done, _loop_1, this_1, state_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendExecuteRequestAsync: channelAdapter is not set.\");\r\n }\r\n overlay = this.createProgressOverlay(request);\r\n if (overlay !== undefined) {\r\n this.renderedElement.appendChild(overlay);\r\n }\r\n done = false;\r\n _loop_1 = function () {\r\n var response, error_1, parsedContent, retryIn_1, attemptOAuth, left, top_1;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n response = undefined;\r\n if (request.attemptNumber === 1) {\r\n logEvent(Enums.LogLevel.Info, \"Sending activity request to channel (attempt \" + request.attemptNumber + \")\");\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Info, \"Re-sending activity request to channel (attempt \" + request.attemptNumber + \")\");\r\n }\r\n _b.label = 1;\r\n case 1:\r\n _b.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this_1.channelAdapter.sendRequestAsync(request)];\r\n case 2:\r\n response = _b.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n error_1 = _b.sent();\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error_1);\r\n this_1.removeProgressOverlay(request);\r\n done = true;\r\n return [3 /*break*/, 4];\r\n case 4:\r\n if (!response) return [3 /*break*/, 10];\r\n if (!(response instanceof activity_request_1.SuccessResponse)) return [3 /*break*/, 5];\r\n this_1.removeProgressOverlay(request);\r\n if (response.rawContent === undefined) {\r\n throw new Error(\"internalSendExecuteRequestAsync: Action.Execute result is undefined\");\r\n }\r\n parsedContent = response.rawContent;\r\n try {\r\n parsedContent = JSON.parse(response.rawContent);\r\n }\r\n catch (_c) {\r\n // Leave parseContent as is\r\n }\r\n if (typeof parsedContent === \"string\") {\r\n logEvent(Enums.LogLevel.Info, \"The activity request returned a string after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\");\r\n this_1.activityRequestSucceeded(response, parsedContent);\r\n }\r\n else if (typeof parsedContent === \"object\" &&\r\n parsedContent[\"type\"] === \"AdaptiveCard\") {\r\n logEvent(Enums.LogLevel.Info, \"The activity request returned an Adaptive Card after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\");\r\n this_1.internalSetCard(parsedContent, request.consecutiveActions);\r\n this_1.activityRequestSucceeded(response, this_1.card);\r\n }\r\n else {\r\n throw new Error(\"internalSendExecuteRequestAsync: Action.Execute result is of unsupported type (\" +\r\n typeof response.rawContent +\r\n \")\");\r\n }\r\n done = true;\r\n return [3 /*break*/, 10];\r\n case 5:\r\n if (!(response instanceof activity_request_1.ErrorResponse)) return [3 /*break*/, 9];\r\n retryIn_1 = this_1.activityRequestFailed(response);\r\n if (!(retryIn_1 >= 0 &&\r\n request.attemptNumber < shared_1.GlobalSettings.applets.maximumRetryAttempts)) return [3 /*break*/, 7];\r\n logEvent(Enums.LogLevel.Warning, \"Activity request failed: \".concat(response.error.message, \". Retrying in \").concat(retryIn_1, \"ms\"));\r\n request.attemptNumber++;\r\n return [4 /*yield*/, new Promise(function (resolve, _reject) {\r\n window.setTimeout(function () {\r\n resolve();\r\n }, retryIn_1);\r\n })];\r\n case 6:\r\n _b.sent();\r\n return [3 /*break*/, 8];\r\n case 7:\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \".concat(response.error.message, \". Giving up after \").concat(request.attemptNumber, \" attempt(s)\"));\r\n this_1.removeProgressOverlay(request);\r\n done = true;\r\n _b.label = 8;\r\n case 8: return [3 /*break*/, 10];\r\n case 9:\r\n if (response instanceof activity_request_1.LoginRequestResponse) {\r\n logEvent(Enums.LogLevel.Info, \"The activity request returned a LoginRequestResponse after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\");\r\n if (request.attemptNumber <= shared_1.GlobalSettings.applets.maximumRetryAttempts) {\r\n attemptOAuth = true;\r\n if (response.tokenExchangeResource && this_1.onSSOTokenNeeded) {\r\n // Attempt to use SSO. The host will return true if it can handle SSO, in which case\r\n // we bypass OAuth\r\n attemptOAuth = !this_1.onSSOTokenNeeded(this_1, request, response.tokenExchangeResource);\r\n }\r\n if (attemptOAuth) {\r\n // Attempt to use OAuth\r\n this_1.removeProgressOverlay(request);\r\n if (response.signinButton === undefined) {\r\n throw new Error(\"internalSendExecuteRequestAsync: the login request doesn't contain a valid signin URL.\");\r\n }\r\n logEvent(Enums.LogLevel.Info, \"Login required at \" + response.signinButton.value);\r\n if (this_1.onShowSigninPrompt) {\r\n // Bypass the built-in auth prompt if the host app handles it\r\n this_1.onShowSigninPrompt(this_1, request, response.signinButton);\r\n }\r\n else {\r\n this_1.showAuthCodeInputDialog(request);\r\n left = window.screenX +\r\n (window.outerWidth - shared_1.GlobalSettings.applets.authPromptWidth) /\r\n 2;\r\n top_1 = window.screenY +\r\n (window.outerHeight - shared_1.GlobalSettings.applets.authPromptHeight) /\r\n 2;\r\n window.open(response.signinButton.value, response.signinButton.title\r\n ? response.signinButton.title\r\n : \"Sign in\", \"width=\".concat(shared_1.GlobalSettings.applets.authPromptWidth, \",height=\").concat(shared_1.GlobalSettings.applets.authPromptHeight, \",left=\").concat(left, \",top=\").concat(top_1));\r\n }\r\n }\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Error, \"Authentication failed. Giving up after \" +\r\n request.attemptNumber +\r\n \" attempt(s)\");\r\n alert(strings_1.Strings.magicCodeInputCard.authenticationFailed());\r\n }\r\n return [2 /*return*/, \"break\"];\r\n }\r\n else {\r\n throw new Error(\"Unhandled response type: \" + JSON.stringify(response));\r\n }\r\n _b.label = 10;\r\n case 10: return [2 /*return*/];\r\n }\r\n });\r\n };\r\n this_1 = this;\r\n _a.label = 1;\r\n case 1:\r\n if (!!done) return [3 /*break*/, 3];\r\n return [5 /*yield**/, _loop_1()];\r\n case 2:\r\n state_1 = _a.sent();\r\n if (state_1 === \"break\")\r\n return [3 /*break*/, 3];\r\n return [3 /*break*/, 1];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n AdaptiveApplet.prototype.internalSendDataQueryRequestAsync = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var filter, response, error_2, rawResponse, parsedResponse;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendDataQueryRequestAsync: channel adapter not set\");\r\n }\r\n filter = request.action.filter;\r\n if (!this._choiceSet) return [3 /*break*/, 5];\r\n this._choiceSet.showLoadingIndicator();\r\n response = undefined;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.channelAdapter.sendRequestAsync(request)];\r\n case 2:\r\n response = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n error_2 = _a.sent();\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error_2);\r\n return [3 /*break*/, 4];\r\n case 4:\r\n if (response) {\r\n if (response instanceof activity_request_1.SuccessResponse) {\r\n rawResponse = response.rawContent;\r\n if (rawResponse) {\r\n parsedResponse = void 0;\r\n try {\r\n parsedResponse = JSON.parse(rawResponse);\r\n }\r\n catch (error) {\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n throw new Error(\"internalSendDataQueryRequestAsync: Cannot parse response object: \" +\r\n rawResponse);\r\n }\r\n if (typeof parsedResponse === \"object\") {\r\n this._choiceSet.renderChoices(filter, parsedResponse);\r\n this.activityRequestSucceeded(response, rawResponse);\r\n }\r\n else {\r\n this._choiceSet.showErrorIndicator(filter, \"Error loading results\");\r\n throw new Error(\"internalSendDataQueryRequestAsync: Data.Query result is of unsupported type (\" +\r\n typeof rawResponse +\r\n \")\");\r\n }\r\n }\r\n else {\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n throw new Error(\"internalSendDataQueryRequestAsync: Data.Query result is undefined\");\r\n }\r\n }\r\n else if (response instanceof activity_request_1.ErrorResponse) {\r\n this._choiceSet.showErrorIndicator(filter, response.error.message || \"Error loading results\");\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \".concat(response.error.message, \".\"));\r\n this.activityRequestFailed(response);\r\n }\r\n else {\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n throw new Error(\"Unhandled response type: \" + JSON.stringify(response));\r\n }\r\n }\r\n else {\r\n this._choiceSet.removeLoadingIndicator();\r\n }\r\n _a.label = 5;\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n AdaptiveApplet.prototype.refreshCard = function () {\r\n if (this._card && this._card.refresh) {\r\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Manual, 0);\r\n }\r\n };\r\n AdaptiveApplet.prototype.setCard = function (payload) {\r\n this.internalSetCard(payload, 0);\r\n };\r\n Object.defineProperty(AdaptiveApplet.prototype, \"card\", {\r\n get: function () {\r\n return this._card;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveApplet._submitMagicCodeActionId = \"submitMagicCode\";\r\n AdaptiveApplet._cancelMagicCodeAuthActionId = \"cancelMagicCodeAuth\";\r\n return AdaptiveApplet;\r\n}());\r\nexports.AdaptiveApplet = AdaptiveApplet;\r\n//# sourceMappingURL=adaptive-applet.js.map","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n__exportStar(require(\"./strings\"), exports);\r\n__exportStar(require(\"./enums\"), exports);\r\n__exportStar(require(\"./shared\"), exports);\r\n__exportStar(require(\"./utils\"), exports);\r\n__exportStar(require(\"./serialization\"), exports);\r\n__exportStar(require(\"./host-capabilities\"), exports);\r\n__exportStar(require(\"./host-config\"), exports);\r\n__exportStar(require(\"./registry\"), exports);\r\n__exportStar(require(\"./card-object\"), exports);\r\n__exportStar(require(\"./card-elements\"), exports);\r\n__exportStar(require(\"./carousel\"), exports);\r\n__exportStar(require(\"./table\"), exports);\r\n__exportStar(require(\"./channel-adapter\"), exports);\r\n__exportStar(require(\"./activity-request\"), exports);\r\n__exportStar(require(\"./adaptive-applet\"), exports);\r\n//# sourceMappingURL=adaptivecards.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BackgroundImage = exports.ContainerBase = exports.StylableCardElementContainer = exports.ContainerStyleProperty = exports.ActionSet = exports.ShowCardAction = exports.HttpAction = exports.HttpHeader = exports.ToggleVisibilityAction = exports.OpenUrlAction = exports.DataQuery = exports.ExecuteAction = exports.UniversalAction = exports.SubmitAction = exports.SubmitActionBase = exports.Action = exports.TimeInput = exports.TimeProperty = exports.DateInput = exports.NumberInput = exports.FilteredChoiceSet = exports.ChoiceSetInput = exports.ChoiceSetInputDataQuery = exports.Choice = exports.ToggleInput = exports.TextInput = exports.Input = exports.Media = exports.YouTubePlayer = exports.DailymotionPlayer = exports.VimeoPlayer = exports.IFrameMediaMediaPlayer = exports.CustomMediaPlayer = exports.HTML5MediaPlayer = exports.MediaPlayer = exports.MediaSource = exports.CaptionSource = exports.ContentSource = exports.ImageSet = exports.CardElementContainer = exports.Image = exports.FactSet = exports.Fact = exports.RichTextBlock = exports.TextRun = exports.TextBlock = exports.BaseTextBlock = exports.ActionProperty = exports.CardElement = exports.renderSeparation = void 0;\r\nexports.SerializationContext = exports.AdaptiveCard = exports.Authentication = exports.TokenExchangeResource = exports.AuthCardButton = exports.RefreshDefinition = exports.RefreshActionProperty = exports.ContainerWithActions = exports.ColumnSet = exports.Column = exports.Container = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar shared_1 = require(\"./shared\");\r\nvar Utils = require(\"./utils\");\r\nvar host_config_1 = require(\"./host-config\");\r\nvar TextFormatters = require(\"./text-formatters\");\r\nvar card_object_1 = require(\"./card-object\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar registry_1 = require(\"./registry\");\r\nvar strings_1 = require(\"./strings\");\r\nvar controls_1 = require(\"./controls\");\r\nfunction clearElement(element) {\r\n var _a, _b;\r\n var trustedHtml = (typeof window === 'undefined') ? \"\" : ((_b = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.emptyHTML) !== null && _b !== void 0 ? _b : \"\");\r\n element.innerHTML = trustedHtml;\r\n}\r\nfunction renderSeparation(hostConfig, separationDefinition, orientation) {\r\n if (separationDefinition.spacing > 0 ||\r\n (separationDefinition.lineThickness && separationDefinition.lineThickness > 0)) {\r\n var separator = document.createElement(\"div\");\r\n separator.className = hostConfig.makeCssClassName(\"ac-\" +\r\n (orientation === Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\") +\r\n \"-separator\");\r\n separator.setAttribute(\"aria-hidden\", \"true\");\r\n var color = separationDefinition.lineColor\r\n ? Utils.stringToCssColor(separationDefinition.lineColor)\r\n : \"\";\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingTop = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginBottom = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderBottom =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n }\r\n else {\r\n separator.style.height = separationDefinition.spacing + \"px\";\r\n }\r\n }\r\n else {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingLeft = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginRight = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderRight =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n }\r\n else {\r\n separator.style.width = separationDefinition.spacing + \"px\";\r\n }\r\n }\r\n separator.style.overflow = \"hidden\";\r\n separator.style.flex = \"0 0 auto\";\r\n return separator;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.renderSeparation = renderSeparation;\r\nvar CardElement = /** @class */ (function (_super) {\r\n __extends(CardElement, _super);\r\n function CardElement() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._truncatedDueToOverflow = false;\r\n return _this;\r\n }\r\n Object.defineProperty(CardElement.prototype, \"lang\", {\r\n get: function () {\r\n var lang = this.getValue(CardElement.langProperty);\r\n if (lang) {\r\n return lang;\r\n }\r\n else {\r\n if (this.parent) {\r\n return this.parent.lang;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n },\r\n set: function (value) {\r\n this.setValue(CardElement.langProperty, value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isVisible\", {\r\n get: function () {\r\n return this.getValue(CardElement.isVisibleProperty);\r\n },\r\n set: function (value) {\r\n // If the element is going to be hidden, reset any changes that were due\r\n // to overflow truncation (this ensures that if the element is later\r\n // un-hidden it has the right content)\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && !value) {\r\n this.undoOverflowTruncation();\r\n }\r\n if (this.isVisible !== value) {\r\n this.setValue(CardElement.isVisibleProperty, value);\r\n this.updateRenderedElementVisibility();\r\n if (this._renderedElement) {\r\n raiseElementVisibilityChangedEvent(this);\r\n }\r\n }\r\n if (this._renderedElement) {\r\n this._renderedElement.setAttribute(\"aria-expanded\", value.toString());\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElement.prototype.internalRenderSeparator = function () {\r\n var renderedSeparator = renderSeparation(this.hostConfig, {\r\n spacing: this.hostConfig.getEffectiveSpacing(this.spacing),\r\n lineThickness: this.separator ? this.hostConfig.separator.lineThickness : undefined,\r\n lineColor: this.separator ? this.hostConfig.separator.lineColor : undefined\r\n }, this.separatorOrientation);\r\n if (shared_1.GlobalSettings.alwaysBleedSeparators &&\r\n renderedSeparator &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n // Adjust separator's margins if the option to always bleed separators is turned on\r\n var parentContainer = this.getParentContainer();\r\n if (parentContainer && parentContainer.getEffectivePadding()) {\r\n var parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(parentContainer.getEffectivePadding());\r\n renderedSeparator.style.marginLeft = \"-\" + parentPhysicalPadding.left + \"px\";\r\n renderedSeparator.style.marginRight = \"-\" + parentPhysicalPadding.right + \"px\";\r\n }\r\n }\r\n return renderedSeparator;\r\n };\r\n CardElement.prototype.updateRenderedElementVisibility = function () {\r\n var displayMode = this.isDesignMode() || this.isVisible\r\n ? this._defaultRenderedElementDisplayMode\r\n : \"none\";\r\n if (this._renderedElement) {\r\n if (displayMode) {\r\n this._renderedElement.style.display = displayMode;\r\n }\r\n else {\r\n this._renderedElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n if (this._separatorElement) {\r\n if (this.parent && this.parent.isFirstElement(this)) {\r\n this._separatorElement.style.display = \"none\";\r\n }\r\n else {\r\n if (displayMode) {\r\n this._separatorElement.style.display = displayMode;\r\n }\r\n else {\r\n this._separatorElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n }\r\n };\r\n CardElement.prototype.hideElementDueToOverflow = function () {\r\n if (this._renderedElement && this.isVisible) {\r\n this._renderedElement.style.visibility = \"hidden\";\r\n this.isVisible = false;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n };\r\n CardElement.prototype.showElementHiddenDueToOverflow = function () {\r\n if (this._renderedElement && !this.isVisible) {\r\n this._renderedElement.style.removeProperty(\"visibility\");\r\n this.isVisible = true;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n };\r\n // Marked private to emulate internal access\r\n CardElement.prototype.handleOverflow = function (maxHeight) {\r\n if (this.isVisible || this.isHiddenDueToOverflow()) {\r\n var handled = this.truncateOverflow(maxHeight);\r\n // Even if we were unable to truncate the element to fit this time,\r\n // it still could have been previously truncated\r\n this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow;\r\n if (!handled) {\r\n this.hideElementDueToOverflow();\r\n }\r\n else if (handled && !this.isVisible) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n }\r\n };\r\n // Marked private to emulate internal access\r\n CardElement.prototype.resetOverflow = function () {\r\n var sizeChanged = false;\r\n if (this._truncatedDueToOverflow) {\r\n this.undoOverflowTruncation();\r\n this._truncatedDueToOverflow = false;\r\n sizeChanged = true;\r\n }\r\n if (this.isHiddenDueToOverflow()) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n return sizeChanged;\r\n };\r\n CardElement.prototype.getDefaultSerializationContext = function () {\r\n return new SerializationContext();\r\n };\r\n CardElement.prototype.createPlaceholderElement = function () {\r\n var styleDefinition = this.getEffectiveStyleDefinition();\r\n var foregroundCssColor = Utils.stringToCssColor(styleDefinition.foregroundColors.default.subtle);\r\n var element = document.createElement(\"div\");\r\n element.style.border = \"1px dashed \" + foregroundCssColor;\r\n element.style.padding = \"4px\";\r\n element.style.minHeight = \"32px\";\r\n element.style.fontSize = \"10px\";\r\n if (foregroundCssColor) {\r\n element.style.color = foregroundCssColor;\r\n }\r\n element.innerText = strings_1.Strings.defaults.emptyElementText(this.getJsonTypeName());\r\n return element;\r\n };\r\n CardElement.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n if (this.height === \"auto\") {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n }\r\n else {\r\n renderedElement.style.flex = \"1 1 auto\";\r\n }\r\n };\r\n /*\r\n * Called when mouse enters or leaves the card.\r\n * Inputs elements need to update their visual state in such events like showing or hiding borders etc.\r\n * It calls Input.updateVisualState(eventType) for all inputs.\r\n * This method on input (updateVisualState) is supposed to be called from card level on mouse events.\r\n */\r\n CardElement.prototype.updateInputsVisualState = function (hover) {\r\n var allInputs = this.getAllInputs();\r\n var inputEventType = !!hover ? InputEventType.MouseEnterOnCard : InputEventType.MouseLeaveOnCard;\r\n allInputs.forEach(function (input) { return input.updateVisualState(inputEventType); });\r\n };\r\n CardElement.prototype.isDisplayed = function () {\r\n return (this._renderedElement !== undefined &&\r\n this.isVisible &&\r\n this._renderedElement.offsetHeight > 0);\r\n };\r\n CardElement.prototype.overrideInternalRender = function () {\r\n return this.internalRender();\r\n };\r\n CardElement.prototype.applyPadding = function () {\r\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n if (shared_1.GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) {\r\n var padding = new shared_1.PaddingDefinition();\r\n this.getImmediateSurroundingPadding(padding);\r\n var physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n this.separatorElement.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n }\r\n else {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n };\r\n /*\r\n * Called when this element overflows the bottom of the card.\r\n * maxHeight will be the amount of space still available on the card (0 if\r\n * the element is fully off the card).\r\n */\r\n CardElement.prototype.truncateOverflow = function (_maxHeight) {\r\n // Child implementations should return true if the element handled\r\n // the truncation request such that its content fits within maxHeight,\r\n // false if the element should fall back to being hidden\r\n return false;\r\n };\r\n /*\r\n * This should reverse any changes performed in truncateOverflow().\r\n */\r\n CardElement.prototype.undoOverflowTruncation = function () {\r\n return;\r\n };\r\n CardElement.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition();\r\n };\r\n CardElement.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n return false;\r\n };\r\n CardElement.prototype.getHasBorder = function () {\r\n return false;\r\n };\r\n CardElement.prototype.getPadding = function () {\r\n return this._padding;\r\n };\r\n CardElement.prototype.setPadding = function (value) {\r\n this._padding = value;\r\n };\r\n CardElement.prototype.shouldSerialize = function (context) {\r\n return context.elementRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n };\r\n Object.defineProperty(CardElement.prototype, \"useDefaultSizing\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"separatorOrientation\", {\r\n get: function () {\r\n return Enums.Orientation.Horizontal;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"defaultStyle\", {\r\n get: function () {\r\n return Enums.ContainerStyle.Default;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElement.prototype.parse = function (source, context) {\r\n _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\r\n };\r\n CardElement.prototype.asString = function () {\r\n return \"\";\r\n };\r\n CardElement.prototype.isBleeding = function () {\r\n return false;\r\n };\r\n CardElement.prototype.getEffectiveStyle = function () {\r\n if (this.parent) {\r\n return this.parent.getEffectiveStyle();\r\n }\r\n return this.defaultStyle;\r\n };\r\n CardElement.prototype.getEffectiveStyleDefinition = function () {\r\n return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle());\r\n };\r\n CardElement.prototype.getEffectiveTextStyleDefinition = function () {\r\n if (this.parent) {\r\n return this.parent.getEffectiveTextStyleDefinition();\r\n }\r\n return this.hostConfig.textStyles.default;\r\n };\r\n CardElement.prototype.getForbiddenActionTypes = function () {\r\n return [];\r\n };\r\n CardElement.prototype.getImmediateSurroundingPadding = function (result, processTop, processRight, processBottom, processLeft) {\r\n if (processTop === void 0) { processTop = true; }\r\n if (processRight === void 0) { processRight = true; }\r\n if (processBottom === void 0) { processBottom = true; }\r\n if (processLeft === void 0) { processLeft = true; }\r\n if (this.parent) {\r\n var doProcessTop = processTop && this.parent.isTopElement(this);\r\n var doProcessRight = processRight && this.parent.isRightMostElement(this);\r\n var doProcessBottom = processBottom && this.parent.isBottomElement(this);\r\n var doProcessLeft = processLeft && this.parent.isLeftMostElement(this);\r\n var effectivePadding = this.parent.getEffectivePadding();\r\n if (effectivePadding) {\r\n if (doProcessTop && effectivePadding.top !== Enums.Spacing.None) {\r\n result.top = effectivePadding.top;\r\n doProcessTop = false;\r\n }\r\n if (doProcessRight && effectivePadding.right !== Enums.Spacing.None) {\r\n result.right = effectivePadding.right;\r\n doProcessRight = false;\r\n }\r\n if (doProcessBottom && effectivePadding.bottom !== Enums.Spacing.None) {\r\n result.bottom = effectivePadding.bottom;\r\n doProcessBottom = false;\r\n }\r\n if (doProcessLeft && effectivePadding.left !== Enums.Spacing.None) {\r\n result.left = effectivePadding.left;\r\n doProcessLeft = false;\r\n }\r\n }\r\n if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) {\r\n this.parent.getImmediateSurroundingPadding(result, doProcessTop, doProcessRight, doProcessBottom, doProcessLeft);\r\n }\r\n }\r\n };\r\n CardElement.prototype.getActionCount = function () {\r\n return 0;\r\n };\r\n CardElement.prototype.getActionAt = function (index) {\r\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\r\n };\r\n CardElement.prototype.indexOfAction = function (action) {\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n if (this.getActionAt(i) === action) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n CardElement.prototype.remove = function () {\r\n if (this.parent && this.parent instanceof CardElementContainer) {\r\n return this.parent.removeItem(this);\r\n }\r\n return false;\r\n };\r\n CardElement.prototype.render = function () {\r\n this._renderedElement = this.overrideInternalRender();\r\n this._separatorElement = this.internalRenderSeparator();\r\n if (this._renderedElement) {\r\n if (this.id) {\r\n this._renderedElement.id = this.id;\r\n }\r\n if (this.customCssSelector) {\r\n this._renderedElement.classList.add(this.customCssSelector);\r\n }\r\n this._renderedElement.style.boxSizing = \"border-box\";\r\n this._defaultRenderedElementDisplayMode = this._renderedElement.style.display\r\n ? this._renderedElement.style.display\r\n : undefined;\r\n this.adjustRenderedElementSize(this._renderedElement);\r\n this.updateLayout(false);\r\n }\r\n else if (this.isDesignMode()) {\r\n this._renderedElement = this.createPlaceholderElement();\r\n }\r\n return this._renderedElement;\r\n };\r\n CardElement.prototype.updateLayout = function (_processChildren) {\r\n if (_processChildren === void 0) { _processChildren = true; }\r\n this.updateRenderedElementVisibility();\r\n this.applyPadding();\r\n };\r\n CardElement.prototype.updateActionsEnabledState = function () {\r\n var allActions = this.getRootElement().getAllActions();\r\n for (var _i = 0, allActions_1 = allActions; _i < allActions_1.length; _i++) {\r\n var action = allActions_1[_i];\r\n action.updateEnabledState();\r\n }\r\n };\r\n CardElement.prototype.indexOf = function (_cardElement) {\r\n return -1;\r\n };\r\n CardElement.prototype.isDesignMode = function () {\r\n var rootElement = this.getRootElement();\r\n return rootElement instanceof AdaptiveCard && rootElement.designMode;\r\n };\r\n CardElement.prototype.isFirstElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isLastElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isAtTheVeryLeft = function () {\r\n return this.parent\r\n ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft()\r\n : true;\r\n };\r\n CardElement.prototype.isAtTheVeryRight = function () {\r\n return this.parent\r\n ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight()\r\n : true;\r\n };\r\n CardElement.prototype.isAtTheVeryTop = function () {\r\n return this.parent\r\n ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop()\r\n : true;\r\n };\r\n CardElement.prototype.isAtTheVeryBottom = function () {\r\n return this.parent\r\n ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom()\r\n : true;\r\n };\r\n CardElement.prototype.isBleedingAtTop = function () {\r\n return false;\r\n };\r\n CardElement.prototype.isBleedingAtBottom = function () {\r\n return false;\r\n };\r\n CardElement.prototype.isLeftMostElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isRightMostElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isTopElement = function (element) {\r\n return this.isFirstElement(element);\r\n };\r\n CardElement.prototype.isBottomElement = function (element) {\r\n return this.isLastElement(element);\r\n };\r\n CardElement.prototype.isHiddenDueToOverflow = function () {\r\n return (this._renderedElement !== undefined &&\r\n this._renderedElement.style.visibility === \"hidden\");\r\n };\r\n CardElement.prototype.getRootElement = function () {\r\n return this.getRootObject();\r\n };\r\n CardElement.prototype.getParentContainer = function () {\r\n var currentElement = this.parent;\r\n while (currentElement) {\r\n if (currentElement instanceof Container) {\r\n return currentElement;\r\n }\r\n currentElement = currentElement.parent;\r\n }\r\n return undefined;\r\n };\r\n CardElement.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return [];\r\n };\r\n CardElement.prototype.getAllActions = function () {\r\n var result = [];\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n return result;\r\n };\r\n CardElement.prototype.getResourceInformation = function () {\r\n return [];\r\n };\r\n CardElement.prototype.getElementById = function (id) {\r\n return this.id === id ? this : undefined;\r\n };\r\n CardElement.prototype.getActionById = function (_id) {\r\n return undefined;\r\n };\r\n CardElement.prototype.getElementByIdFromAction = function (id) {\r\n var result = undefined;\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action instanceof ShowCardAction) {\r\n result = action.card.getElementById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n CardElement.prototype.getEffectivePadding = function () {\r\n var padding = this.getPadding();\r\n return padding ? padding : this.getDefaultPadding();\r\n };\r\n CardElement.prototype.getEffectiveHorizontalAlignment = function () {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n if (this.parent) {\r\n return this.parent.getEffectiveHorizontalAlignment();\r\n }\r\n return Enums.HorizontalAlignment.Left;\r\n };\r\n Object.defineProperty(CardElement.prototype, \"hostConfig\", {\r\n get: function () {\r\n if (this._hostConfig) {\r\n return this._hostConfig;\r\n }\r\n else {\r\n if (this.parent) {\r\n return this.parent.hostConfig;\r\n }\r\n else {\r\n return host_config_1.defaultHostConfig;\r\n }\r\n }\r\n },\r\n set: function (value) {\r\n this._hostConfig = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"index\", {\r\n get: function () {\r\n if (this.parent) {\r\n return this.parent.indexOf(this);\r\n }\r\n else {\r\n return 0;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isInteractive\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isStandalone\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isInline\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n if (this.parent && this.separatorElement) {\r\n return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode());\r\n }\r\n else {\r\n return false;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"separatorElement\", {\r\n get: function () {\r\n return this._separatorElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElement.langProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"lang\", true, /^[a-z]{2,3}$/gi);\r\n CardElement.isVisibleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"isVisible\", true);\r\n CardElement.separatorProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"separator\", false);\r\n CardElement.heightProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_1, \"height\", [{ value: \"auto\" }, { value: \"stretch\" }], \"auto\");\r\n CardElement.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"horizontalAlignment\", Enums.HorizontalAlignment);\r\n CardElement.spacingProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"spacing\", Enums.Spacing, Enums.Spacing.Default);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.horizontalAlignmentProperty)\r\n ], CardElement.prototype, \"horizontalAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.spacingProperty)\r\n ], CardElement.prototype, \"spacing\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.separatorProperty)\r\n ], CardElement.prototype, \"separator\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.heightProperty)\r\n ], CardElement.prototype, \"height\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.langProperty)\r\n ], CardElement.prototype, \"lang\", null);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.isVisibleProperty)\r\n ], CardElement.prototype, \"isVisible\", null);\r\n return CardElement;\r\n}(card_object_1.CardObject));\r\nexports.CardElement = CardElement;\r\nvar ActionProperty = /** @class */ (function (_super) {\r\n __extends(ActionProperty, _super);\r\n function ActionProperty(targetVersion, name, forbiddenActionTypes) {\r\n if (forbiddenActionTypes === void 0) { forbiddenActionTypes = []; }\r\n var _this = _super.call(this, targetVersion, name, undefined) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.forbiddenActionTypes = forbiddenActionTypes;\r\n return _this;\r\n }\r\n ActionProperty.prototype.parse = function (sender, source, context) {\r\n var parent = sender;\r\n return context.parseAction(parent, source[this.name], this.forbiddenActionTypes, parent.isDesignMode());\r\n };\r\n ActionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\r\n };\r\n return ActionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nexports.ActionProperty = ActionProperty;\r\nvar BaseTextBlock = /** @class */ (function (_super) {\r\n __extends(BaseTextBlock, _super);\r\n function BaseTextBlock(text) {\r\n var _this = _super.call(this) || this;\r\n _this.ariaHidden = false;\r\n if (text) {\r\n _this.text = text;\r\n }\r\n return _this;\r\n }\r\n BaseTextBlock.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n // selectAction is declared on BaseTextBlock but is only exposed on TextRun,\r\n // so the property is removed from the BaseTextBlock schema.\r\n schema.remove(BaseTextBlock.selectActionProperty);\r\n };\r\n Object.defineProperty(BaseTextBlock.prototype, \"text\", {\r\n get: function () {\r\n return this.getValue(BaseTextBlock.textProperty);\r\n },\r\n set: function (value) {\r\n this.setText(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#endregion\r\n BaseTextBlock.prototype.getFontSize = function (fontType) {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n return fontType.fontSizes.small;\r\n case Enums.TextSize.Medium:\r\n return fontType.fontSizes.medium;\r\n case Enums.TextSize.Large:\r\n return fontType.fontSizes.large;\r\n case Enums.TextSize.ExtraLarge:\r\n return fontType.fontSizes.extraLarge;\r\n default:\r\n return fontType.fontSizes.default;\r\n }\r\n };\r\n BaseTextBlock.prototype.getColorDefinition = function (colorSet, color) {\r\n switch (color) {\r\n case Enums.TextColor.Accent:\r\n return colorSet.accent;\r\n case Enums.TextColor.Dark:\r\n return colorSet.dark;\r\n case Enums.TextColor.Light:\r\n return colorSet.light;\r\n case Enums.TextColor.Good:\r\n return colorSet.good;\r\n case Enums.TextColor.Warning:\r\n return colorSet.warning;\r\n case Enums.TextColor.Attention:\r\n return colorSet.attention;\r\n default:\r\n return colorSet.default;\r\n }\r\n };\r\n BaseTextBlock.prototype.setText = function (value) {\r\n this.setValue(BaseTextBlock.textProperty, value);\r\n };\r\n BaseTextBlock.prototype.init = function (textDefinition) {\r\n this.size = textDefinition.size;\r\n this.weight = textDefinition.weight;\r\n this.color = textDefinition.color;\r\n this.isSubtle = textDefinition.isSubtle;\r\n };\r\n BaseTextBlock.prototype.asString = function () {\r\n return this.text;\r\n };\r\n BaseTextBlock.prototype.applyStylesTo = function (targetElement) {\r\n var fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType);\r\n if (fontType.fontFamily) {\r\n targetElement.style.fontFamily = fontType.fontFamily;\r\n }\r\n var fontSize;\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n fontSize = fontType.fontSizes.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n fontSize = fontType.fontSizes.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n fontSize = fontType.fontSizes.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n fontSize = fontType.fontSizes.extraLarge;\r\n break;\r\n default:\r\n fontSize = fontType.fontSizes.default;\r\n break;\r\n }\r\n targetElement.style.fontSize = fontSize + \"px\";\r\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\r\n var targetColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default);\r\n if (targetColor) {\r\n targetElement.style.color = targetColor;\r\n }\r\n var fontWeight;\r\n switch (this.effectiveWeight) {\r\n case Enums.TextWeight.Lighter:\r\n fontWeight = fontType.fontWeights.lighter;\r\n break;\r\n case Enums.TextWeight.Bolder:\r\n fontWeight = fontType.fontWeights.bolder;\r\n break;\r\n default:\r\n fontWeight = fontType.fontWeights.default;\r\n break;\r\n }\r\n targetElement.style.fontWeight = fontWeight.toString();\r\n if (this.ariaHidden) {\r\n targetElement.setAttribute(\"aria-hidden\", \"true\");\r\n }\r\n };\r\n BaseTextBlock.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveColor\", {\r\n get: function () {\r\n return this.color !== undefined ? this.color : this.getEffectiveTextStyleDefinition().color;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveFontType\", {\r\n get: function () {\r\n return this.fontType !== undefined\r\n ? this.fontType\r\n : this.getEffectiveTextStyleDefinition().fontType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveIsSubtle\", {\r\n get: function () {\r\n return this.isSubtle !== undefined\r\n ? this.isSubtle\r\n : this.getEffectiveTextStyleDefinition().isSubtle;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveSize\", {\r\n get: function () {\r\n return this.size !== undefined ? this.size : this.getEffectiveTextStyleDefinition().size;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveWeight\", {\r\n get: function () {\r\n return this.weight !== undefined\r\n ? this.weight\r\n : this.getEffectiveTextStyleDefinition().weight;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n BaseTextBlock.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"text\", true);\r\n BaseTextBlock.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.TextSize);\r\n BaseTextBlock.weightProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"weight\", Enums.TextWeight);\r\n BaseTextBlock.colorProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"color\", Enums.TextColor);\r\n BaseTextBlock.isSubtleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isSubtle\");\r\n BaseTextBlock.fontTypeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fontType\", Enums.FontType);\r\n BaseTextBlock.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.sizeProperty)\r\n ], BaseTextBlock.prototype, \"size\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.weightProperty)\r\n ], BaseTextBlock.prototype, \"weight\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.colorProperty)\r\n ], BaseTextBlock.prototype, \"color\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.fontTypeProperty)\r\n ], BaseTextBlock.prototype, \"fontType\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.isSubtleProperty)\r\n ], BaseTextBlock.prototype, \"isSubtle\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.textProperty)\r\n ], BaseTextBlock.prototype, \"text\", null);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.selectActionProperty)\r\n ], BaseTextBlock.prototype, \"selectAction\", void 0);\r\n return BaseTextBlock;\r\n}(CardElement));\r\nexports.BaseTextBlock = BaseTextBlock;\r\nvar TextBlock = /** @class */ (function (_super) {\r\n __extends(TextBlock, _super);\r\n function TextBlock() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.wrap = false;\r\n _this._treatAsPlainText = true;\r\n _this.useMarkdown = true;\r\n return _this;\r\n }\r\n TextBlock.prototype.restoreOriginalContent = function () {\r\n var _a, _b;\r\n if (this.renderedElement !== undefined) {\r\n if (this.maxLines && this.maxLines > 0) {\r\n this.renderedElement.style.maxHeight =\r\n this._computedLineHeight * this.maxLines + \"px\";\r\n }\r\n var originalHtml = (_b = (_a = TextBlock._ttRoundtripPolicy) === null || _a === void 0 ? void 0 : _a.createHTML(this._originalInnerHtml)) !== null && _b !== void 0 ? _b : this._originalInnerHtml;\r\n this.renderedElement.innerHTML = originalHtml;\r\n }\r\n };\r\n TextBlock.prototype.truncateIfSupported = function (maxHeight) {\r\n if (this.renderedElement !== undefined) {\r\n // For now, only truncate TextBlocks that contain just a single\r\n // paragraph -- since the maxLines calculation doesn't take into\r\n // account Markdown lists\r\n var children = this.renderedElement.children;\r\n var isTextOnly = !children.length;\r\n var truncationSupported = isTextOnly ||\r\n (children.length === 1 && children[0].tagName.toLowerCase() === \"p\" && !children[0].children.length);\r\n if (truncationSupported) {\r\n var element = isTextOnly ? this.renderedElement : children[0];\r\n Utils.truncateText(element, maxHeight, this._computedLineHeight);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n TextBlock.prototype.setText = function (value) {\r\n _super.prototype.setText.call(this, value);\r\n this._processedText = undefined;\r\n };\r\n TextBlock.prototype.internalRender = function () {\r\n var _this = this;\r\n var _a, _b;\r\n this._processedText = undefined;\r\n if (this.text) {\r\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n var hostConfig = this.hostConfig;\r\n var element = void 0;\r\n if (this.forElementId) {\r\n var labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n element = labelElement;\r\n }\r\n else {\r\n element = document.createElement(\"div\");\r\n }\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textBlock\"));\r\n element.style.overflow = \"hidden\";\r\n this.applyStylesTo(element);\r\n if (this.style === \"heading\") {\r\n element.setAttribute(\"role\", \"heading\");\r\n var headingLevel = this.hostConfig.textBlock.headingLevel;\r\n if (headingLevel !== undefined && headingLevel > 0) {\r\n element.setAttribute(\"aria-level\", headingLevel.toString());\r\n }\r\n }\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n element.onclick = function (e) {\r\n if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n this.selectAction.setupElementForAccessibility(element);\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n if (!this._processedText) {\r\n this._treatAsPlainText = true;\r\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n if (this.useMarkdown && formattedText) {\r\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting) {\r\n formattedText = formattedText\r\n .replace(//g, \"===\")\r\n .replace(/<\\/mark>/g, \"/==/\");\r\n }\r\n var markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText);\r\n if (markdownProcessingResult.didProcess &&\r\n markdownProcessingResult.outputHtml) {\r\n this._processedText = markdownProcessingResult.outputHtml;\r\n this._treatAsPlainText = false;\r\n // Only process tag if markdown processing was applied because\r\n // markdown processing is also responsible for sanitizing the input string\r\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting && this._processedText) {\r\n var markStyle = \"\";\r\n var effectiveStyle = this.getEffectiveStyleDefinition();\r\n if (effectiveStyle.highlightBackgroundColor) {\r\n markStyle +=\r\n \"background-color: \" +\r\n effectiveStyle.highlightBackgroundColor +\r\n \";\";\r\n }\r\n if (effectiveStyle.highlightForegroundColor) {\r\n markStyle +=\r\n \"color: \" + effectiveStyle.highlightForegroundColor + \";\";\r\n }\r\n if (markStyle) {\r\n markStyle = 'style=\"' + markStyle + '\"';\r\n }\r\n this._processedText = this._processedText\r\n .replace(/===/g, \"\")\r\n .replace(/\\/==\\//g, \"\");\r\n }\r\n }\r\n else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n }\r\n else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n }\r\n if (!this._processedText) {\r\n this._processedText = \"\";\r\n }\r\n if (this._treatAsPlainText) {\r\n element.innerText = this._processedText;\r\n }\r\n else {\r\n var processedHtml = (_b = (_a = TextBlock._ttMarkdownPolicy) === null || _a === void 0 ? void 0 : _a.createHTML(this._processedText)) !== null && _b !== void 0 ? _b : this._processedText;\r\n element.innerHTML = processedHtml;\r\n }\r\n if (element.firstElementChild instanceof HTMLElement) {\r\n var firstElementChild = element.firstElementChild;\r\n firstElementChild.style.marginTop = \"0px\";\r\n firstElementChild.style.width = \"100%\";\r\n if (!this.wrap) {\r\n firstElementChild.style.overflow = \"hidden\";\r\n firstElementChild.style.textOverflow = \"ellipsis\";\r\n }\r\n }\r\n if (element.lastElementChild instanceof HTMLElement) {\r\n element.lastElementChild.style.marginBottom = \"0px\";\r\n }\r\n var anchors = element.getElementsByTagName(\"a\");\r\n var _loop_1 = function (anchor) {\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n anchor.target = \"_blank\";\r\n anchor.onclick = function (e) {\r\n if (raiseAnchorClickedEvent(_this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n }\r\n };\r\n anchor.oncontextmenu = function (e) {\r\n if (raiseAnchorClickedEvent(_this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n return false;\r\n }\r\n return true;\r\n };\r\n };\r\n for (var _i = 0, _c = Array.from(anchors); _i < _c.length; _i++) {\r\n var anchor = _c[_i];\r\n _loop_1(anchor);\r\n }\r\n if (this.wrap) {\r\n element.style.wordWrap = \"break-word\";\r\n if (this.maxLines && this.maxLines > 0) {\r\n element.style.overflow = \"hidden\";\r\n if (Utils.isInternetExplorer() || !shared_1.GlobalSettings.useWebkitLineClamp) {\r\n element.style.maxHeight = this._computedLineHeight * this.maxLines + \"px\";\r\n }\r\n else {\r\n // While non standard, --webkit-line-clamp works in every browser (except IE)\r\n // and is a great solution to support the maxLines feature with ellipsis\r\n // truncation. With --webkit-line-clamp there is need to use explicit line heights\r\n element.style.removeProperty(\"line-height\");\r\n element.style.display = \"-webkit-box\";\r\n element.style.webkitBoxOrient = \"vertical\";\r\n element.style.webkitLineClamp = this.maxLines.toString();\r\n }\r\n }\r\n }\r\n else {\r\n element.style.whiteSpace = \"nowrap\";\r\n element.style.textOverflow = \"ellipsis\";\r\n }\r\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation ||\r\n shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n this._originalInnerHtml = element.innerHTML;\r\n }\r\n return element;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n TextBlock.prototype.truncateOverflow = function (maxHeight) {\r\n if (maxHeight >= this._computedLineHeight) {\r\n return this.truncateIfSupported(maxHeight);\r\n }\r\n return false;\r\n };\r\n TextBlock.prototype.undoOverflowTruncation = function () {\r\n this.restoreOriginalContent();\r\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) {\r\n var maxHeight = this._computedLineHeight * this.maxLines;\r\n this.truncateIfSupported(maxHeight);\r\n }\r\n };\r\n TextBlock.prototype.applyStylesTo = function (targetElement) {\r\n _super.prototype.applyStylesTo.call(this, targetElement);\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n targetElement.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n targetElement.style.textAlign = \"end\";\r\n break;\r\n default:\r\n targetElement.style.textAlign = \"start\";\r\n break;\r\n }\r\n var lineHeights = this.hostConfig.lineHeights;\r\n if (lineHeights) {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n this._computedLineHeight = lineHeights.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n this._computedLineHeight = lineHeights.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n this._computedLineHeight = lineHeights.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n this._computedLineHeight = lineHeights.extraLarge;\r\n break;\r\n default:\r\n this._computedLineHeight = lineHeights.default;\r\n break;\r\n }\r\n }\r\n else {\r\n // Looks like 1.33 is the magic number to compute line-height\r\n // from font size.\r\n this._computedLineHeight =\r\n this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) *\r\n 1.33;\r\n }\r\n targetElement.style.lineHeight = this._computedLineHeight + \"px\";\r\n };\r\n TextBlock.prototype.getJsonTypeName = function () {\r\n return \"TextBlock\";\r\n };\r\n TextBlock.prototype.getEffectiveTextStyleDefinition = function () {\r\n if (this.style) {\r\n return this.hostConfig.textStyles.getStyleByName(this.style);\r\n }\r\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\r\n };\r\n TextBlock.prototype.updateLayout = function (processChildren) {\r\n if (processChildren === void 0) { processChildren = false; }\r\n _super.prototype.updateLayout.call(this, processChildren);\r\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) {\r\n // Reset the element's innerHTML in case the available room for\r\n // content has increased\r\n this.restoreOriginalContent();\r\n this.truncateIfSupported(this._computedLineHeight * this.maxLines);\r\n }\r\n };\r\n var _a, _b;\r\n TextBlock.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"wrap\", false);\r\n TextBlock.maxLinesProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLines\");\r\n TextBlock.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"style\", [\r\n { value: \"default\" },\r\n { value: \"columnHeader\" },\r\n { value: \"heading\" }\r\n ]);\r\n // Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely\r\n // processed.\r\n TextBlock._ttMarkdownPolicy = (typeof window === 'undefined') ? undefined : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy(\"adaptivecards#markdownPassthroughPolicy\", { createHTML: function (value) { return value; } });\r\n // When \"advanced\" truncation is enabled (see GlobalSettings.useAdvancedCardBottomTruncation and\r\n // GlobalSettings.useAdvancedTextBlockTruncation), we store the original pre-truncation content in\r\n // _originalInnerHtml so that we can restore/recalculate truncation later if space availability has changed (see\r\n // TextBlock.restoreOriginalContent())\r\n TextBlock._ttRoundtripPolicy = (typeof window === 'undefined') ? undefined : (_b = window.trustedTypes) === null || _b === void 0 ? void 0 : _b.createPolicy(\"adaptivecards#restoreContentsPolicy\", { createHTML: function (value) { return value; } });\r\n __decorate([\r\n (0, serialization_1.property)(TextBlock.wrapProperty)\r\n ], TextBlock.prototype, \"wrap\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextBlock.maxLinesProperty)\r\n ], TextBlock.prototype, \"maxLines\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextBlock.styleProperty)\r\n ], TextBlock.prototype, \"style\", void 0);\r\n return TextBlock;\r\n}(BaseTextBlock));\r\nexports.TextBlock = TextBlock;\r\nvar TextRun = /** @class */ (function (_super) {\r\n __extends(TextRun, _super);\r\n function TextRun() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.italic = false;\r\n _this.strikethrough = false;\r\n _this.highlight = false;\r\n _this.underline = false;\r\n return _this;\r\n }\r\n TextRun.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n schema.add(BaseTextBlock.selectActionProperty);\r\n };\r\n //#endregion\r\n TextRun.prototype.internalRender = function () {\r\n var _this = this;\r\n if (this.text) {\r\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n var hostConfig = this.hostConfig;\r\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n if (!formattedText) {\r\n formattedText = \"\";\r\n }\r\n var element = document.createElement(\"span\");\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textRun\"));\r\n this.applyStylesTo(element);\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n var anchor = document.createElement(\"a\");\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n var href = this.selectAction.getHref();\r\n anchor.href = href ? href : \"\";\r\n anchor.target = \"_blank\";\r\n anchor.onclick = function (e) {\r\n if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n this.selectAction.setupElementForAccessibility(anchor);\r\n anchor.innerText = formattedText;\r\n element.appendChild(anchor);\r\n }\r\n else {\r\n element.innerText = formattedText;\r\n }\r\n return element;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n TextRun.prototype.applyStylesTo = function (targetElement) {\r\n _super.prototype.applyStylesTo.call(this, targetElement);\r\n if (this.italic) {\r\n targetElement.style.fontStyle = \"italic\";\r\n }\r\n if (this.strikethrough) {\r\n targetElement.style.textDecoration = \"line-through\";\r\n }\r\n if (this.highlight) {\r\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\r\n var backgroundColor = Utils.stringToCssColor(this.effectiveIsSubtle\r\n ? colorDefinition.highlightColors.subtle\r\n : colorDefinition.highlightColors.default);\r\n if (backgroundColor) {\r\n targetElement.style.backgroundColor = backgroundColor;\r\n }\r\n }\r\n if (this.underline) {\r\n targetElement.style.textDecoration = \"underline\";\r\n }\r\n };\r\n TextRun.prototype.getJsonTypeName = function () {\r\n return \"TextRun\";\r\n };\r\n Object.defineProperty(TextRun.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TextRun.prototype, \"isInline\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n TextRun.italicProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"italic\", false);\r\n TextRun.strikethroughProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"strikethrough\", false);\r\n TextRun.highlightProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"highlight\", false);\r\n TextRun.underlineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"underline\", false);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.italicProperty)\r\n ], TextRun.prototype, \"italic\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.strikethroughProperty)\r\n ], TextRun.prototype, \"strikethrough\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.highlightProperty)\r\n ], TextRun.prototype, \"highlight\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.underlineProperty)\r\n ], TextRun.prototype, \"underline\", void 0);\r\n return TextRun;\r\n}(BaseTextBlock));\r\nexports.TextRun = TextRun;\r\nvar RichTextBlock = /** @class */ (function (_super) {\r\n __extends(RichTextBlock, _super);\r\n function RichTextBlock() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._inlines = [];\r\n return _this;\r\n }\r\n RichTextBlock.prototype.internalAddInline = function (inline, forceAdd) {\r\n if (forceAdd === void 0) { forceAdd = false; }\r\n if (!inline.isInline) {\r\n throw new Error(strings_1.Strings.errors.elementCannotBeUsedAsInline());\r\n }\r\n var doAdd = inline.parent === undefined || forceAdd;\r\n if (!doAdd && inline.parent !== this) {\r\n throw new Error(strings_1.Strings.errors.inlineAlreadyParented());\r\n }\r\n else {\r\n inline.setParent(this);\r\n this._inlines.push(inline);\r\n }\r\n };\r\n RichTextBlock.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._inlines = [];\r\n if (Array.isArray(source[\"inlines\"])) {\r\n for (var _i = 0, _a = source[\"inlines\"]; _i < _a.length; _i++) {\r\n var jsonInline = _a[_i];\r\n var inline = void 0;\r\n if (typeof jsonInline === \"string\") {\r\n var textRun = new TextRun();\r\n textRun.text = jsonInline;\r\n inline = textRun;\r\n }\r\n else {\r\n // No fallback for inlines in 1.2\r\n inline = context.parseElement(this, jsonInline, [], false);\r\n }\r\n if (inline) {\r\n this.internalAddInline(inline, true);\r\n }\r\n }\r\n }\r\n };\r\n RichTextBlock.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n if (this._inlines.length > 0) {\r\n var jsonInlines = [];\r\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\r\n var inline = _a[_i];\r\n jsonInlines.push(inline.toJSON(context));\r\n }\r\n context.serializeValue(target, \"inlines\", jsonInlines);\r\n }\r\n };\r\n RichTextBlock.prototype.internalRender = function () {\r\n if (this._inlines.length > 0) {\r\n var element = void 0;\r\n if (this.forElementId) {\r\n var labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n element = labelElement;\r\n }\r\n else {\r\n element = document.createElement(\"div\");\r\n }\r\n element.className = this.hostConfig.makeCssClassName(\"ac-richTextBlock\");\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.textAlign = \"end\";\r\n break;\r\n default:\r\n element.style.textAlign = \"start\";\r\n break;\r\n }\r\n var renderedInlines = 0;\r\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\r\n var inline = _a[_i];\r\n var renderedInline = inline.render();\r\n if (renderedInline) {\r\n element.appendChild(renderedInline);\r\n renderedInlines++;\r\n }\r\n }\r\n if (renderedInlines > 0) {\r\n return element;\r\n }\r\n }\r\n return undefined;\r\n };\r\n RichTextBlock.prototype.asString = function () {\r\n var result = \"\";\r\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\r\n var inline = _a[_i];\r\n result += inline.asString();\r\n }\r\n return result;\r\n };\r\n RichTextBlock.prototype.getJsonTypeName = function () {\r\n return \"RichTextBlock\";\r\n };\r\n RichTextBlock.prototype.getInlineCount = function () {\r\n return this._inlines.length;\r\n };\r\n RichTextBlock.prototype.getInlineAt = function (index) {\r\n if (index >= 0 && index < this._inlines.length) {\r\n return this._inlines[index];\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\r\n }\r\n };\r\n RichTextBlock.prototype.addInline = function (inline) {\r\n if (typeof inline === \"string\") {\r\n this.internalAddInline(new TextRun(inline));\r\n }\r\n else {\r\n this.internalAddInline(inline);\r\n }\r\n };\r\n RichTextBlock.prototype.removeInline = function (inline) {\r\n var index = this._inlines.indexOf(inline);\r\n if (index >= 0) {\r\n this._inlines[index].setParent(undefined);\r\n this._inlines.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n };\r\n return RichTextBlock;\r\n}(CardElement));\r\nexports.RichTextBlock = RichTextBlock;\r\nvar Fact = /** @class */ (function (_super) {\r\n __extends(Fact, _super);\r\n function Fact(name, value) {\r\n var _this = _super.call(this) || this;\r\n _this.name = name;\r\n _this.value = value;\r\n return _this;\r\n }\r\n //#endregion\r\n Fact.prototype.getSchemaKey = function () {\r\n return \"Fact\";\r\n };\r\n //#region Schema\r\n Fact.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n Fact.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(Fact.titleProperty)\r\n ], Fact.prototype, \"name\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Fact.valueProperty)\r\n ], Fact.prototype, \"value\", void 0);\r\n return Fact;\r\n}(serialization_1.SerializableObject));\r\nexports.Fact = Fact;\r\nvar FactSet = /** @class */ (function (_super) {\r\n __extends(FactSet, _super);\r\n function FactSet() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(FactSet.prototype, \"useDefaultSizing\", {\r\n //#endregion\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n FactSet.prototype.internalRender = function () {\r\n var element = undefined;\r\n var hostConfig = this.hostConfig;\r\n if (this.facts.length > 0) {\r\n element = document.createElement(\"table\");\r\n element.style.borderWidth = \"0px\";\r\n element.style.borderSpacing = \"0px\";\r\n element.style.borderStyle = \"none\";\r\n element.style.borderCollapse = \"collapse\";\r\n element.style.display = \"block\";\r\n element.style.overflow = \"hidden\";\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-factset\"));\r\n element.setAttribute(\"role\", \"presentation\");\r\n for (var i = 0; i < this.facts.length; i++) {\r\n var trElement = document.createElement(\"tr\");\r\n if (i > 0) {\r\n trElement.style.marginTop = hostConfig.factSet.spacing + \"px\";\r\n }\r\n // Title column\r\n var tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-title\"));\r\n if (hostConfig.factSet.title.maxWidth) {\r\n tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + \"px\";\r\n }\r\n tdElement.style.verticalAlign = \"top\";\r\n var textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text =\r\n !this.facts[i].name && this.isDesignMode() ? \"Title\" : this.facts[i].name;\r\n textBlock.size = hostConfig.factSet.title.size;\r\n textBlock.color = hostConfig.factSet.title.color;\r\n textBlock.isSubtle = hostConfig.factSet.title.isSubtle;\r\n textBlock.weight = hostConfig.factSet.title.weight;\r\n textBlock.wrap = hostConfig.factSet.title.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n // Spacer column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.width = \"10px\";\r\n Utils.appendChild(trElement, tdElement);\r\n // Value column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.style.verticalAlign = \"top\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-value\"));\r\n textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text = this.facts[i].value;\r\n textBlock.size = hostConfig.factSet.value.size;\r\n textBlock.color = hostConfig.factSet.value.color;\r\n textBlock.isSubtle = hostConfig.factSet.value.isSubtle;\r\n textBlock.weight = hostConfig.factSet.value.weight;\r\n textBlock.wrap = hostConfig.factSet.value.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n Utils.appendChild(element, trElement);\r\n }\r\n }\r\n return element;\r\n };\r\n FactSet.prototype.getJsonTypeName = function () {\r\n return \"FactSet\";\r\n };\r\n //#region Schema\r\n FactSet.factsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"facts\", Fact);\r\n __decorate([\r\n (0, serialization_1.property)(FactSet.factsProperty)\r\n ], FactSet.prototype, \"facts\", void 0);\r\n return FactSet;\r\n}(CardElement));\r\nexports.FactSet = FactSet;\r\nvar ImageDimensionProperty = /** @class */ (function (_super) {\r\n __extends(ImageDimensionProperty, _super);\r\n function ImageDimensionProperty(targetVersion, name, internalName, fallbackProperty) {\r\n var _this = _super.call(this, targetVersion, name) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.internalName = internalName;\r\n _this.fallbackProperty = fallbackProperty;\r\n return _this;\r\n }\r\n ImageDimensionProperty.prototype.getInternalName = function () {\r\n return this.internalName;\r\n };\r\n ImageDimensionProperty.prototype.parse = function (sender, source, context) {\r\n var result = undefined;\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n var isValid = false;\r\n if (typeof sourceValue === \"string\") {\r\n try {\r\n var size = shared_1.SizeAndUnit.parse(sourceValue, true);\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n isValid = true;\r\n }\r\n }\r\n catch (_a) {\r\n // Swallow the exception\r\n }\r\n // If the source value isn't valid per this property definition,\r\n // check its validity per the fallback property, if specified\r\n if (!isValid && this.fallbackProperty) {\r\n isValid = this.fallbackProperty.isValidValue(sourceValue, context);\r\n }\r\n }\r\n if (!isValid) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\r\n }\r\n return result;\r\n };\r\n ImageDimensionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\r\n };\r\n return ImageDimensionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nvar Image = /** @class */ (function (_super) {\r\n __extends(Image, _super);\r\n function Image() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.size = Enums.Size.Auto;\r\n _this.style = Enums.ImageStyle.Default;\r\n return _this;\r\n }\r\n Image.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n schema.remove(CardElement.heightProperty);\r\n };\r\n //#endregion\r\n Image.prototype.applySize = function (element) {\r\n if (this.pixelWidth || this.pixelHeight) {\r\n if (this.pixelWidth) {\r\n element.style.width = this.pixelWidth + \"px\";\r\n }\r\n if (this.pixelHeight) {\r\n element.style.height = this.pixelHeight + \"px\";\r\n }\r\n }\r\n else {\r\n if (this.maxHeight) {\r\n // If the image is constrained in height, we set its height property and\r\n // auto and stretch are ignored (default to medium). THis is necessary for\r\n // ImageSet which uses a maximum image height as opposed to the cards width\r\n // as a constraining dimension\r\n switch (this.size) {\r\n case Enums.Size.Small:\r\n element.style.height = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.height = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n default:\r\n element.style.height = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n element.style.maxHeight = this.maxHeight + \"px\";\r\n }\r\n else {\r\n switch (this.size) {\r\n case Enums.Size.Stretch:\r\n element.style.width = \"100%\";\r\n break;\r\n case Enums.Size.Auto:\r\n element.style.maxWidth = \"100%\";\r\n break;\r\n case Enums.Size.Small:\r\n element.style.width = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.width = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n case Enums.Size.Medium:\r\n element.style.width = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n element.style.maxHeight = \"100%\";\r\n }\r\n }\r\n };\r\n Object.defineProperty(Image.prototype, \"useDefaultSizing\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Image.prototype.internalRender = function () {\r\n var _this = this;\r\n var element = undefined;\r\n if (this.url) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"flex-start\";\r\n // Cache hostConfig to avoid walking the parent hierarchy multiple times\r\n var hostConfig = this.hostConfig;\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n var imageElement = document.createElement(\"img\");\r\n this.renderedImageElement = imageElement;\r\n imageElement.onload = function (_e) {\r\n raiseImageLoadedEvent(_this);\r\n };\r\n imageElement.onerror = function (_e) {\r\n if (_this.renderedElement) {\r\n var card = _this.getRootElement();\r\n clearElement(_this.renderedElement);\r\n if (card && card.designMode) {\r\n var errorElement = document.createElement(\"div\");\r\n errorElement.style.display = \"flex\";\r\n errorElement.style.alignItems = \"center\";\r\n errorElement.style.justifyContent = \"center\";\r\n errorElement.style.backgroundColor = \"#EEEEEE\";\r\n errorElement.style.color = \"black\";\r\n errorElement.innerText = \":-(\";\r\n errorElement.style.padding = \"10px\";\r\n _this.applySize(errorElement);\r\n _this.renderedElement.appendChild(errorElement);\r\n }\r\n }\r\n raiseImageLoadedEvent(_this);\r\n };\r\n imageElement.style.minWidth = \"0\";\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-image\"));\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n imageElement.onkeypress = function (e) {\r\n if (_this.selectAction &&\r\n _this.selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")) {\r\n // enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n imageElement.onclick = function (e) {\r\n if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n this.selectAction.setupElementForAccessibility(imageElement);\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n this.applySize(imageElement);\r\n if (this.style === Enums.ImageStyle.Person) {\r\n imageElement.style.borderRadius = \"50%\";\r\n imageElement.style.backgroundPosition = \"50% 50%\";\r\n imageElement.style.backgroundRepeat = \"no-repeat\";\r\n }\r\n var backgroundColor = Utils.stringToCssColor(this.backgroundColor);\r\n if (backgroundColor) {\r\n imageElement.style.backgroundColor = backgroundColor;\r\n }\r\n this.setImageSource(imageElement);\r\n var altTextProperty = this.preProcessPropertyValue(Image.altTextProperty);\r\n if (altTextProperty) {\r\n imageElement.alt = altTextProperty;\r\n }\r\n element.appendChild(imageElement);\r\n }\r\n return element;\r\n };\r\n Image.prototype.getJsonTypeName = function () {\r\n return \"Image\";\r\n };\r\n Image.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n return result;\r\n };\r\n Image.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result && this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n return result;\r\n };\r\n Image.prototype.getResourceInformation = function () {\r\n return this.url ? [{ url: this.url, mimeType: \"image\" }] : [];\r\n };\r\n Image.prototype.setImageSource = function (imageElement) {\r\n var imageForceLoader = new ImageForceLoader(this.forceLoad, this.url);\r\n imageForceLoader.configureImage(this);\r\n imageElement.src = this.preProcessPropertyValue(Image.urlProperty);\r\n imageForceLoader.resetImage(this);\r\n };\r\n Image.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\r\n Image.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"altText\");\r\n Image.backgroundColorProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"backgroundColor\");\r\n Image.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.ImageStyle, Enums.ImageStyle.Default);\r\n Image.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.Size, Enums.Size.Auto);\r\n Image.pixelWidthProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"width\", \"pixelWidth\");\r\n Image.pixelHeightProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"height\", \"pixelHeight\", CardElement.heightProperty);\r\n Image.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n Image.shouldForceLoadProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, \"forceLoad\", false);\r\n __decorate([\r\n (0, serialization_1.property)(Image.urlProperty)\r\n ], Image.prototype, \"url\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.altTextProperty)\r\n ], Image.prototype, \"altText\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.backgroundColorProperty)\r\n ], Image.prototype, \"backgroundColor\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.sizeProperty)\r\n ], Image.prototype, \"size\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.styleProperty)\r\n ], Image.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.pixelWidthProperty)\r\n ], Image.prototype, \"pixelWidth\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.pixelHeightProperty)\r\n ], Image.prototype, \"pixelHeight\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.selectActionProperty)\r\n ], Image.prototype, \"selectAction\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.shouldForceLoadProperty)\r\n ], Image.prototype, \"forceLoad\", void 0);\r\n return Image;\r\n}(CardElement));\r\nexports.Image = Image;\r\n// configures Image element to fetch a new image data from url source instead of relying on cache\r\n// currently rudimentary refreshing scheme is used\r\n// by attaching unique query string to url, we bypass the cache usage\r\nvar ImageForceLoader = /** @class */ (function () {\r\n function ImageForceLoader(doForceLoad, url) {\r\n this.doForceLoad = doForceLoad;\r\n this.url = url;\r\n if (url && url.length && doForceLoad) {\r\n // we can do better by appending unique key such as uuid instead of epoch\r\n // however the current usage is for front-end ui and networking, \r\n // since ui is running in single main thread, this is sufficient mechanism\r\n // without needing to depend on external library for our small use cases.\r\n this.uniqueHash = '?' + Date.now();\r\n this.urlWithForceLoadOption = url + this.uniqueHash;\r\n }\r\n }\r\n ImageForceLoader.prototype.configureImage = function (image) {\r\n if (this.urlWithForceLoadOption && this.urlWithForceLoadOption.length) {\r\n image.url = this.urlWithForceLoadOption;\r\n }\r\n };\r\n ImageForceLoader.prototype.resetImage = function (image) {\r\n image.url = this.url;\r\n };\r\n return ImageForceLoader;\r\n}());\r\nvar CardElementContainer = /** @class */ (function (_super) {\r\n __extends(CardElementContainer, _super);\r\n function CardElementContainer() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.allowVerticalOverflow = false;\r\n return _this;\r\n }\r\n CardElementContainer.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n if (!this.isSelectable) {\r\n schema.remove(CardElementContainer.selectActionProperty);\r\n }\r\n };\r\n //#endregion\r\n CardElementContainer.prototype.isElementAllowed = function (element) {\r\n return this.hostConfig.supportsInteractivity || !element.isInteractive;\r\n };\r\n CardElementContainer.prototype.applyPadding = function () {\r\n _super.prototype.applyPadding.call(this);\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n var physicalPadding = new shared_1.SpacingDefinition();\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\r\n }\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n };\r\n Object.defineProperty(CardElementContainer.prototype, \"isSelectable\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElementContainer.prototype.forbiddenChildElements = function () {\r\n return [];\r\n };\r\n CardElementContainer.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).releaseDOMResources();\r\n }\r\n };\r\n CardElementContainer.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n var item = this.getItemAt(i);\r\n if (!this.hostConfig.supportsInteractivity && item.isInteractive) {\r\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\r\n }\r\n if (!this.isElementAllowed(item)) {\r\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(item.getJsonTypeName()));\r\n }\r\n item.internalValidateProperties(context);\r\n }\r\n if (this._selectAction) {\r\n this._selectAction.internalValidateProperties(context);\r\n }\r\n };\r\n CardElementContainer.prototype.render = function () {\r\n var _this = this;\r\n var element = _super.prototype.render.call(this);\r\n if (element) {\r\n var hostConfig = this.hostConfig;\r\n if (this.allowVerticalOverflow) {\r\n element.style.overflowX = \"hidden\";\r\n element.style.overflowY = \"auto\";\r\n }\r\n if (element &&\r\n this.isSelectable &&\r\n this._selectAction &&\r\n hostConfig.supportsInteractivity) {\r\n element.onclick = function (e) {\r\n if (_this._selectAction && _this._selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this._selectAction.execute();\r\n }\r\n };\r\n element.onkeypress = function (e) {\r\n if (_this._selectAction &&\r\n _this._selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")) {\r\n // Enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this._selectAction.execute();\r\n }\r\n };\r\n this._selectAction.setupElementForAccessibility(element);\r\n if (this._selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n }\r\n return element;\r\n };\r\n CardElementContainer.prototype.updateLayout = function (processChildren) {\r\n if (processChildren === void 0) { processChildren = true; }\r\n _super.prototype.updateLayout.call(this, processChildren);\r\n if (processChildren) {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).updateLayout();\r\n }\r\n }\r\n };\r\n CardElementContainer.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n var result = [];\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result.push.apply(result, this.getItemAt(i).getAllInputs(processActions));\r\n }\r\n return result;\r\n };\r\n CardElementContainer.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result.push.apply(result, this.getItemAt(i).getAllActions());\r\n }\r\n if (this._selectAction) {\r\n result.push(this._selectAction);\r\n }\r\n return result;\r\n };\r\n CardElementContainer.prototype.getResourceInformation = function () {\r\n var result = [];\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result.push.apply(result, this.getItemAt(i).getResourceInformation());\r\n }\r\n return result;\r\n };\r\n CardElementContainer.prototype.getElementById = function (id) {\r\n var result = _super.prototype.getElementById.call(this, id);\r\n if (!result) {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result = this.getItemAt(i).getElementById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CardElementContainer.prototype.findDOMNodeOwner = function (node) {\r\n var _a;\r\n var target = undefined;\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n // recur through child elements\r\n target = this.getItemAt(i).findDOMNodeOwner(node);\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n // If not found in children, check the actions\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n target = (_a = this.getActionAt(i)) === null || _a === void 0 ? void 0 : _a.findDOMNodeOwner(node);\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n // if not found in children or actions, defer to parent implementation\r\n return _super.prototype.findDOMNodeOwner.call(this, node);\r\n };\r\n CardElementContainer.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n __decorate([\r\n (0, serialization_1.property)(CardElementContainer.selectActionProperty)\r\n ], CardElementContainer.prototype, \"_selectAction\", void 0);\r\n return CardElementContainer;\r\n}(CardElement));\r\nexports.CardElementContainer = CardElementContainer;\r\nvar ImageSet = /** @class */ (function (_super) {\r\n __extends(ImageSet, _super);\r\n function ImageSet() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._images = [];\r\n _this.imageSize = Enums.ImageSize.Medium;\r\n _this.presentationStyle = Enums.ImageSetPresentationStyle.Default;\r\n _this.pixelOffset = 0;\r\n return _this;\r\n }\r\n //#endregion\r\n ImageSet.prototype.internalRender = function () {\r\n var element = undefined;\r\n if (this._images.length > 0) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.flexWrap = \"wrap\";\r\n for (var _i = 0, _a = this._images; _i < _a.length; _i++) {\r\n var image = _a[_i];\r\n switch (this.imageSize) {\r\n case Enums.ImageSize.Small:\r\n image.size = Enums.Size.Small;\r\n break;\r\n case Enums.ImageSize.Large:\r\n image.size = Enums.Size.Large;\r\n break;\r\n default:\r\n image.size = Enums.Size.Medium;\r\n break;\r\n }\r\n image.maxHeight = this.hostConfig.imageSet.maxImageHeight;\r\n var renderedImage = image.render();\r\n if (renderedImage) {\r\n renderedImage.style.display = \"inline-flex\";\r\n renderedImage.style.margin = \"0px\";\r\n if (this.presentationStyle == Enums.ImageSetPresentationStyle.Default) {\r\n renderedImage.style.marginRight = \"10px\";\r\n }\r\n Utils.appendChild(element, renderedImage);\r\n }\r\n }\r\n if (this.presentationStyle == Enums.ImageSetPresentationStyle.Stacked) {\r\n this.applyStackedPresentationStyle();\r\n }\r\n }\r\n return element;\r\n };\r\n ImageSet.prototype.applyStackedPresentationStyle = function () {\r\n if (this._images[0].renderedImageElement) {\r\n var dimension = StackedImageConfigurator.parseNumericPixelDimension(this._images[0].renderedImageElement.style.height);\r\n var bgColor = this.getEffectiveBackgroundColor();\r\n if (dimension) {\r\n var stackedImageConfigurator = new StackedImageConfigurator(this.pixelOffset, dimension, bgColor);\r\n stackedImageConfigurator.configureImagesArrayAsStackedLayout(this._images);\r\n }\r\n }\r\n };\r\n ImageSet.prototype.getEffectiveBackgroundColor = function () {\r\n var parentContainer = this.getParentContainer();\r\n var style = parentContainer === null || parentContainer === void 0 ? void 0 : parentContainer.getEffectiveStyle();\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\r\n return Utils.stringToCssColor(styleDefinition.backgroundColor);\r\n };\r\n ImageSet.prototype.getItemCount = function () {\r\n return this._images.length;\r\n };\r\n ImageSet.prototype.getItemAt = function (index) {\r\n return this._images[index];\r\n };\r\n ImageSet.prototype.getFirstVisibleRenderedItem = function () {\r\n return this._images && this._images.length > 0 ? this._images[0] : undefined;\r\n };\r\n ImageSet.prototype.getLastVisibleRenderedItem = function () {\r\n return this._images && this._images.length > 0\r\n ? this._images[this._images.length - 1]\r\n : undefined;\r\n };\r\n ImageSet.prototype.removeItem = function (item) {\r\n if (item instanceof Image) {\r\n var itemIndex = this._images.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._images.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n ImageSet.prototype.getJsonTypeName = function () {\r\n return \"ImageSet\";\r\n };\r\n ImageSet.prototype.addImage = function (image) {\r\n if (!image.parent) {\r\n this._images.push(image);\r\n image.setParent(this);\r\n }\r\n else {\r\n throw new Error(\"This image already belongs to another ImageSet\");\r\n }\r\n };\r\n ImageSet.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1;\r\n };\r\n ImageSet.imagesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"images\", Image, function (sender, item) {\r\n item.setParent(sender);\r\n });\r\n ImageSet.imageSizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"imageSize\", Enums.ImageSize, Enums.ImageSize.Medium);\r\n ImageSet.imagePresentationStyle = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"style\", Enums.ImageSetPresentationStyle, Enums.ImageSetPresentationStyle.Default);\r\n ImageSet.pixelOffset = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"offset\", 0, undefined);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.imagesProperty)\r\n ], ImageSet.prototype, \"_images\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.imageSizeProperty)\r\n ], ImageSet.prototype, \"imageSize\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.imagePresentationStyle)\r\n ], ImageSet.prototype, \"presentationStyle\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.pixelOffset)\r\n ], ImageSet.prototype, \"pixelOffset\", void 0);\r\n return ImageSet;\r\n}(CardElementContainer));\r\nexports.ImageSet = ImageSet;\r\nvar StackedImageConfigurator = /** @class */ (function () {\r\n function StackedImageConfigurator(offset, dimension, style) {\r\n this.sign45 = 0.7071;\r\n this.maxImageCounts = 2;\r\n this.offset = 0;\r\n this.normalizationConstant = 0;\r\n this.border = 5;\r\n this.dimension = 0;\r\n this.dimension = dimension;\r\n this.normalizationConstant = (dimension * this.sign45 - 0.5 * dimension) * 2;\r\n // offset determines how far images are placed from each other\r\n // at zero, images are separated only by the border\r\n // there is no restriction on how far they are apart in positive values, their actual\r\n // positioning is limited by maximum size imposed by Image renderer\r\n // a negative value can decrease upto the diameter of the image since a value less than the diameter\r\n // put the images past each other, and the use of such value is not reasonable request\r\n // users should change image positions in such case.\r\n this.offset = this.sign45 * (Math.max(offset, -dimension) - this.normalizationConstant);\r\n this.style = style ? style : \"\";\r\n }\r\n StackedImageConfigurator.prototype.moveImageRight = function (element) {\r\n element.style.marginLeft = this.offset + \"px\";\r\n };\r\n StackedImageConfigurator.prototype.moveImageUp = function (element) {\r\n element.style.marginBottom = this.offset + this.dimension + \"px\";\r\n };\r\n StackedImageConfigurator.prototype.moveImageDown = function (element) {\r\n element.style.marginTop = this.offset + this.dimension + \"px\";\r\n };\r\n StackedImageConfigurator.prototype.makeImageRound = function (element) {\r\n element.style.borderRadius = \"50%\";\r\n element.style.backgroundPosition = \"50% 50%\";\r\n element.style.backgroundRepeat = \"no-repeat\";\r\n };\r\n StackedImageConfigurator.prototype.applyBorder = function (element) {\r\n element.style.height = (this.dimension + this.border * 2) + \"px\";\r\n element.style.border = this.border + \"px\" + \" solid \" + this.style;\r\n };\r\n StackedImageConfigurator.prototype.configureImageForBottomLeft = function (element) {\r\n this.moveImageDown(element);\r\n this.makeImageRound(element);\r\n this.applyBorder(element);\r\n element.style.zIndex = \"2\";\r\n };\r\n StackedImageConfigurator.prototype.configureImageForTopRight = function (element) {\r\n this.moveImageUp(element);\r\n this.moveImageRight(element);\r\n this.makeImageRound(element);\r\n element.style.zIndex = \"1\";\r\n };\r\n // stacked layout is applied when there are two images in ImageSet,\r\n // first image in the ImageSet is put bottom left of ImageSet,\r\n // second image is placed top right diagonally to the first image at 45 angle\r\n // first image is placed over the second image should the overlap to occur.\r\n StackedImageConfigurator.prototype.configureImagesArrayAsStackedLayout = function (elements) {\r\n if (elements.length == 1) {\r\n if (elements[0].renderedImageElement) {\r\n this.makeImageRound(elements[0].renderedImageElement);\r\n }\r\n }\r\n else if (elements.length <= this.maxImageCounts) {\r\n if (elements[0].renderedImageElement && elements[1].renderedImageElement) {\r\n this.configureImageForBottomLeft(elements[0].renderedImageElement);\r\n this.configureImageForTopRight(elements[1].renderedImageElement);\r\n }\r\n }\r\n };\r\n StackedImageConfigurator.parseNumericPixelDimension = function (dimension) {\r\n if ((dimension === null || dimension === void 0 ? void 0 : dimension.substring(dimension.length - 2)) == 'px') {\r\n return parseInt(dimension.substring(0, dimension.length - 2));\r\n }\r\n return undefined;\r\n };\r\n return StackedImageConfigurator;\r\n}());\r\nvar ContentSource = /** @class */ (function (_super) {\r\n __extends(ContentSource, _super);\r\n //#endregion\r\n function ContentSource(url, mimeType) {\r\n var _this = _super.call(this) || this;\r\n _this.url = url;\r\n _this.mimeType = mimeType;\r\n return _this;\r\n }\r\n ContentSource.prototype.isValid = function () {\r\n return this.mimeType && this.url ? true : false;\r\n };\r\n //#region Schema\r\n ContentSource.mimeTypeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"mimeType\");\r\n ContentSource.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"url\");\r\n __decorate([\r\n (0, serialization_1.property)(ContentSource.mimeTypeProperty)\r\n ], ContentSource.prototype, \"mimeType\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ContentSource.urlProperty)\r\n ], ContentSource.prototype, \"url\", void 0);\r\n return ContentSource;\r\n}(serialization_1.SerializableObject));\r\nexports.ContentSource = ContentSource;\r\nvar CaptionSource = /** @class */ (function (_super) {\r\n __extends(CaptionSource, _super);\r\n //#endregion\r\n function CaptionSource(url, mimeType, label) {\r\n var _this = _super.call(this, url, mimeType) || this;\r\n _this.label = label;\r\n return _this;\r\n }\r\n CaptionSource.prototype.getSchemaKey = function () {\r\n return \"CaptionSource\";\r\n };\r\n CaptionSource.prototype.render = function () {\r\n var result = undefined;\r\n if (this.isValid()) {\r\n result = document.createElement(\"track\");\r\n result.src = this.url;\r\n result.kind = \"captions\";\r\n result.label = this.label;\r\n }\r\n return result;\r\n };\r\n //#region Schema\r\n CaptionSource.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"label\");\r\n __decorate([\r\n (0, serialization_1.property)(CaptionSource.labelProperty)\r\n ], CaptionSource.prototype, \"label\", void 0);\r\n return CaptionSource;\r\n}(ContentSource));\r\nexports.CaptionSource = CaptionSource;\r\nvar MediaSource = /** @class */ (function (_super) {\r\n __extends(MediaSource, _super);\r\n function MediaSource() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n MediaSource.prototype.getSchemaKey = function () {\r\n return \"MediaSource\";\r\n };\r\n MediaSource.prototype.render = function () {\r\n var result = undefined;\r\n if (this.isValid()) {\r\n result = document.createElement(\"source\");\r\n result.src = this.url;\r\n result.type = this.mimeType;\r\n }\r\n return result;\r\n };\r\n return MediaSource;\r\n}(ContentSource));\r\nexports.MediaSource = MediaSource;\r\nvar MediaPlayer = /** @class */ (function () {\r\n function MediaPlayer() {\r\n }\r\n MediaPlayer.prototype.play = function () {\r\n // Do nothing in base implementation\r\n };\r\n Object.defineProperty(MediaPlayer.prototype, \"posterUrl\", {\r\n get: function () {\r\n return this._posterUrl;\r\n },\r\n set: function (value) {\r\n this._posterUrl = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaPlayer.prototype, \"selectedMediaType\", {\r\n get: function () {\r\n return undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return MediaPlayer;\r\n}());\r\nexports.MediaPlayer = MediaPlayer;\r\nvar HTML5MediaPlayer = /** @class */ (function (_super) {\r\n __extends(HTML5MediaPlayer, _super);\r\n function HTML5MediaPlayer(owner) {\r\n var _this = _super.call(this) || this;\r\n _this.owner = owner;\r\n _this._selectedSources = [];\r\n _this._captionSources = [];\r\n _this.processSources();\r\n return _this;\r\n }\r\n HTML5MediaPlayer.prototype.processSources = function () {\r\n var _a;\r\n this._selectedSources = [];\r\n this._captionSources = [];\r\n this._selectedMediaType = undefined;\r\n for (var _i = 0, _b = this.owner.sources; _i < _b.length; _i++) {\r\n var source = _b[_i];\r\n var mimeComponents = source.mimeType ? source.mimeType.split(\"/\") : [];\r\n if (mimeComponents.length === 2) {\r\n if (!this._selectedMediaType) {\r\n var index = HTML5MediaPlayer.supportedMediaTypes.indexOf(mimeComponents[0]);\r\n if (index >= 0) {\r\n this._selectedMediaType = HTML5MediaPlayer.supportedMediaTypes[index];\r\n }\r\n }\r\n if (mimeComponents[0] === this._selectedMediaType) {\r\n this._selectedSources.push(source);\r\n }\r\n }\r\n }\r\n (_a = this._captionSources).push.apply(_a, this.owner.captionSources);\r\n };\r\n HTML5MediaPlayer.prototype.canPlay = function () {\r\n return this._selectedSources.length > 0;\r\n };\r\n HTML5MediaPlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n HTML5MediaPlayer.prototype.render = function () {\r\n if (this._selectedMediaType === \"video\") {\r\n this._mediaElement = document.createElement(\"video\");\r\n }\r\n else {\r\n this._mediaElement = document.createElement(\"audio\");\r\n }\r\n this._mediaElement.setAttribute(\"aria-label\", this.owner.altText ? this.owner.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\r\n this._mediaElement.setAttribute(\"webkit-playsinline\", \"\");\r\n this._mediaElement.setAttribute(\"playsinline\", \"\");\r\n // We enable crossorigin for cases where the caption file has a different domain than\r\n // the video file. If the caption file lives in a different domain than the video file\r\n // and crossorigin is not set, then the caption file will fail to load.\r\n this._mediaElement.setAttribute(\"crossorigin\", \"\");\r\n this._mediaElement.autoplay = true;\r\n this._mediaElement.controls = true;\r\n if (Utils.isMobileOS()) {\r\n this._mediaElement.muted = true;\r\n }\r\n this._mediaElement.preload = \"none\";\r\n this._mediaElement.style.width = \"100%\";\r\n for (var _i = 0, _a = this.owner.sources; _i < _a.length; _i++) {\r\n var source = _a[_i];\r\n var renderedSource = source.render();\r\n Utils.appendChild(this._mediaElement, renderedSource);\r\n }\r\n for (var _b = 0, _c = this.owner.captionSources; _b < _c.length; _b++) {\r\n var captionSource = _c[_b];\r\n if (captionSource.mimeType == \"vtt\") {\r\n var renderedCaptionSource = captionSource.render();\r\n Utils.appendChild(this._mediaElement, renderedCaptionSource);\r\n }\r\n }\r\n return this._mediaElement;\r\n };\r\n HTML5MediaPlayer.prototype.play = function () {\r\n if (this._mediaElement) {\r\n this._mediaElement.play();\r\n }\r\n };\r\n Object.defineProperty(HTML5MediaPlayer.prototype, \"selectedMediaType\", {\r\n get: function () {\r\n return this._selectedMediaType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n HTML5MediaPlayer.supportedMediaTypes = [\"audio\", \"video\"];\r\n return HTML5MediaPlayer;\r\n}(MediaPlayer));\r\nexports.HTML5MediaPlayer = HTML5MediaPlayer;\r\nvar CustomMediaPlayer = /** @class */ (function (_super) {\r\n __extends(CustomMediaPlayer, _super);\r\n function CustomMediaPlayer(matches) {\r\n return _super.call(this) || this;\r\n }\r\n return CustomMediaPlayer;\r\n}(MediaPlayer));\r\nexports.CustomMediaPlayer = CustomMediaPlayer;\r\nvar IFrameMediaMediaPlayer = /** @class */ (function (_super) {\r\n __extends(IFrameMediaMediaPlayer, _super);\r\n function IFrameMediaMediaPlayer(matches, iFrameTitle) {\r\n var _this = _super.call(this, matches) || this;\r\n _this.iFrameTitle = iFrameTitle;\r\n if (matches.length >= 2) {\r\n _this._videoId = matches[1];\r\n }\r\n return _this;\r\n }\r\n IFrameMediaMediaPlayer.prototype.canPlay = function () {\r\n return this._videoId !== undefined;\r\n };\r\n IFrameMediaMediaPlayer.prototype.render = function () {\r\n var container = document.createElement(\"div\");\r\n container.style.position = \"relative\";\r\n container.style.width = \"100%\";\r\n container.style.height = \"0\";\r\n container.style.paddingBottom = \"56.25%\";\r\n var iFrame = document.createElement(\"iframe\");\r\n iFrame.style.position = \"absolute\";\r\n iFrame.style.top = \"0\";\r\n iFrame.style.left = \"0\";\r\n iFrame.style.width = \"100%\";\r\n iFrame.style.height = \"100%\";\r\n iFrame.src = this.getEmbedVideoUrl();\r\n iFrame.frameBorder = \"0\";\r\n if (this.iFrameTitle) {\r\n iFrame.title = this.iFrameTitle;\r\n }\r\n iFrame.allow =\r\n \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\";\r\n iFrame.allowFullscreen = true;\r\n container.appendChild(iFrame);\r\n return container;\r\n };\r\n Object.defineProperty(IFrameMediaMediaPlayer.prototype, \"videoId\", {\r\n get: function () {\r\n return this._videoId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return IFrameMediaMediaPlayer;\r\n}(CustomMediaPlayer));\r\nexports.IFrameMediaMediaPlayer = IFrameMediaMediaPlayer;\r\nvar VimeoPlayer = /** @class */ (function (_super) {\r\n __extends(VimeoPlayer, _super);\r\n function VimeoPlayer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n VimeoPlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var oEmbedUrl, response, json;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n oEmbedUrl = \"https://vimeo.com/api/oembed.json?url=\".concat(this.getEmbedVideoUrl());\r\n return [4 /*yield*/, fetch(oEmbedUrl)];\r\n case 1:\r\n response = _a.sent();\r\n if (!response.ok) return [3 /*break*/, 3];\r\n return [4 /*yield*/, response.json()];\r\n case 2:\r\n json = _a.sent();\r\n this.posterUrl = json[\"thumbnail_url\"];\r\n _a.label = 3;\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n VimeoPlayer.prototype.getEmbedVideoUrl = function () {\r\n return \"https://player.vimeo.com/video/\".concat(this.videoId, \"?autoplay=1\");\r\n };\r\n return VimeoPlayer;\r\n}(IFrameMediaMediaPlayer));\r\nexports.VimeoPlayer = VimeoPlayer;\r\nvar DailymotionPlayer = /** @class */ (function (_super) {\r\n __extends(DailymotionPlayer, _super);\r\n function DailymotionPlayer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DailymotionPlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var apiUrl, response, json;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n apiUrl = \"https://api.dailymotion.com/video/\".concat(this.videoId, \"?fields=thumbnail_720_url\");\r\n return [4 /*yield*/, fetch(apiUrl)];\r\n case 1:\r\n response = _a.sent();\r\n if (!response.ok) return [3 /*break*/, 3];\r\n return [4 /*yield*/, response.json()];\r\n case 2:\r\n json = _a.sent();\r\n this.posterUrl = json[\"thumbnail_720_url\"];\r\n _a.label = 3;\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n DailymotionPlayer.prototype.getEmbedVideoUrl = function () {\r\n return \"https://www.dailymotion.com/embed/video/\".concat(this.videoId, \"?autoplay=1\");\r\n };\r\n return DailymotionPlayer;\r\n}(IFrameMediaMediaPlayer));\r\nexports.DailymotionPlayer = DailymotionPlayer;\r\nvar YouTubePlayer = /** @class */ (function (_super) {\r\n __extends(YouTubePlayer, _super);\r\n function YouTubePlayer(matches, iFrameTitle) {\r\n var _this = _super.call(this, matches, iFrameTitle) || this;\r\n _this.iFrameTitle = iFrameTitle;\r\n if (matches.length >= 3 && matches[2] !== undefined) {\r\n _this._startTimeIndex = parseInt(matches[2]);\r\n }\r\n return _this;\r\n }\r\n YouTubePlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n this.posterUrl = this.videoId\r\n ? \"https://img.youtube.com/vi/\".concat(this.videoId, \"/maxresdefault.jpg\")\r\n : undefined;\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n YouTubePlayer.prototype.getEmbedVideoUrl = function () {\r\n var url = \"https://www.youtube.com/embed/\".concat(this.videoId, \"?autoplay=1\");\r\n if (this._startTimeIndex !== undefined) {\r\n url += \"&start=\".concat(this._startTimeIndex);\r\n }\r\n return url;\r\n };\r\n return YouTubePlayer;\r\n}(IFrameMediaMediaPlayer));\r\nexports.YouTubePlayer = YouTubePlayer;\r\nvar Media = /** @class */ (function (_super) {\r\n __extends(Media, _super);\r\n function Media() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.sources = [];\r\n _this.captionSources = [];\r\n return _this;\r\n }\r\n Media.prototype.createMediaPlayer = function () {\r\n for (var _i = 0, _a = Media.customMediaPlayers; _i < _a.length; _i++) {\r\n var provider = _a[_i];\r\n for (var _b = 0, _c = this.sources; _b < _c.length; _b++) {\r\n var source = _c[_b];\r\n if (source.url) {\r\n for (var _d = 0, _f = provider.urlPatterns; _d < _f.length; _d++) {\r\n var pattern = _f[_d];\r\n var matches = pattern.exec(source.url);\r\n if (matches !== null) {\r\n return provider.createMediaPlayer(matches);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return new HTML5MediaPlayer(this);\r\n };\r\n Media.prototype.handlePlayButtonInvoke = function (event) {\r\n if (this.hostConfig.media.allowInlinePlayback) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n if (this.renderedElement) {\r\n var mediaPlayerElement = this._mediaPlayer.render();\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(mediaPlayerElement);\r\n this._mediaPlayer.play();\r\n mediaPlayerElement.focus();\r\n }\r\n }\r\n else {\r\n if (Media.onPlay) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n Media.onPlay(this);\r\n }\r\n }\r\n };\r\n Media.prototype.displayPoster = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var playButtonArrowWidth, playButtonArrowHeight, posterRootElement_1, posterUrl, posterImageElement_1, playButtonOuterElement, playButtonInnerElement, playButtonContainer;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n if (this.renderedElement) {\r\n playButtonArrowWidth = 12;\r\n playButtonArrowHeight = 15;\r\n posterRootElement_1 = document.createElement(\"div\");\r\n posterRootElement_1.className = this.hostConfig.makeCssClassName(\"ac-media-poster\");\r\n posterRootElement_1.setAttribute(\"role\", \"contentinfo\");\r\n posterRootElement_1.setAttribute(\"aria-label\", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\r\n posterRootElement_1.style.position = \"relative\";\r\n posterRootElement_1.style.display = \"flex\";\r\n posterUrl = this.poster ? this.poster : this._mediaPlayer.posterUrl;\r\n if (!posterUrl) {\r\n posterUrl = this.hostConfig.media.defaultPoster;\r\n }\r\n if (posterUrl) {\r\n posterImageElement_1 = document.createElement(\"img\");\r\n posterImageElement_1.style.width = \"100%\";\r\n posterImageElement_1.style.height = \"100%\";\r\n posterImageElement_1.setAttribute(\"role\", \"presentation\");\r\n posterImageElement_1.onerror = function (_e) {\r\n if (posterImageElement_1.parentNode) {\r\n posterImageElement_1.parentNode.removeChild(posterImageElement_1);\r\n }\r\n posterRootElement_1.classList.add(\"empty\");\r\n posterRootElement_1.style.minHeight = \"150px\";\r\n };\r\n posterImageElement_1.src = posterUrl;\r\n posterRootElement_1.appendChild(posterImageElement_1);\r\n }\r\n else {\r\n posterRootElement_1.classList.add(\"empty\");\r\n posterRootElement_1.style.minHeight = \"150px\";\r\n }\r\n if (this.hostConfig.supportsInteractivity && this._mediaPlayer.canPlay()) {\r\n playButtonOuterElement = document.createElement(\"div\");\r\n playButtonOuterElement.tabIndex = 0;\r\n playButtonOuterElement.setAttribute(\"role\", \"button\");\r\n playButtonOuterElement.setAttribute(\"aria-label\", strings_1.Strings.defaults.mediaPlayerPlayMedia());\r\n playButtonOuterElement.className =\r\n this.hostConfig.makeCssClassName(\"ac-media-playButton\");\r\n playButtonOuterElement.style.display = \"flex\";\r\n playButtonOuterElement.style.alignItems = \"center\";\r\n playButtonOuterElement.style.justifyContent = \"center\";\r\n playButtonOuterElement.onclick = function (e) {\r\n _this.handlePlayButtonInvoke(e);\r\n };\r\n playButtonOuterElement.onkeypress = function (e) {\r\n if (e.code === \"Enter\" || e.code === \"Space\") {\r\n // space or enter\r\n _this.handlePlayButtonInvoke(e);\r\n }\r\n };\r\n playButtonInnerElement = document.createElement(\"div\");\r\n playButtonInnerElement.className = this.hostConfig.makeCssClassName(\"ac-media-playButton-arrow\");\r\n playButtonInnerElement.style.width = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.height = playButtonArrowHeight + \"px\";\r\n playButtonInnerElement.style.borderTopWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderBottomWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.borderRightWidth = \"0\";\r\n playButtonInnerElement.style.borderStyle = \"solid\";\r\n playButtonInnerElement.style.borderTopColor = \"transparent\";\r\n playButtonInnerElement.style.borderRightColor = \"transparent\";\r\n playButtonInnerElement.style.borderBottomColor = \"transparent\";\r\n playButtonInnerElement.style.transform =\r\n \"translate(\" + playButtonArrowWidth / 10 + \"px,0px)\";\r\n playButtonOuterElement.appendChild(playButtonInnerElement);\r\n playButtonContainer = document.createElement(\"div\");\r\n playButtonContainer.style.position = \"absolute\";\r\n playButtonContainer.style.left = \"0\";\r\n playButtonContainer.style.top = \"0\";\r\n playButtonContainer.style.width = \"100%\";\r\n playButtonContainer.style.height = \"100%\";\r\n playButtonContainer.style.display = \"flex\";\r\n playButtonContainer.style.justifyContent = \"center\";\r\n playButtonContainer.style.alignItems = \"center\";\r\n playButtonContainer.appendChild(playButtonOuterElement);\r\n posterRootElement_1.appendChild(playButtonContainer);\r\n }\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(posterRootElement_1);\r\n }\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n Media.prototype.internalRender = function () {\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-media\");\r\n return element;\r\n };\r\n Media.prototype.render = function () {\r\n var _this = this;\r\n var result = _super.prototype.render.call(this);\r\n if (result) {\r\n this._mediaPlayer = this.createMediaPlayer();\r\n this._mediaPlayer.fetchVideoDetails().then(function () { return _this.displayPoster(); });\r\n }\r\n return result;\r\n };\r\n Media.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this.displayPoster();\r\n };\r\n Media.prototype.getJsonTypeName = function () {\r\n return \"Media\";\r\n };\r\n Media.prototype.getResourceInformation = function () {\r\n var result = [];\r\n if (this._mediaPlayer) {\r\n var posterUrl = this.poster ? this.poster : this.hostConfig.media.defaultPoster;\r\n if (posterUrl) {\r\n result.push({ url: posterUrl, mimeType: \"image\" });\r\n }\r\n }\r\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\r\n var mediaSource = _a[_i];\r\n if (mediaSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `mediaSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: mediaSource.url,\r\n mimeType: mediaSource.mimeType\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n for (var _b = 0, _c = this.captionSources; _b < _c.length; _b++) {\r\n var captionSource = _c[_b];\r\n if (captionSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `captionSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: captionSource.url,\r\n mimeType: captionSource.mimeType\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(Media.prototype, \"selectedMediaType\", {\r\n get: function () {\r\n return this._mediaPlayer.selectedMediaType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Media.customMediaPlayers = [\r\n {\r\n urlPatterns: [\r\n /^(?:https?:\\/\\/)?(?:www.)?youtube.com\\/watch\\?(?=.*v=([\\w\\d-_]+))(?=(?:.*t=(\\d+))?).*/gi,\r\n /^(?:https?:\\/\\/)?youtu.be\\/([\\w\\d-_]+)(?:\\?t=(\\d+))?/gi\r\n ],\r\n createMediaPlayer: function (matches) {\r\n return new YouTubePlayer(matches, strings_1.Strings.defaults.youTubeVideoPlayer());\r\n }\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?vimeo.com\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: function (matches) {\r\n return new VimeoPlayer(matches, strings_1.Strings.defaults.vimeoVideoPlayer());\r\n }\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?(?:www.)?dailymotion.com\\/video\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: function (matches) {\r\n return new DailymotionPlayer(matches, strings_1.Strings.defaults.dailymotionVideoPlayer());\r\n }\r\n }\r\n ];\r\n //#region Schema\r\n Media.sourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_1, \"sources\", MediaSource);\r\n Media.captionSourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_6, \"captionSources\", CaptionSource);\r\n Media.posterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"poster\");\r\n Media.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"altText\");\r\n __decorate([\r\n (0, serialization_1.property)(Media.sourcesProperty)\r\n ], Media.prototype, \"sources\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Media.captionSourcesProperty)\r\n ], Media.prototype, \"captionSources\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Media.posterProperty)\r\n ], Media.prototype, \"poster\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Media.altTextProperty)\r\n ], Media.prototype, \"altText\", void 0);\r\n return Media;\r\n}(CardElement));\r\nexports.Media = Media;\r\nvar InputEventType;\r\n(function (InputEventType) {\r\n InputEventType[InputEventType[\"InitialRender\"] = 0] = \"InitialRender\";\r\n InputEventType[InputEventType[\"MouseEnterOnCard\"] = 1] = \"MouseEnterOnCard\";\r\n InputEventType[InputEventType[\"MouseLeaveOnCard\"] = 2] = \"MouseLeaveOnCard\";\r\n InputEventType[InputEventType[\"FocusLeave\"] = 3] = \"FocusLeave\";\r\n})(InputEventType || (InputEventType = {}));\r\nvar Input = /** @class */ (function (_super) {\r\n __extends(Input, _super);\r\n function Input() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.inputStyle = Enums.InputStyle.Default;\r\n return _this;\r\n }\r\n Input.prototype.getAllLabelIds = function () {\r\n var labelIds = [];\r\n if (this.labelledBy) {\r\n labelIds.push(this.labelledBy);\r\n }\r\n if (this._renderedLabelElement) {\r\n labelIds.push(this._renderedLabelElement.id);\r\n }\r\n if (this._renderedErrorMessageElement) {\r\n labelIds.push(this._renderedErrorMessageElement.id);\r\n }\r\n return labelIds;\r\n };\r\n Input.prototype.updateInputControlAriaLabelledBy = function () {\r\n if (this._renderedInputControlElement) {\r\n var labelIds = this.getAllLabelIds();\r\n if (labelIds.length > 0) {\r\n this._renderedInputControlElement.setAttribute(\"aria-labelledby\", labelIds.join(\" \"));\r\n }\r\n else {\r\n this._renderedInputControlElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n };\r\n Object.defineProperty(Input.prototype, \"isNullable\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Input.prototype, \"renderedInputControlElement\", {\r\n get: function () {\r\n return this._renderedInputControlElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Input.prototype, \"inputControlContainerElement\", {\r\n get: function () {\r\n return this._inputControlContainerElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Input.prototype.overrideInternalRender = function () {\r\n var _this = this;\r\n var hostConfig = this.hostConfig;\r\n this._outerContainerElement = document.createElement(\"div\");\r\n this._outerContainerElement.style.display = \"flex\";\r\n if (this.labelPosition === Enums.InputLabelPosition.Inline) {\r\n this._outerContainerElement.style.flexDirection = \"row\";\r\n }\r\n else {\r\n this._outerContainerElement.style.flexDirection = \"column\";\r\n }\r\n var renderedInputControlId = Utils.generateUniqueId();\r\n if (this.label) {\r\n var labelRichTextBlock = new RichTextBlock();\r\n labelRichTextBlock.setParent(this);\r\n labelRichTextBlock.forElementId = renderedInputControlId;\r\n var labelInline = new TextRun(this.label);\r\n labelRichTextBlock.addInline(labelInline);\r\n if (this.isRequired) {\r\n labelInline.init(hostConfig.inputs.label.requiredInputs);\r\n var isRequiredCueInline = new TextRun(hostConfig.inputs.label.requiredInputs.suffix);\r\n isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor;\r\n isRequiredCueInline.ariaHidden = true;\r\n labelRichTextBlock.addInline(isRequiredCueInline);\r\n }\r\n else {\r\n labelInline.init(hostConfig.inputs.label.optionalInputs);\r\n }\r\n this._renderedLabelElement = labelRichTextBlock.render();\r\n if (this._renderedLabelElement) {\r\n this._renderedLabelElement.id = Utils.generateUniqueId();\r\n if (this.labelPosition === Enums.InputLabelPosition.Inline) {\r\n // For inline label position: label should be in center of the div and no extra spacing needed\r\n this._renderedLabelElement.style.alignSelf = \"center\";\r\n }\r\n else {\r\n this._renderedLabelElement.style.marginBottom =\r\n hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + \"px\";\r\n }\r\n this._outerContainerElement.appendChild(this._renderedLabelElement);\r\n }\r\n }\r\n this._inputControlContainerElement = document.createElement(\"div\");\r\n this._inputControlContainerElement.className =\r\n hostConfig.makeCssClassName(\"ac-input-container\");\r\n this._inputControlContainerElement.style.display = \"flex\";\r\n if (this.height === \"stretch\") {\r\n this._inputControlContainerElement.style.alignItems = \"stretch\";\r\n this._inputControlContainerElement.style.flex = \"1 1 auto\";\r\n }\r\n this._renderedInputControlElement = this.internalRender();\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.id = renderedInputControlId;\r\n this._renderedInputControlElement.style.minWidth = \"0px\";\r\n if (this.isNullable && this.isRequired) {\r\n this._renderedInputControlElement.setAttribute(\"aria-required\", \"true\");\r\n this._renderedInputControlElement.classList.add(hostConfig.makeCssClassName(\"ac-input-required\"));\r\n }\r\n this._inputControlContainerElement.appendChild(this._renderedInputControlElement);\r\n this._outerContainerElement.appendChild(this._inputControlContainerElement);\r\n if (this._renderedLabelElement && this.labelPosition === Enums.InputLabelPosition.Inline) {\r\n if (!this.labelWidth) {\r\n var defaultLabelWidth = hostConfig.inputs.label.width;\r\n this._renderedLabelElement.style.width = defaultLabelWidth.toString() + \"%\";\r\n this._inputControlContainerElement.style.width = (100 - defaultLabelWidth) + \"%\";\r\n }\r\n else if (this.labelWidth.unit == Enums.SizeUnit.Weight) {\r\n var labelWidthInPercent = this.labelWidth.physicalSize;\r\n this._renderedLabelElement.style.width = labelWidthInPercent.toString() + \"%\";\r\n this._inputControlContainerElement.style.width = (100 - labelWidthInPercent).toString() + \"%\";\r\n }\r\n else if (this.labelWidth.unit == Enums.SizeUnit.Pixel) {\r\n var labelWidthInPixel = this.labelWidth.physicalSize;\r\n this._renderedLabelElement.style.width = labelWidthInPixel.toString() + \"px\";\r\n }\r\n }\r\n this.updateVisualState(InputEventType.InitialRender);\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.onblur = function (ev) {\r\n _this.updateVisualState(InputEventType.FocusLeave);\r\n };\r\n }\r\n this.updateInputControlAriaLabelledBy();\r\n return this._outerContainerElement;\r\n }\r\n this.resetDirtyState();\r\n return undefined;\r\n };\r\n Input.prototype.valueChanged = function () {\r\n this.getRootElement().updateActionsEnabledState();\r\n if (this.isValid()) {\r\n this.resetValidationFailureCue();\r\n }\r\n if (this.onValueChanged) {\r\n this.onValueChanged(this);\r\n }\r\n raiseInputValueChangedEvent(this);\r\n };\r\n Input.prototype.resetValidationFailureCue = function () {\r\n if (this.renderedInputControlElement) {\r\n if (this instanceof ChoiceSetInput && this.isDynamicTypeahead()) {\r\n this.removeValidationFailureCue();\r\n }\r\n else {\r\n this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n }\r\n this.updateInputControlAriaLabelledBy();\r\n if (this._renderedErrorMessageElement) {\r\n this._outerContainerElement.removeChild(this._renderedErrorMessageElement);\r\n this._renderedErrorMessageElement = undefined;\r\n }\r\n }\r\n };\r\n Input.prototype.showValidationErrorMessage = function () {\r\n if (this.renderedElement &&\r\n this.errorMessage &&\r\n shared_1.GlobalSettings.displayInputValidationErrors) {\r\n var errorMessageTextBlock = new TextBlock();\r\n errorMessageTextBlock.setParent(this);\r\n errorMessageTextBlock.text = this.errorMessage;\r\n errorMessageTextBlock.wrap = true;\r\n errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage);\r\n this._renderedErrorMessageElement = errorMessageTextBlock.render();\r\n if (this._renderedErrorMessageElement) {\r\n this._renderedErrorMessageElement.id = Utils.generateUniqueId();\r\n this._outerContainerElement.appendChild(this._renderedErrorMessageElement);\r\n this.updateInputControlAriaLabelledBy();\r\n }\r\n }\r\n };\r\n Object.defineProperty(Input.prototype, \"allowRevealOnHoverStyle\", {\r\n get: function () {\r\n return this.hostConfig.inputs && this.hostConfig.inputs.allowRevealOnHoverStyle;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Input.prototype.shouldHideInputAdornersForRevealOnHover = function (input, eventType) {\r\n // show/hide input adorners (date picker, time picker, select dropdown picker) with inputStyle RevealOnHover\r\n // 1. intial render of card: hide input adorners\r\n // 2. mouse hover on the card: show input adorners\r\n // 3. mouse hover outside the card: hide input adorners unless input is still in focus state\r\n // 4. input loses focus: hide the input adorners unless mouse is still hovering on the card\r\n // check if input still has the focus\r\n var isInputInFocus = input === document.activeElement;\r\n // check if mouse is still on the card\r\n var inputHoverClassName = this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onhover\");\r\n var isMouseOverCard = input.classList.contains(inputHoverClassName);\r\n var hideInputAdorners = (eventType === InputEventType.InitialRender) ||\r\n (eventType === InputEventType.FocusLeave && !isMouseOverCard) ||\r\n (eventType === InputEventType.MouseLeaveOnCard && !isInputInFocus);\r\n return hideInputAdorners;\r\n };\r\n Input.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle ||\r\n !this._renderedInputControlElement ||\r\n this.inputStyle !== Enums.InputStyle.RevealOnHover) {\r\n return;\r\n }\r\n if (eventType === InputEventType.InitialRender) {\r\n // on initial render, we will show input fields as read only view\r\n this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onrender\"));\r\n }\r\n else if (eventType === InputEventType.MouseEnterOnCard) {\r\n // on hover on the card, we will reveal the inputs by showing borders etc\r\n // ac-inputStyle-revealOnHover-onhover class is also used to identify if mouse is hovering on the card\r\n this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onhover\"));\r\n }\r\n else if (eventType === InputEventType.MouseLeaveOnCard) {\r\n this._renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onhover\"));\r\n }\r\n };\r\n Input.prototype.focus = function () {\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.focus();\r\n }\r\n };\r\n Input.prototype.isValid = function () {\r\n return true;\r\n };\r\n Input.prototype.isDirty = function () {\r\n return this.value !== this._oldValue;\r\n };\r\n Input.prototype.resetDirtyState = function () {\r\n this._oldValue = this.value;\r\n };\r\n Input.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.id) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.inputsMustHaveUniqueId());\r\n }\r\n if (this.isRequired) {\r\n if (!this.label) {\r\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveLabel, \"Required inputs should have a label\");\r\n }\r\n if (!this.errorMessage) {\r\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage, \"Required inputs should have an error message\");\r\n }\r\n }\r\n };\r\n Input.prototype.validateValue = function () {\r\n this.resetValidationFailureCue();\r\n var result = this.isRequired ? this.isSet() && this.isValid() : this.isValid();\r\n if (!result && this.renderedInputControlElement) {\r\n if (this instanceof ChoiceSetInput && this.isDynamicTypeahead()) {\r\n this.showValidationFailureCue();\r\n }\r\n else {\r\n this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n }\r\n this.showValidationErrorMessage();\r\n }\r\n return result;\r\n };\r\n Input.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return [this];\r\n };\r\n Input.prototype.render = function () {\r\n var result = _super.prototype.render.call(this);\r\n this.resetDirtyState();\r\n return result;\r\n };\r\n Object.defineProperty(Input.prototype, \"isInteractive\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n Input.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"label\", true);\r\n Input.isRequiredProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"isRequired\", false);\r\n Input.errorMessageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"errorMessage\", true);\r\n Input.inputStyleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"inputStyle\", Enums.InputStyle, Enums.InputStyle.Default, [\r\n { value: Enums.InputStyle.RevealOnHover },\r\n { value: Enums.InputStyle.Default }\r\n ]);\r\n Input.labelWidthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_6, \"labelWidth\", function (sender, prop, source, context) {\r\n var result = prop.defaultValue;\r\n var value = source[prop.name];\r\n var invalidLabelWidth = false;\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight);\r\n if (result.physicalSize < 0 || result.physicalSize > 100) {\r\n invalidLabelWidth = true;\r\n }\r\n }\r\n else if (typeof value === \"string\") {\r\n try {\r\n result = shared_1.SizeAndUnit.parse(value);\r\n }\r\n catch (e) {\r\n invalidLabelWidth = true;\r\n }\r\n }\r\n else {\r\n invalidLabelWidth = true;\r\n }\r\n if (invalidLabelWidth) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidInputLabelWidth());\r\n result = undefined;\r\n }\r\n return result;\r\n }, function (sender, property, target, value, context) {\r\n if (value instanceof shared_1.SizeAndUnit) {\r\n if (value.unit === Enums.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"labelWidth\", value.physicalSize + \"px\");\r\n }\r\n else {\r\n context.serializeNumber(target, \"labelWidth\", value.physicalSize);\r\n }\r\n }\r\n }, undefined);\r\n Input.labelPositionProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"labelPosition\", Enums.InputLabelPosition, Enums.InputLabelPosition.Above, [\r\n { value: Enums.InputLabelPosition.Inline },\r\n { value: Enums.InputLabelPosition.Above }\r\n ]);\r\n __decorate([\r\n (0, serialization_1.property)(Input.labelProperty)\r\n ], Input.prototype, \"label\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.isRequiredProperty)\r\n ], Input.prototype, \"isRequired\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.errorMessageProperty)\r\n ], Input.prototype, \"errorMessage\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.inputStyleProperty)\r\n ], Input.prototype, \"inputStyle\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.labelWidthProperty)\r\n ], Input.prototype, \"labelWidth\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.labelPositionProperty)\r\n ], Input.prototype, \"labelPosition\", void 0);\r\n return Input;\r\n}(CardElement));\r\nexports.Input = Input;\r\nvar TextInput = /** @class */ (function (_super) {\r\n __extends(TextInput, _super);\r\n function TextInput() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.isMultiline = false;\r\n _this.style = Enums.InputTextStyle.Text;\r\n return _this;\r\n }\r\n //#endregion\r\n TextInput.prototype.setupInput = function (input) {\r\n var _this = this;\r\n input.style.flex = \"1 1 auto\";\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.placeholder) {\r\n input.placeholder = this.placeholder;\r\n input.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n if (this.defaultValue) {\r\n input.value = this.defaultValue;\r\n }\r\n if (this.maxLength && this.maxLength > 0) {\r\n input.maxLength = this.maxLength;\r\n }\r\n input.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n input.onkeypress = function (e) {\r\n // Ctrl+Enter pressed\r\n if (e.ctrlKey &&\r\n e.code === \"Enter\" &&\r\n _this.inlineAction &&\r\n _this.inlineAction.isEffectivelyEnabled()) {\r\n _this.inlineAction.execute();\r\n }\r\n };\r\n };\r\n TextInput.prototype.internalRender = function () {\r\n var result;\r\n if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {\r\n result = document.createElement(\"textarea\");\r\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\", \"ac-multiline\");\r\n if (this.height === \"stretch\") {\r\n result.style.height = \"initial\";\r\n }\r\n }\r\n else {\r\n result = document.createElement(\"input\");\r\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\");\r\n result.type = Enums.InputTextStyle[this.style].toLowerCase();\r\n }\r\n this.setupInput(result);\r\n return result;\r\n };\r\n TextInput.prototype.overrideInternalRender = function () {\r\n var _this = this;\r\n var renderedInputControl = _super.prototype.overrideInternalRender.call(this);\r\n if (this.inlineAction) {\r\n var button_1 = document.createElement(\"button\");\r\n button_1.className = this.hostConfig.makeCssClassName(this.inlineAction.isEffectivelyEnabled()\r\n ? \"ac-inlineActionButton\"\r\n : \"ac-inlineActionButton-disabled\");\r\n button_1.onclick = function (e) {\r\n if (_this.inlineAction && _this.inlineAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.inlineAction.execute();\r\n }\r\n };\r\n if (this.inlineAction.iconUrl) {\r\n button_1.classList.add(\"iconOnly\");\r\n var icon_1 = document.createElement(\"img\");\r\n icon_1.style.height = \"100%\";\r\n icon_1.setAttribute(\"role\", \"presentation\");\r\n // The below trick is necessary as a workaround in Chrome where the icon is initially displayed\r\n // at its native size then resized to 100% of the button's height. This cfreates an unpleasant\r\n // flicker. On top of that, Chrome's flex implementation fails to prperly re-layout the button\r\n // after the image has loaded and been gicven its final size. The below trick also fixes that.\r\n icon_1.style.display = \"none\";\r\n icon_1.onload = function () {\r\n icon_1.style.removeProperty(\"display\");\r\n };\r\n icon_1.onerror = function () {\r\n button_1.removeChild(icon_1);\r\n button_1.classList.remove(\"iconOnly\");\r\n button_1.classList.add(\"textOnly\");\r\n button_1.textContent =\r\n _this.inlineAction && _this.inlineAction.title\r\n ? _this.inlineAction.title\r\n : strings_1.Strings.defaults.inlineActionTitle();\r\n };\r\n icon_1.src = this.inlineAction.iconUrl;\r\n button_1.appendChild(icon_1);\r\n button_1.title = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : strings_1.Strings.defaults.inlineActionTitle();\r\n }\r\n else {\r\n button_1.classList.add(\"textOnly\");\r\n button_1.textContent = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : strings_1.Strings.defaults.inlineActionTitle();\r\n }\r\n this.inlineAction.setupElementForAccessibility(button_1, true);\r\n button_1.style.marginLeft = \"8px\";\r\n this.inputControlContainerElement.appendChild(button_1);\r\n }\r\n return renderedInputControl;\r\n };\r\n TextInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n if (!(this.inlineAction || this.isMultiline)) {\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n }\r\n };\r\n TextInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Text\";\r\n };\r\n TextInput.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n if (this.inlineAction) {\r\n result.push(this.inlineAction);\r\n }\r\n return result;\r\n };\r\n TextInput.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result && this.inlineAction) {\r\n result = this.inlineAction.getActionById(id);\r\n }\r\n return result;\r\n };\r\n TextInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n TextInput.prototype.isValid = function () {\r\n if (!this.value) {\r\n return true;\r\n }\r\n if (this.regex) {\r\n return new RegExp(this.regex, \"g\").test(this.value);\r\n }\r\n return true;\r\n };\r\n Object.defineProperty(TextInput.prototype, \"value\", {\r\n get: function () {\r\n if (this.renderedInputControlElement) {\r\n if (this.isMultiline) {\r\n return this.renderedInputControlElement.value;\r\n }\r\n else {\r\n return this.renderedInputControlElement.value;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n TextInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n TextInput.maxLengthProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLength\");\r\n TextInput.isMultilineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiline\", false);\r\n TextInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n TextInput.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.InputTextStyle, Enums.InputTextStyle.Text, [\r\n { value: Enums.InputTextStyle.Text },\r\n { value: Enums.InputTextStyle.Tel },\r\n { value: Enums.InputTextStyle.Url },\r\n { value: Enums.InputTextStyle.Email },\r\n { value: Enums.InputTextStyle.Password, targetVersion: serialization_1.Versions.v1_5 }\r\n ]);\r\n TextInput.inlineActionProperty = new ActionProperty(serialization_1.Versions.v1_0, \"inlineAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n TextInput.regexProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"regex\", true);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.valueProperty)\r\n ], TextInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.maxLengthProperty)\r\n ], TextInput.prototype, \"maxLength\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.isMultilineProperty)\r\n ], TextInput.prototype, \"isMultiline\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.placeholderProperty)\r\n ], TextInput.prototype, \"placeholder\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.styleProperty)\r\n ], TextInput.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.inlineActionProperty)\r\n ], TextInput.prototype, \"inlineAction\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.regexProperty)\r\n ], TextInput.prototype, \"regex\", void 0);\r\n return TextInput;\r\n}(Input));\r\nexports.TextInput = TextInput;\r\nvar ToggleInput = /** @class */ (function (_super) {\r\n __extends(ToggleInput, _super);\r\n function ToggleInput() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.valueOn = \"true\";\r\n _this.valueOff = \"false\";\r\n _this.wrap = false;\r\n return _this;\r\n }\r\n ToggleInput.prototype.updateInputControlAriaLabelledBy = function () {\r\n if (this._checkboxInputElement) {\r\n var joinedLabelIds = this.getAllLabelIds().join(\" \");\r\n if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) {\r\n joinedLabelIds += \" \" + this._checkboxInputLabelElement.id;\r\n }\r\n if (joinedLabelIds) {\r\n this._checkboxInputElement.setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n }\r\n else {\r\n this._checkboxInputElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n };\r\n ToggleInput.prototype.internalRender = function () {\r\n var _this = this;\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-toggleInput\");\r\n element.style.width = \"100%\";\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"center\";\r\n this._checkboxInputElement = document.createElement(\"input\");\r\n this._checkboxInputElement.id = Utils.generateUniqueId();\r\n this._checkboxInputElement.type = \"checkbox\";\r\n this._checkboxInputElement.style.display = \"inline-block\";\r\n this._checkboxInputElement.style.verticalAlign = \"middle\";\r\n this._checkboxInputElement.style.margin = \"0\";\r\n this._checkboxInputElement.style.flex = \"0 0 auto\";\r\n if (this.title) {\r\n this._checkboxInputElement.setAttribute(\"aria-label\", this.title);\r\n }\r\n if (this.isRequired) {\r\n this._checkboxInputElement.setAttribute(\"aria-required\", \"true\");\r\n }\r\n this._checkboxInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.defaultValue === this.valueOn) {\r\n this._checkboxInputElement.checked = true;\r\n }\r\n this._oldCheckboxValue = this._checkboxInputElement.checked;\r\n this._checkboxInputElement.onchange = function () {\r\n _this.valueChanged();\r\n };\r\n Utils.appendChild(element, this._checkboxInputElement);\r\n if (this.title || this.isDesignMode()) {\r\n var label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = this._checkboxInputElement.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = !this.title ? this.getJsonTypeName() : this.title;\r\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n this._checkboxInputLabelElement = label.render();\r\n if (this._checkboxInputLabelElement) {\r\n this._checkboxInputLabelElement.id = Utils.generateUniqueId();\r\n this._checkboxInputLabelElement.style.display = \"inline-block\";\r\n this._checkboxInputLabelElement.style.flex = \"1 1 auto\";\r\n this._checkboxInputLabelElement.style.marginLeft = \"6px\";\r\n this._checkboxInputLabelElement.style.verticalAlign = \"middle\";\r\n var spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n Utils.appendChild(element, spacerElement);\r\n Utils.appendChild(element, this._checkboxInputLabelElement);\r\n }\r\n }\r\n return element;\r\n };\r\n Object.defineProperty(ToggleInput.prototype, \"isNullable\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ToggleInput.prototype.updateVisualState = function (eventType) {\r\n };\r\n ToggleInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Toggle\";\r\n };\r\n ToggleInput.prototype.focus = function () {\r\n if (this._checkboxInputElement) {\r\n this._checkboxInputElement.focus();\r\n }\r\n };\r\n ToggleInput.prototype.isSet = function () {\r\n if (this.isRequired) {\r\n return this.value === this.valueOn;\r\n }\r\n return this.value ? true : false;\r\n };\r\n ToggleInput.prototype.isDirty = function () {\r\n return this._checkboxInputElement\r\n ? this._checkboxInputElement.checked !== this._oldCheckboxValue\r\n : false;\r\n };\r\n Object.defineProperty(ToggleInput.prototype, \"value\", {\r\n get: function () {\r\n if (this._checkboxInputElement) {\r\n return this._checkboxInputElement.checked ? this.valueOn : this.valueOff;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ToggleInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n ToggleInput.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n ToggleInput.valueOnProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOn\", true, undefined, \"true\", function (sender) {\r\n return \"true\";\r\n });\r\n ToggleInput.valueOffProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOff\", true, undefined, \"false\", function (sender) {\r\n return \"false\";\r\n });\r\n ToggleInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.valueProperty)\r\n ], ToggleInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.titleProperty)\r\n ], ToggleInput.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.valueOnProperty)\r\n ], ToggleInput.prototype, \"valueOn\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.valueOffProperty)\r\n ], ToggleInput.prototype, \"valueOff\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.wrapProperty)\r\n ], ToggleInput.prototype, \"wrap\", void 0);\r\n return ToggleInput;\r\n}(Input));\r\nexports.ToggleInput = ToggleInput;\r\nvar Choice = /** @class */ (function (_super) {\r\n __extends(Choice, _super);\r\n function Choice(title, value) {\r\n var _this = _super.call(this) || this;\r\n _this.title = title;\r\n _this.value = value;\r\n return _this;\r\n }\r\n //#endregion\r\n Choice.prototype.getSchemaKey = function () {\r\n return \"Choice\";\r\n };\r\n //#region Schema\r\n Choice.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n Choice.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(Choice.titleProperty)\r\n ], Choice.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Choice.valueProperty)\r\n ], Choice.prototype, \"value\", void 0);\r\n return Choice;\r\n}(serialization_1.SerializableObject));\r\nexports.Choice = Choice;\r\n/**\r\n * DataQuery class is declared later in the file and derives from subsequent base classes\r\n * Hence, it cannot be used in ChoiceSetInput.\r\n * Refactor is needed to separate elements and actions in separate files.\r\n */\r\nvar ChoiceSetInputDataQuery = /** @class */ (function (_super) {\r\n __extends(ChoiceSetInputDataQuery, _super);\r\n function ChoiceSetInputDataQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n ChoiceSetInputDataQuery.prototype.getSchemaKey = function () {\r\n return \"choices.data\";\r\n };\r\n //#region Schema\r\n ChoiceSetInputDataQuery.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"type\", true, new RegExp(\"^Data.Query$\"));\r\n ChoiceSetInputDataQuery.datasetProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"dataset\");\r\n ChoiceSetInputDataQuery.countProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"count\");\r\n ChoiceSetInputDataQuery.skipProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"skip\");\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.typeProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"type\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.datasetProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"dataset\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.countProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"count\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.skipProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"skip\", void 0);\r\n return ChoiceSetInputDataQuery;\r\n}(serialization_1.SerializableObject));\r\nexports.ChoiceSetInputDataQuery = ChoiceSetInputDataQuery;\r\nvar ChoiceSetInput = /** @class */ (function (_super) {\r\n __extends(ChoiceSetInput, _super);\r\n function ChoiceSetInput() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.isMultiSelect = false;\r\n _this.wrap = false;\r\n _this.choices = [];\r\n return _this;\r\n }\r\n Object.defineProperty(ChoiceSetInput.prototype, \"isCompact\", {\r\n get: function () {\r\n return !this.style || this.style === \"compact\";\r\n },\r\n set: function (value) {\r\n this.style = value ? undefined : \"expanded\";\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ChoiceSetInput.getUniqueCategoryName = function () {\r\n var uniqueCategoryName = \"__ac-category\" + ChoiceSetInput._uniqueCategoryCounter;\r\n ChoiceSetInput._uniqueCategoryCounter++;\r\n return uniqueCategoryName;\r\n };\r\n ChoiceSetInput.prototype.isDynamicTypeahead = function () {\r\n return (this.hostConfig.inputs.allowDynamicallyFilteredChoiceSet &&\r\n !!this.choicesData &&\r\n !!this.choicesData.dataset &&\r\n this.choicesData.type === \"Data.Query\");\r\n };\r\n ChoiceSetInput.prototype.getFilterForDynamicSearch = function () {\r\n var _a;\r\n return (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;\r\n };\r\n ChoiceSetInput.prototype.getDropdownElement = function () {\r\n var _a;\r\n return (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.dropdown;\r\n };\r\n ChoiceSetInput.prototype.renderChoices = function (filter, fetchedChoices) {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.processResponse(filter, fetchedChoices);\r\n };\r\n ChoiceSetInput.prototype.showLoadingIndicator = function () {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.showLoadingIndicator();\r\n };\r\n ChoiceSetInput.prototype.removeLoadingIndicator = function () {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.removeLoadingIndicator();\r\n };\r\n ChoiceSetInput.prototype.showErrorIndicator = function (filter, error) {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.showErrorIndicator(filter, error);\r\n };\r\n ChoiceSetInput.prototype.showValidationFailureCue = function () {\r\n var _a;\r\n (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.classList.add(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n };\r\n ChoiceSetInput.prototype.removeValidationFailureCue = function () {\r\n var _a;\r\n (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.classList.remove(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n };\r\n ChoiceSetInput.prototype.createPlaceholderOptionWhenValueDoesNotExist = function () {\r\n if (!this.value) {\r\n var placeholderOption = document.createElement(\"option\");\r\n placeholderOption.selected = true;\r\n placeholderOption.disabled = true;\r\n placeholderOption.hidden = true;\r\n placeholderOption.value = \"\";\r\n if (this.placeholder) {\r\n placeholderOption.text = this.placeholder;\r\n }\r\n return placeholderOption;\r\n }\r\n return undefined;\r\n };\r\n // Make sure `aria-current` is applied to the currently-selected item\r\n ChoiceSetInput.prototype.internalApplyAriaCurrent = function () {\r\n if (this._selectElement) {\r\n var options = this._selectElement.options;\r\n if (options) {\r\n for (var _i = 0, _a = Array.from(options); _i < _a.length; _i++) {\r\n var option = _a[_i];\r\n if (option.selected) {\r\n option.setAttribute(\"aria-current\", \"true\");\r\n }\r\n else {\r\n option.removeAttribute(\"aria-current\");\r\n }\r\n }\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.renderCompoundInput = function (cssClassName, type, defaultValues) {\r\n var _this = this;\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", cssClassName);\r\n element.style.width = \"100%\";\r\n element.tabIndex = this.isDesignMode() ? -1 : 0;\r\n this._toggleInputs = [];\r\n this._labels = [];\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n var input = document.createElement(\"input\");\r\n input.id = Utils.generateUniqueId();\r\n input.type = type;\r\n input.style.margin = \"0\";\r\n input.style.display = \"inline-block\";\r\n input.style.verticalAlign = \"middle\";\r\n input.style.flex = \"0 0 auto\";\r\n input.name = this.id ? this.id : this._uniqueCategoryName;\r\n if (this.isRequired) {\r\n input.setAttribute(\"aria-required\", \"true\");\r\n }\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (choice.value) {\r\n input.value = choice.value;\r\n }\r\n if (choice.title) {\r\n input.setAttribute(\"aria-label\", choice.title);\r\n }\r\n if (defaultValues && choice.value) {\r\n if (defaultValues.indexOf(choice.value) >= 0) {\r\n input.checked = true;\r\n }\r\n }\r\n input.onchange = function () {\r\n _this.valueChanged();\r\n };\r\n this._toggleInputs.push(input);\r\n var compoundInput = document.createElement(\"div\");\r\n compoundInput.style.display = \"flex\";\r\n compoundInput.style.alignItems = \"center\";\r\n Utils.appendChild(compoundInput, input);\r\n var label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = input.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = choice.title ? choice.title : \"Choice \" + this._toggleInputs.length;\r\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n var labelElement = label.render();\r\n this._labels.push(labelElement);\r\n if (labelElement) {\r\n labelElement.id = Utils.generateUniqueId();\r\n labelElement.style.display = \"inline-block\";\r\n labelElement.style.flex = \"1 1 auto\";\r\n labelElement.style.marginLeft = \"6px\";\r\n labelElement.style.verticalAlign = \"middle\";\r\n var spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n Utils.appendChild(compoundInput, spacerElement);\r\n Utils.appendChild(compoundInput, labelElement);\r\n }\r\n Utils.appendChild(element, compoundInput);\r\n }\r\n return element;\r\n };\r\n ChoiceSetInput.prototype.updateInputControlAriaLabelledBy = function () {\r\n if ((this.isMultiSelect || this.style === \"expanded\") &&\r\n this._toggleInputs &&\r\n this._labels) {\r\n var labelIds = this.getAllLabelIds();\r\n for (var i = 0; i < this._toggleInputs.length; i++) {\r\n var joinedLabelIds = labelIds.join(\" \");\r\n var label = this._labels[i];\r\n if (label && label.id) {\r\n joinedLabelIds += \" \" + label.id;\r\n }\r\n if (joinedLabelIds) {\r\n this._toggleInputs[i].setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n }\r\n else {\r\n this._toggleInputs[i].removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n }\r\n else {\r\n _super.prototype.updateInputControlAriaLabelledBy.call(this);\r\n }\r\n };\r\n ChoiceSetInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._uniqueCategoryName = ChoiceSetInput.getUniqueCategoryName();\r\n if (this.isDynamicTypeahead()) {\r\n var filteredChoiceSet_1 = new FilteredChoiceSet(ChoiceSetInput._uniqueCategoryCounter, this.choices, this.hostConfig);\r\n filteredChoiceSet_1.render();\r\n if (filteredChoiceSet_1.textInput) {\r\n this._textInput = filteredChoiceSet_1.textInput;\r\n if (this.defaultValue) {\r\n this._textInput.value = this.defaultValue;\r\n }\r\n if (this.placeholder && !this._textInput.value) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._textInput.tabIndex = this.isDesignMode() ? -1 : 0;\r\n var onInputChangeEventHandler = Utils.debounce(function () {\r\n filteredChoiceSet_1.processChoices();\r\n _this.valueChanged();\r\n if (_this._textInput) {\r\n // Remove aria-label when value is not empty so narration software doesn't\r\n // read the placeholder\r\n if (_this.value) {\r\n _this._textInput.removeAttribute(\"placeholder\");\r\n _this._textInput.removeAttribute(\"aria-label\");\r\n }\r\n else if (_this.placeholder) {\r\n _this._textInput.placeholder = _this.placeholder;\r\n _this._textInput.setAttribute(\"aria-label\", _this.placeholder);\r\n }\r\n }\r\n }, this.hostConfig.inputs.debounceTimeInMilliSeconds);\r\n this._textInput.onclick = onInputChangeEventHandler;\r\n this._textInput.oninput = onInputChangeEventHandler;\r\n }\r\n filteredChoiceSet_1.parent = this;\r\n this._filteredChoiceSet = filteredChoiceSet_1;\r\n return filteredChoiceSet_1.renderedElement;\r\n }\r\n else if (this.isMultiSelect) {\r\n // Render as a list of toggle inputs\r\n return this.renderCompoundInput(\"ac-choiceSetInput-multiSelect\", \"checkbox\", this.defaultValue\r\n ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator)\r\n : undefined);\r\n }\r\n else {\r\n if (this.style === \"expanded\") {\r\n // Render as a series of radio buttons\r\n return this.renderCompoundInput(\"ac-choiceSetInput-expanded\", \"radio\", this.defaultValue ? [this.defaultValue] : undefined);\r\n }\r\n else if (this.style === \"filtered\") {\r\n // Render as a text input coupled with a datalist\r\n var inputContainer = document.createElement(\"div\");\r\n inputContainer.style.width = \"100%\";\r\n this._textInput = document.createElement(\"input\");\r\n this._textInput.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-filtered\");\r\n this._textInput.type = \"text\";\r\n this._textInput.style.width = \"100%\";\r\n this._textInput.oninput = function () {\r\n _this.valueChanged();\r\n if (_this._textInput) {\r\n // Remove aria-label when value is not empty so narration software doesn't\r\n // read the placeholder\r\n if (_this.value) {\r\n _this._textInput.removeAttribute(\"placeholder\");\r\n _this._textInput.removeAttribute(\"aria-label\");\r\n }\r\n else if (_this.placeholder) {\r\n _this._textInput.placeholder = _this.placeholder;\r\n _this._textInput.setAttribute(\"aria-label\", _this.placeholder);\r\n }\r\n }\r\n };\r\n if (this.defaultValue) {\r\n this._textInput.value = this.defaultValue;\r\n }\r\n if (this.placeholder && !this._textInput.value) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._textInput.tabIndex = this.isDesignMode() ? -1 : 0;\r\n var dataList = document.createElement(\"datalist\");\r\n dataList.id = Utils.generateUniqueId();\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n var option = document.createElement(\"option\");\r\n // To fix https://stackoverflow.com/questions/29882361/show-datalist-labels-but-submit-the-actual-value\r\n // value is mapped to choice.title other than choice.value\r\n if (choice.title) {\r\n option.value = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n dataList.appendChild(option);\r\n }\r\n this._textInput.setAttribute(\"list\", dataList.id);\r\n inputContainer.append(this._textInput, dataList);\r\n return inputContainer;\r\n }\r\n else {\r\n // Render as a combo box\r\n this._selectElement = document.createElement(\"select\");\r\n this._selectElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-compact\");\r\n this._selectElement.style.width = \"100%\";\r\n this._selectElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n var placeholderOption = this.createPlaceholderOptionWhenValueDoesNotExist();\r\n Utils.appendChild(this._selectElement, placeholderOption);\r\n for (var _b = 0, _c = this.choices; _b < _c.length; _b++) {\r\n var choice = _c[_b];\r\n var option = document.createElement(\"option\");\r\n option.value = choice.value;\r\n if (choice.title) {\r\n option.text = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (choice.value === this.defaultValue) {\r\n option.selected = true;\r\n }\r\n Utils.appendChild(this._selectElement, option);\r\n }\r\n this._selectElement.onchange = function () {\r\n _this.internalApplyAriaCurrent();\r\n _this.valueChanged();\r\n };\r\n this.internalApplyAriaCurrent();\r\n return this._selectElement;\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n if (!this.isMultiSelect && this.isCompact) {\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n if (this._selectElement && this.inputStyle === Enums.InputStyle.RevealOnHover) {\r\n var hideDropDownPicker = this.shouldHideInputAdornersForRevealOnHover(this._selectElement, eventType);\r\n if (hideDropDownPicker) {\r\n this._selectElement.style.appearance = \"none\";\r\n this._selectElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n else {\r\n this._selectElement.style.appearance = \"auto\";\r\n this._selectElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.getJsonTypeName = function () {\r\n return \"Input.ChoiceSet\";\r\n };\r\n ChoiceSetInput.prototype.focus = function () {\r\n if (this._toggleInputs && (this.isMultiSelect || this.style === \"expanded\")) {\r\n if (this._toggleInputs.length > 0) {\r\n this._toggleInputs[0].focus();\r\n }\r\n }\r\n else if (this._textInput) {\r\n this._textInput.focus();\r\n }\r\n else {\r\n _super.prototype.focus.call(this);\r\n }\r\n };\r\n ChoiceSetInput.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (this.choices.length === 0) {\r\n context.addFailure(this, Enums.ValidationEvent.CollectionCantBeEmpty, strings_1.Strings.errors.choiceSetMustHaveAtLeastOneChoice());\r\n }\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n if (!choice.title || !choice.value) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.choiceSetChoicesMustHaveTitleAndValue());\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n ChoiceSetInput.prototype.isValid = function () {\r\n if (this._textInput) {\r\n if (this.value === \"\" || this.value === this.placeholder) {\r\n return true;\r\n }\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n if (this.value === choice.value) {\r\n return true;\r\n }\r\n }\r\n if (this.dynamicChoices) {\r\n for (var _b = 0, _c = this.dynamicChoices; _b < _c.length; _b++) {\r\n var choice = _c[_b];\r\n if (this.value === choice) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n return _super.prototype.isValid.call(this);\r\n };\r\n Object.defineProperty(ChoiceSetInput.prototype, \"value\", {\r\n get: function () {\r\n if (!this.isMultiSelect) {\r\n if (this._selectElement) {\r\n return this._selectElement.selectedIndex > 0\r\n ? this._selectElement.value\r\n : undefined;\r\n }\r\n else if (this._textInput) {\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n if (choice.title && this._textInput.value === choice.title) {\r\n return choice.value;\r\n }\r\n }\r\n return this._textInput.value;\r\n }\r\n else if (this._toggleInputs && this._toggleInputs.length > 0) {\r\n for (var _b = 0, _c = this._toggleInputs; _b < _c.length; _b++) {\r\n var toggleInput = _c[_b];\r\n if (toggleInput.checked) {\r\n return toggleInput.value;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n else {\r\n if (!this._toggleInputs || this._toggleInputs.length === 0) {\r\n return undefined;\r\n }\r\n var result = \"\";\r\n for (var _d = 0, _f = this._toggleInputs; _d < _f.length; _d++) {\r\n var toggleInput = _f[_d];\r\n if (toggleInput.checked) {\r\n if (result !== \"\") {\r\n result += this.hostConfig.choiceSetInputValueSeparator;\r\n }\r\n result += toggleInput.value;\r\n }\r\n }\r\n return result ? result : undefined;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ChoiceSetInput.prototype, \"dynamicChoices\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.dynamicChoices;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ChoiceSetInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n ChoiceSetInput.choicesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"choices\", Choice);\r\n ChoiceSetInput.choicesDataProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_6, \"choices.data\", ChoiceSetInputDataQuery);\r\n ChoiceSetInput.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_0, \"style\", [\r\n { value: \"compact\" },\r\n { value: \"expanded\" },\r\n { value: \"filtered\", targetVersion: serialization_1.Versions.v1_5 }\r\n ], \"compact\");\r\n ChoiceSetInput.isMultiSelectProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiSelect\", false);\r\n ChoiceSetInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n ChoiceSetInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\r\n //#endregion\r\n ChoiceSetInput._uniqueCategoryCounter = 0;\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.valueProperty)\r\n ], ChoiceSetInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.styleProperty)\r\n ], ChoiceSetInput.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.isMultiSelectProperty)\r\n ], ChoiceSetInput.prototype, \"isMultiSelect\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.placeholderProperty)\r\n ], ChoiceSetInput.prototype, \"placeholder\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.wrapProperty)\r\n ], ChoiceSetInput.prototype, \"wrap\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.choicesProperty)\r\n ], ChoiceSetInput.prototype, \"choices\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.choicesDataProperty)\r\n ], ChoiceSetInput.prototype, \"choicesData\", void 0);\r\n return ChoiceSetInput;\r\n}(Input));\r\nexports.ChoiceSetInput = ChoiceSetInput;\r\nvar FilteredChoiceSet = /** @class */ (function () {\r\n function FilteredChoiceSet(choiceSetId, choices, hostConfig) {\r\n this._choiceSetId = choiceSetId;\r\n this._choices = choices;\r\n this._dynamicChoices = [];\r\n this._visibleChoiceCount = 0;\r\n this._highlightedChoiceId = -1;\r\n this._hostConfig = hostConfig;\r\n }\r\n FilteredChoiceSet.prototype.render = function () {\r\n var _this = this;\r\n var choiceSetContainer = document.createElement(\"div\");\r\n choiceSetContainer.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-filtered-container\");\r\n this._textInput = document.createElement(\"input\");\r\n this._textInput.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-filtered-textbox\");\r\n this._textInput.type = \"text\";\r\n this._textInput.onkeydown = function (event) {\r\n if (event.key === \"ArrowDown\") {\r\n event.preventDefault();\r\n _this.highlightChoice(_this._highlightedChoiceId + 1);\r\n }\r\n else if (event.key === \"ArrowUp\") {\r\n event.preventDefault();\r\n _this.highlightChoice(_this._highlightedChoiceId - 1);\r\n }\r\n else if (event.key === \"Enter\") {\r\n var choice = document.getElementById(\"ac-choiceSetInput-\".concat(_this._choiceSetId, \"-choice-\").concat(_this._highlightedChoiceId));\r\n choice === null || choice === void 0 ? void 0 : choice.click();\r\n }\r\n };\r\n this._dropdown = document.createElement(\"div\");\r\n this._dropdown.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-filtered-dropdown\");\r\n choiceSetContainer.append(this._textInput, this._dropdown);\r\n this._renderedElement = choiceSetContainer;\r\n };\r\n FilteredChoiceSet.prototype.createChoice = function (value, filter, id) {\r\n var _this = this;\r\n var choice = document.createElement(\"span\");\r\n choice.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-choice\");\r\n choice.id = \"ac-choiceSetInput-\".concat(this._choiceSetId, \"-choice-\").concat(id);\r\n choice.innerHTML = value.replace(filter, \"\".concat(filter, \"\"));\r\n choice.tabIndex = -1;\r\n choice.onclick = function () {\r\n choice.classList.remove(_this.hostConfig.makeCssClassName(\"ac-choiceSetInput-choice-highlighted\"));\r\n _this._highlightedChoiceId = -1;\r\n if (_this._textInput) {\r\n _this._textInput.value = choice.innerText;\r\n _this._textInput.focus();\r\n }\r\n if (_this._dropdown) {\r\n _this._dropdown.classList.remove(_this.hostConfig.makeCssClassName(\"ac-choiceSetInput-filtered-dropdown-open\"));\r\n }\r\n };\r\n choice.onmousemove = function () {\r\n if (_this._highlightedChoiceId !== id) {\r\n _this.highlightChoice(id, false);\r\n }\r\n };\r\n return choice;\r\n };\r\n FilteredChoiceSet.prototype.highlightChoice = function (id, scrollIntoView) {\r\n if (scrollIntoView === void 0) { scrollIntoView = true; }\r\n if (this._visibleChoiceCount > 0) {\r\n var currentHighlightedChoice = document.getElementById(\"ac-choiceSetInput-\".concat(this._choiceSetId, \"-choice-\").concat(this._highlightedChoiceId));\r\n var nextHighlightedChoice = document.getElementById(\"ac-choiceSetInput-\".concat(this._choiceSetId, \"-choice-\").concat(id));\r\n if (nextHighlightedChoice) {\r\n currentHighlightedChoice === null || currentHighlightedChoice === void 0 ? void 0 : currentHighlightedChoice.classList.remove(this.hostConfig.makeCssClassName(\"ac-choiceSetInput-choice-highlighted\"));\r\n nextHighlightedChoice.classList.add(this.hostConfig.makeCssClassName(\"ac-choiceSetInput-choice-highlighted\"));\r\n if (scrollIntoView) {\r\n nextHighlightedChoice.scrollIntoView();\r\n }\r\n this._highlightedChoiceId = id;\r\n }\r\n else if (currentHighlightedChoice && this._highlightedChoiceId !== 0) {\r\n this.highlightChoice(0);\r\n }\r\n else {\r\n this.highlightChoice(this._visibleChoiceCount - 1);\r\n }\r\n }\r\n };\r\n FilteredChoiceSet.prototype.filterChoices = function () {\r\n var _a, _b;\r\n var filter = ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value.toLowerCase().trim()) || \"\";\r\n var choices = __spreadArray(__spreadArray([], this._choices, true), this._dynamicChoices, true);\r\n for (var _i = 0, choices_1 = choices; _i < choices_1.length; _i++) {\r\n var choice = choices_1[_i];\r\n if (choice.title) {\r\n var matchIndex = choice.title.toLowerCase().indexOf(filter);\r\n if (matchIndex !== -1) {\r\n var matchedText = choice.title.substring(matchIndex, matchIndex + filter.length);\r\n var choiceContainer = this.createChoice(choice.title, matchedText, this._visibleChoiceCount++);\r\n (_b = this._dropdown) === null || _b === void 0 ? void 0 : _b.appendChild(choiceContainer);\r\n }\r\n }\r\n }\r\n };\r\n FilteredChoiceSet.prototype.getStatusIndicator = function (error) {\r\n if (error) {\r\n if (!this._errorIndicator) {\r\n var errorIndicator = document.createElement(\"div\");\r\n errorIndicator.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-statusIndicator\", \"ac-choiceSetInput-errorIndicator\");\r\n this._errorIndicator = errorIndicator;\r\n }\r\n this._errorIndicator.innerText = error;\r\n return this._errorIndicator;\r\n }\r\n else {\r\n if (!this._loadingIndicator) {\r\n var loadingIndicator = document.createElement(\"div\");\r\n loadingIndicator.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-statusIndicator\");\r\n this._loadingIndicator = loadingIndicator;\r\n }\r\n this._loadingIndicator.innerText =\r\n this._visibleChoiceCount === 0 ? \"Loading...\" : \"Loading more...\";\r\n return this._loadingIndicator;\r\n }\r\n };\r\n FilteredChoiceSet.prototype.resetDropdown = function () {\r\n if (this._dropdown) {\r\n Utils.clearElementChildren(this._dropdown);\r\n this._visibleChoiceCount = 0;\r\n this._highlightedChoiceId = -1;\r\n }\r\n };\r\n FilteredChoiceSet.prototype.showDropdown = function () {\r\n var _a;\r\n if ((_a = this._dropdown) === null || _a === void 0 ? void 0 : _a.hasChildNodes()) {\r\n this._dropdown.classList.add(this.hostConfig.makeCssClassName(\"ac-choiceSetInput-filtered-dropdown-open\"));\r\n }\r\n };\r\n FilteredChoiceSet.prototype.processChoices = function () {\r\n this.resetDropdown();\r\n this.filterChoices();\r\n this.showDropdown();\r\n };\r\n FilteredChoiceSet.prototype.processResponse = function (filter, fetchedChoices) {\r\n var _a;\r\n if (filter === ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)) {\r\n this.resetDropdown();\r\n this._dynamicChoices = fetchedChoices;\r\n this.filterChoices();\r\n if (this._visibleChoiceCount === 0) {\r\n this.showErrorIndicator(filter, \"No results found\");\r\n }\r\n }\r\n };\r\n FilteredChoiceSet.prototype.showLoadingIndicator = function () {\r\n var _a;\r\n var loadingIndicator = this.getStatusIndicator();\r\n (_a = this._dropdown) === null || _a === void 0 ? void 0 : _a.appendChild(loadingIndicator);\r\n this.showDropdown();\r\n };\r\n FilteredChoiceSet.prototype.removeLoadingIndicator = function () {\r\n var _a, _b;\r\n if (this._loadingIndicator && ((_a = this._dropdown) === null || _a === void 0 ? void 0 : _a.contains(this._loadingIndicator))) {\r\n (_b = this._dropdown) === null || _b === void 0 ? void 0 : _b.removeChild(this._loadingIndicator);\r\n }\r\n };\r\n FilteredChoiceSet.prototype.showErrorIndicator = function (filter, error) {\r\n var _a, _b;\r\n if (filter === ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)) {\r\n this.processChoices();\r\n var errorIndicator = this.getStatusIndicator(error);\r\n (_b = this._dropdown) === null || _b === void 0 ? void 0 : _b.appendChild(errorIndicator);\r\n errorIndicator.scrollIntoView();\r\n }\r\n };\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"dynamicChoices\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._dynamicChoices) === null || _a === void 0 ? void 0 : _a.map(function (choice) { return choice.title; });\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"hostConfig\", {\r\n get: function () {\r\n if (this._hostConfig) {\r\n return this._hostConfig;\r\n }\r\n else {\r\n if (this.parent) {\r\n return this.parent.hostConfig;\r\n }\r\n else {\r\n return host_config_1.defaultHostConfig;\r\n }\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n set: function (value) {\r\n this._parent = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"renderedElement\", {\r\n get: function () {\r\n return this._renderedElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"textInput\", {\r\n get: function () {\r\n return this._textInput;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"dropdown\", {\r\n get: function () {\r\n return this._dropdown;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return FilteredChoiceSet;\r\n}());\r\nexports.FilteredChoiceSet = FilteredChoiceSet;\r\nvar NumberInput = /** @class */ (function (_super) {\r\n __extends(NumberInput, _super);\r\n function NumberInput() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n NumberInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._numberInputElement = document.createElement(\"input\");\r\n this._numberInputElement.setAttribute(\"type\", \"number\");\r\n if (this.min !== undefined) {\r\n this._numberInputElement.setAttribute(\"min\", this.min.toString());\r\n }\r\n if (this.max !== undefined) {\r\n this._numberInputElement.setAttribute(\"max\", this.max.toString());\r\n }\r\n this._numberInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-numberInput\");\r\n this._numberInputElement.style.width = \"100%\";\r\n this._numberInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.defaultValue !== undefined) {\r\n this._numberInputElement.valueAsNumber = this.defaultValue;\r\n }\r\n if (this.placeholder) {\r\n this._numberInputElement.placeholder = this.placeholder;\r\n this._numberInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._numberInputElement.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n return this._numberInputElement;\r\n };\r\n NumberInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Number\";\r\n };\r\n NumberInput.prototype.isSet = function () {\r\n return this.value !== undefined && !isNaN(this.value);\r\n };\r\n NumberInput.prototype.isValid = function () {\r\n if (this.value === undefined) {\r\n return !this.isRequired;\r\n }\r\n var result = true;\r\n if (this.min !== undefined) {\r\n result = result && this.value >= this.min;\r\n }\r\n if (this.max !== undefined) {\r\n result = result && this.value <= this.max;\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(NumberInput.prototype, \"value\", {\r\n get: function () {\r\n return this._numberInputElement ? this._numberInputElement.valueAsNumber : undefined;\r\n },\r\n set: function (value) {\r\n if (value && this._numberInputElement) {\r\n this._numberInputElement.value = value.toString();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n NumberInput.valueProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"value\");\r\n NumberInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n NumberInput.minProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"min\");\r\n NumberInput.maxProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"max\");\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.valueProperty)\r\n ], NumberInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.minProperty)\r\n ], NumberInput.prototype, \"min\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.maxProperty)\r\n ], NumberInput.prototype, \"max\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.placeholderProperty)\r\n ], NumberInput.prototype, \"placeholder\", void 0);\r\n return NumberInput;\r\n}(Input));\r\nexports.NumberInput = NumberInput;\r\nvar DateInput = /** @class */ (function (_super) {\r\n __extends(DateInput, _super);\r\n function DateInput() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DateInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._dateInputElement = document.createElement(\"input\");\r\n this._dateInputElement.setAttribute(\"type\", \"date\");\r\n if (this.min) {\r\n this._dateInputElement.setAttribute(\"min\", this.min);\r\n }\r\n if (this.max) {\r\n this._dateInputElement.setAttribute(\"max\", this.max);\r\n }\r\n if (this.placeholder) {\r\n this._dateInputElement.placeholder = this.placeholder;\r\n this._dateInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._dateInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n this._dateInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-dateInput\");\r\n this._dateInputElement.style.width = \"100%\";\r\n this._dateInputElement.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n if (this.defaultValue) {\r\n this._dateInputElement.value = this.defaultValue;\r\n }\r\n return this._dateInputElement;\r\n };\r\n DateInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n if (this._dateInputElement && this.inputStyle === Enums.InputStyle.RevealOnHover) {\r\n var hideDatePicker = this.shouldHideInputAdornersForRevealOnHover(this._dateInputElement, eventType);\r\n if (hideDatePicker) {\r\n this._dateInputElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n else {\r\n this._dateInputElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n updateInputAdornersVisibility(this._dateInputElement, hideDatePicker /*hide*/);\r\n }\r\n };\r\n DateInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Date\";\r\n };\r\n DateInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n DateInput.prototype.isValid = function () {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n var valueAsDate = new Date(this.value);\r\n var result = true;\r\n if (this.min) {\r\n var minDate = new Date(this.min);\r\n result = result && valueAsDate >= minDate;\r\n }\r\n if (this.max) {\r\n var maxDate = new Date(this.max);\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(DateInput.prototype, \"value\", {\r\n get: function () {\r\n return this._dateInputElement ? this._dateInputElement.value : undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n DateInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n DateInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n DateInput.minProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"min\");\r\n DateInput.maxProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"max\");\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.valueProperty)\r\n ], DateInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.minProperty)\r\n ], DateInput.prototype, \"min\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.maxProperty)\r\n ], DateInput.prototype, \"max\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.placeholderProperty)\r\n ], DateInput.prototype, \"placeholder\", void 0);\r\n return DateInput;\r\n}(Input));\r\nexports.DateInput = DateInput;\r\nvar TimeProperty = /** @class */ (function (_super) {\r\n __extends(TimeProperty, _super);\r\n function TimeProperty(targetVersion, name) {\r\n var _this = _super.call(this, targetVersion, name, function (sender, prop, source, context) {\r\n var value = source[prop.name];\r\n if (typeof value === \"string\" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) {\r\n return value;\r\n }\r\n return undefined;\r\n }, function (sender, prop, target, value, context) {\r\n context.serializeValue(target, prop.name, value);\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n return _this;\r\n }\r\n return TimeProperty;\r\n}(serialization_1.CustomProperty));\r\nexports.TimeProperty = TimeProperty;\r\nvar TimeInput = /** @class */ (function (_super) {\r\n __extends(TimeInput, _super);\r\n function TimeInput() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeInput.convertTimeStringToDate = function (timeString) {\r\n return new Date(\"1973-09-04T\" + timeString + \":00Z\");\r\n };\r\n TimeInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._timeInputElement = document.createElement(\"input\");\r\n this._timeInputElement.setAttribute(\"type\", \"time\");\r\n if (this.min) {\r\n this._timeInputElement.setAttribute(\"min\", this.min);\r\n }\r\n if (this.max) {\r\n this._timeInputElement.setAttribute(\"max\", this.max);\r\n }\r\n this._timeInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-timeInput\");\r\n this._timeInputElement.style.width = \"100%\";\r\n this._timeInputElement.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n if (this.placeholder) {\r\n this._timeInputElement.placeholder = this.placeholder;\r\n this._timeInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._timeInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.defaultValue) {\r\n this._timeInputElement.value = this.defaultValue;\r\n }\r\n return this._timeInputElement;\r\n };\r\n TimeInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n if (this._timeInputElement && this.inputStyle === Enums.InputStyle.RevealOnHover) {\r\n var hideTimePicker = this.shouldHideInputAdornersForRevealOnHover(this._timeInputElement, eventType);\r\n if (hideTimePicker) {\r\n this._timeInputElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n else {\r\n this._timeInputElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n updateInputAdornersVisibility(this._timeInputElement, hideTimePicker /*hide*/);\r\n }\r\n };\r\n TimeInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Time\";\r\n };\r\n TimeInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n TimeInput.prototype.isValid = function () {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n var valueAsDate = TimeInput.convertTimeStringToDate(this.value);\r\n var result = true;\r\n if (this.min) {\r\n var minDate = TimeInput.convertTimeStringToDate(this.min);\r\n result = result && valueAsDate >= minDate;\r\n }\r\n if (this.max) {\r\n var maxDate = TimeInput.convertTimeStringToDate(this.max);\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(TimeInput.prototype, \"value\", {\r\n get: function () {\r\n return this._timeInputElement ? this._timeInputElement.value : undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n TimeInput.valueProperty = new TimeProperty(serialization_1.Versions.v1_0, \"value\");\r\n TimeInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n TimeInput.minProperty = new TimeProperty(serialization_1.Versions.v1_0, \"min\");\r\n TimeInput.maxProperty = new TimeProperty(serialization_1.Versions.v1_0, \"max\");\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.valueProperty)\r\n ], TimeInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.minProperty)\r\n ], TimeInput.prototype, \"min\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.maxProperty)\r\n ], TimeInput.prototype, \"max\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.placeholderProperty)\r\n ], TimeInput.prototype, \"placeholder\", void 0);\r\n return TimeInput;\r\n}(Input));\r\nexports.TimeInput = TimeInput;\r\nvar Action = /** @class */ (function (_super) {\r\n __extends(Action, _super);\r\n function Action() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.style = Enums.ActionStyle.Default;\r\n _this.mode = Enums.ActionMode.Primary;\r\n _this._state = 0 /* Normal */;\r\n _this._isFocusable = true;\r\n return _this;\r\n }\r\n //#endregion\r\n Action.prototype.renderButtonContent = function () {\r\n if (this.renderedElement) {\r\n // Cache hostConfig for perf\r\n var hostConfig = this.hostConfig;\r\n var titleElement = document.createElement(\"div\");\r\n titleElement.style.overflow = \"hidden\";\r\n titleElement.style.textOverflow = \"ellipsis\";\r\n if (!(hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle ||\r\n hostConfig.actions.allowTitleToWrap)) {\r\n titleElement.style.whiteSpace = \"nowrap\";\r\n }\r\n if (this.title) {\r\n titleElement.innerText = this.title;\r\n }\r\n if (!this.iconUrl) {\r\n this.renderedElement.classList.add(\"noIcon\");\r\n this.renderedElement.appendChild(titleElement);\r\n }\r\n else {\r\n var iconElement = document.createElement(\"img\");\r\n iconElement.src = this.iconUrl;\r\n iconElement.style.width = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.height = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.flex = \"0 0 auto\";\r\n if (hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle) {\r\n this.renderedElement.classList.add(\"iconAbove\");\r\n this.renderedElement.style.flexDirection = \"column\";\r\n if (this.title) {\r\n iconElement.style.marginBottom = \"6px\";\r\n }\r\n }\r\n else {\r\n this.renderedElement.classList.add(\"iconLeft\");\r\n iconElement.style.maxHeight = \"100%\";\r\n if (this.title) {\r\n iconElement.style.marginRight = \"6px\";\r\n }\r\n }\r\n this.renderedElement.appendChild(iconElement);\r\n this.renderedElement.appendChild(titleElement);\r\n }\r\n }\r\n };\r\n Action.prototype.getParentContainer = function () {\r\n if (this.parent instanceof Container) {\r\n return this.parent;\r\n }\r\n return this.parent ? this.parent.getParentContainer() : undefined;\r\n };\r\n Action.prototype.isDesignMode = function () {\r\n var rootElement = this.getRootObject();\r\n return rootElement instanceof CardElement && rootElement.isDesignMode();\r\n };\r\n Action.prototype.updateCssClasses = function () {\r\n var _a, _b;\r\n if (this.parent && this.renderedElement) {\r\n var hostConfig = this.parent.hostConfig;\r\n this.renderedElement.className = hostConfig.makeCssClassName(this.isEffectivelyEnabled() ? \"ac-pushButton\" : \"ac-pushButton-disabled\");\r\n var parentContainer = this.getParentContainer();\r\n if (parentContainer) {\r\n var parentContainerStyle = parentContainer.getEffectiveStyle();\r\n if (parentContainerStyle) {\r\n this.renderedElement.classList.add(\"style-\" + parentContainerStyle);\r\n }\r\n }\r\n this.renderedElement.tabIndex = !this.isDesignMode() && this.isFocusable ? 0 : -1;\r\n switch (this._state) {\r\n case 0 /* Normal */:\r\n // No additional classes needed\r\n break;\r\n case 1 /* Expanded */:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"expanded\"));\r\n break;\r\n case 2 /* Subdued */:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"subdued\"));\r\n break;\r\n }\r\n if (this.style && this.isEffectivelyEnabled()) {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n (_a = this.renderedElement.classList).add.apply(_a, hostConfig.makeCssClassNames(\"primary\", \"style-positive\"));\r\n }\r\n else {\r\n (_b = this.renderedElement.classList).add.apply(_b, hostConfig.makeCssClassNames(\"style-\" + this.style.toLowerCase()));\r\n }\r\n }\r\n }\r\n };\r\n Action.prototype.getDefaultSerializationContext = function () {\r\n return new SerializationContext();\r\n };\r\n Action.prototype.internalGetReferencedInputs = function () {\r\n return {};\r\n };\r\n Action.prototype.internalPrepareForExecution = function (_inputs) {\r\n // Do nothing in base implementation\r\n };\r\n Action.prototype.internalValidateInputs = function (referencedInputs) {\r\n var result = [];\r\n if (referencedInputs) {\r\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = referencedInputs[key];\r\n if (!input.validateValue()) {\r\n result.push(input);\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n Action.prototype.shouldSerialize = function (context) {\r\n return context.actionRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n };\r\n Action.prototype.raiseExecuteActionEvent = function () {\r\n if (this.onExecute) {\r\n this.onExecute(this);\r\n }\r\n raiseExecuteActionEvent(this);\r\n };\r\n Action.prototype.internalAfterExecute = function () {\r\n var rootObject = this.getRootObject();\r\n if (rootObject instanceof CardElement) {\r\n rootObject.updateActionsEnabledState();\r\n }\r\n };\r\n Action.prototype.getHref = function () {\r\n return \"\";\r\n };\r\n Action.prototype.getAriaRole = function () {\r\n var ariaRole = this.getAriaRoleFromEnum();\r\n return ariaRole !== null && ariaRole !== void 0 ? ariaRole : \"button\";\r\n };\r\n Action.prototype.getAriaRoleFromEnum = function () {\r\n switch (this.role) {\r\n case Enums.ActionRole.Button:\r\n return \"button\";\r\n case Enums.ActionRole.Link:\r\n return \"link\";\r\n case Enums.ActionRole.Menu:\r\n return \"menu\";\r\n case Enums.ActionRole.MenuItem:\r\n return \"menuitem\";\r\n case Enums.ActionRole.Tab:\r\n return \"tab\";\r\n default:\r\n return undefined;\r\n }\r\n };\r\n Action.prototype.setupElementForAccessibility = function (element, promoteTooltipToLabel) {\r\n if (promoteTooltipToLabel === void 0) { promoteTooltipToLabel = false; }\r\n element.tabIndex = this.isEffectivelyEnabled() && !this.isDesignMode() ? 0 : -1;\r\n element.setAttribute(\"role\", this.getAriaRole());\r\n if (element instanceof HTMLButtonElement) {\r\n element.disabled = !this.isEffectivelyEnabled();\r\n }\r\n if (!this.isEffectivelyEnabled()) {\r\n element.setAttribute(\"aria-disabled\", \"true\");\r\n }\r\n else {\r\n element.removeAttribute(\"aria-disabled\");\r\n element.classList.add(this.hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n if (this.title) {\r\n element.setAttribute(\"aria-label\", this.title);\r\n element.title = this.title;\r\n }\r\n else {\r\n element.removeAttribute(\"aria-label\");\r\n element.removeAttribute(\"title\");\r\n }\r\n if (this.tooltip) {\r\n if (promoteTooltipToLabel && !this.title) {\r\n element.setAttribute(\"aria-label\", this.tooltip);\r\n }\r\n element.title = this.tooltip;\r\n }\r\n };\r\n Action.prototype.parse = function (source, context) {\r\n return _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\r\n };\r\n Action.prototype.render = function () {\r\n var _this = this;\r\n var buttonElement = document.createElement(\"button\");\r\n buttonElement.type = \"button\";\r\n buttonElement.style.display = \"flex\";\r\n buttonElement.style.alignItems = \"center\";\r\n buttonElement.style.justifyContent = \"center\";\r\n buttonElement.onclick = function (e) {\r\n if (_this.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.execute();\r\n }\r\n };\r\n this._renderedElement = buttonElement;\r\n this.renderButtonContent();\r\n this.updateCssClasses();\r\n this.setupElementForAccessibility(buttonElement);\r\n };\r\n Action.prototype.execute = function () {\r\n if (this._actionCollection) {\r\n this._actionCollection.actionExecuted(this);\r\n }\r\n this.raiseExecuteActionEvent();\r\n this.internalAfterExecute();\r\n };\r\n Action.prototype.prepareForExecution = function () {\r\n var referencedInputs = this.getReferencedInputs();\r\n var invalidInputs = this.internalValidateInputs(referencedInputs);\r\n if (invalidInputs.length > 0) {\r\n invalidInputs[0].focus();\r\n return false;\r\n }\r\n this.internalPrepareForExecution(referencedInputs);\r\n return true;\r\n };\r\n Action.prototype.remove = function () {\r\n if (this._actionCollection) {\r\n return this._actionCollection.removeAction(this);\r\n }\r\n return false;\r\n };\r\n Action.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return [];\r\n };\r\n Action.prototype.getAllActions = function () {\r\n return [this];\r\n };\r\n Action.prototype.getResourceInformation = function () {\r\n return this.iconUrl ? [{ url: this.iconUrl, mimeType: \"image\" }] : [];\r\n };\r\n Action.prototype.getActionById = function (id) {\r\n return this.id === id ? this : undefined;\r\n };\r\n Action.prototype.getReferencedInputs = function () {\r\n return this.internalGetReferencedInputs();\r\n };\r\n /**\r\n * Validates the inputs associated with this action.\r\n *\r\n * @returns A list of inputs that failed validation, or an empty array if no input failed validation.\r\n */\r\n Action.prototype.validateInputs = function () {\r\n return this.internalValidateInputs(this.getReferencedInputs());\r\n };\r\n Action.prototype.updateEnabledState = function () {\r\n // Do nothing in base implementation\r\n };\r\n Action.prototype.isEffectivelyEnabled = function () {\r\n return this.isEnabled;\r\n };\r\n Object.defineProperty(Action.prototype, \"isPrimary\", {\r\n get: function () {\r\n return this.style === Enums.ActionStyle.Positive;\r\n },\r\n set: function (value) {\r\n if (value) {\r\n this.style = Enums.ActionStyle.Positive;\r\n }\r\n else {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n this.style = Enums.ActionStyle.Default;\r\n }\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"hostConfig\", {\r\n get: function () {\r\n return this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"state\", {\r\n get: function () {\r\n return this._state;\r\n },\r\n set: function (value) {\r\n if (this._state !== value) {\r\n this._state = value;\r\n this.updateCssClasses();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"isFocusable\", {\r\n get: function () {\r\n return this._isFocusable;\r\n },\r\n set: function (value) {\r\n if (this._isFocusable !== value) {\r\n this._isFocusable = value;\r\n this.updateCssClasses();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Action.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n Action.iconUrlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"iconUrl\");\r\n Action.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_2, \"style\", [\r\n { value: Enums.ActionStyle.Default },\r\n { value: Enums.ActionStyle.Positive },\r\n { value: Enums.ActionStyle.Destructive }\r\n ], Enums.ActionStyle.Default);\r\n Action.modeProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"mode\", [{ value: Enums.ActionMode.Primary }, { value: Enums.ActionMode.Secondary }], Enums.ActionMode.Primary);\r\n Action.tooltipProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_5, \"tooltip\");\r\n Action.isEnabledProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"isEnabled\", true);\r\n Action.roleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"role\", Enums.ActionRole);\r\n __decorate([\r\n (0, serialization_1.property)(Action.titleProperty)\r\n ], Action.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.iconUrlProperty)\r\n ], Action.prototype, \"iconUrl\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.styleProperty)\r\n ], Action.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.modeProperty)\r\n ], Action.prototype, \"mode\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.tooltipProperty)\r\n ], Action.prototype, \"tooltip\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.isEnabledProperty)\r\n ], Action.prototype, \"isEnabled\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.roleProperty)\r\n ], Action.prototype, \"role\", void 0);\r\n return Action;\r\n}(card_object_1.CardObject));\r\nexports.Action = Action;\r\nvar SubmitActionBase = /** @class */ (function (_super) {\r\n __extends(SubmitActionBase, _super);\r\n function SubmitActionBase() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.disabledUnlessAssociatedInputsChange = false;\r\n //#endregion\r\n _this._isPrepared = false;\r\n _this._areReferencedInputsDirty = false;\r\n return _this;\r\n }\r\n SubmitActionBase.prototype.internalGetReferencedInputs = function () {\r\n var result = {};\r\n if (this.associatedInputs !== \"none\") {\r\n var current = this.parent;\r\n var inputs = [];\r\n while (current) {\r\n inputs.push.apply(inputs, current.getAllInputs(false));\r\n current = current.parent;\r\n }\r\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\r\n var input = inputs_1[_i];\r\n if (input.id) {\r\n result[input.id] = input;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n SubmitActionBase.prototype.internalPrepareForExecution = function (inputs) {\r\n if (this._originalData) {\r\n this._processedData = JSON.parse(JSON.stringify(this._originalData));\r\n }\r\n else {\r\n this._processedData = {};\r\n }\r\n if (this._processedData && inputs) {\r\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = inputs[key];\r\n if (input.id && input.isSet()) {\r\n this._processedData[input.id] =\r\n typeof input.value === \"string\" ? input.value : input.value.toString();\r\n }\r\n }\r\n }\r\n this._isPrepared = true;\r\n };\r\n SubmitActionBase.prototype.internalAfterExecute = function () {\r\n if (shared_1.GlobalSettings.resetInputsDirtyStateAfterActionExecution) {\r\n this.resetReferencedInputsDirtyState();\r\n }\r\n };\r\n SubmitActionBase.prototype.resetReferencedInputsDirtyState = function () {\r\n var referencedInputs = this.getReferencedInputs();\r\n this._areReferencedInputsDirty = false;\r\n if (referencedInputs) {\r\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = referencedInputs[key];\r\n input.resetDirtyState();\r\n }\r\n }\r\n };\r\n SubmitActionBase.prototype.updateEnabledState = function () {\r\n this._areReferencedInputsDirty = false;\r\n var referencedInputs = this.getReferencedInputs();\r\n if (referencedInputs) {\r\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = referencedInputs[key];\r\n if (input.isDirty()) {\r\n this._areReferencedInputsDirty = true;\r\n break;\r\n }\r\n }\r\n }\r\n this.updateCssClasses();\r\n if (this._renderedElement) {\r\n this.setupElementForAccessibility(this._renderedElement);\r\n }\r\n };\r\n SubmitActionBase.prototype.isEffectivelyEnabled = function () {\r\n var result = _super.prototype.isEffectivelyEnabled.call(this);\r\n return this.disabledUnlessAssociatedInputsChange\r\n ? result && this._areReferencedInputsDirty\r\n : result;\r\n };\r\n Object.defineProperty(SubmitActionBase.prototype, \"data\", {\r\n get: function () {\r\n return this._isPrepared ? this._processedData : this._originalData;\r\n },\r\n set: function (value) {\r\n this._originalData = value;\r\n this._isPrepared = false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SubmitActionBase.dataProperty = new serialization_1.PropertyDefinition(serialization_1.Versions.v1_0, \"data\");\r\n SubmitActionBase.associatedInputsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_3, \"associatedInputs\", function (sender, prop, source, context) {\r\n var value = source[prop.name];\r\n if (value !== undefined && typeof value === \"string\") {\r\n return value.toLowerCase() === \"none\" ? \"none\" : \"auto\";\r\n }\r\n return undefined;\r\n }, function (sender, prop, target, value, context) {\r\n context.serializeValue(target, prop.name, value);\r\n });\r\n SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, \"disabledUnlessAssociatedInputsChange\", false);\r\n __decorate([\r\n (0, serialization_1.property)(SubmitActionBase.dataProperty)\r\n ], SubmitActionBase.prototype, \"_originalData\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(SubmitActionBase.associatedInputsProperty)\r\n ], SubmitActionBase.prototype, \"associatedInputs\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty)\r\n ], SubmitActionBase.prototype, \"disabledUnlessAssociatedInputsChange\", void 0);\r\n return SubmitActionBase;\r\n}(Action));\r\nexports.SubmitActionBase = SubmitActionBase;\r\nvar SubmitAction = /** @class */ (function (_super) {\r\n __extends(SubmitAction, _super);\r\n function SubmitAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SubmitAction.prototype.getJsonTypeName = function () {\r\n return SubmitAction.JsonTypeName;\r\n };\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n SubmitAction.JsonTypeName = \"Action.Submit\";\r\n return SubmitAction;\r\n}(SubmitActionBase));\r\nexports.SubmitAction = SubmitAction;\r\nvar UniversalAction = /** @class */ (function (_super) {\r\n __extends(UniversalAction, _super);\r\n function UniversalAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return UniversalAction;\r\n}(SubmitActionBase));\r\nexports.UniversalAction = UniversalAction;\r\nvar ExecuteAction = /** @class */ (function (_super) {\r\n __extends(ExecuteAction, _super);\r\n function ExecuteAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n ExecuteAction.prototype.getJsonTypeName = function () {\r\n return ExecuteAction.JsonTypeName;\r\n };\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n ExecuteAction.JsonTypeName = \"Action.Execute\";\r\n //#region Schema\r\n ExecuteAction.verbProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"verb\");\r\n __decorate([\r\n (0, serialization_1.property)(ExecuteAction.verbProperty)\r\n ], ExecuteAction.prototype, \"verb\", void 0);\r\n return ExecuteAction;\r\n}(UniversalAction));\r\nexports.ExecuteAction = ExecuteAction;\r\nvar DataQuery = /** @class */ (function (_super) {\r\n __extends(DataQuery, _super);\r\n function DataQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n DataQuery.prototype.getJsonTypeName = function () {\r\n return DataQuery.JsonTypeName;\r\n };\r\n Object.defineProperty(DataQuery.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n DataQuery.JsonTypeName = \"Data.Query\";\r\n //#region Schema\r\n DataQuery.datasetProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"dataset\");\r\n DataQuery.filterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"filter\");\r\n DataQuery.countProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"count\");\r\n DataQuery.skipProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"skip\");\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.datasetProperty)\r\n ], DataQuery.prototype, \"dataset\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.filterProperty)\r\n ], DataQuery.prototype, \"filter\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.countProperty)\r\n ], DataQuery.prototype, \"count\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.skipProperty)\r\n ], DataQuery.prototype, \"skip\", void 0);\r\n return DataQuery;\r\n}(UniversalAction));\r\nexports.DataQuery = DataQuery;\r\nvar OpenUrlAction = /** @class */ (function (_super) {\r\n __extends(OpenUrlAction, _super);\r\n function OpenUrlAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n OpenUrlAction.prototype.getJsonTypeName = function () {\r\n return OpenUrlAction.JsonTypeName;\r\n };\r\n OpenUrlAction.prototype.getAriaRole = function () {\r\n var ariaRole = this.getAriaRoleFromEnum();\r\n return ariaRole !== null && ariaRole !== void 0 ? ariaRole : \"link\";\r\n };\r\n OpenUrlAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.url) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\r\n }\r\n };\r\n OpenUrlAction.prototype.getHref = function () {\r\n return this.url;\r\n };\r\n //#region Schema\r\n OpenUrlAction.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\r\n //#endregion\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n OpenUrlAction.JsonTypeName = \"Action.OpenUrl\";\r\n __decorate([\r\n (0, serialization_1.property)(OpenUrlAction.urlProperty)\r\n ], OpenUrlAction.prototype, \"url\", void 0);\r\n return OpenUrlAction;\r\n}(Action));\r\nexports.OpenUrlAction = OpenUrlAction;\r\nvar ToggleVisibilityAction = /** @class */ (function (_super) {\r\n __extends(ToggleVisibilityAction, _super);\r\n function ToggleVisibilityAction() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.targetElements = {};\r\n return _this;\r\n }\r\n ToggleVisibilityAction.prototype.updateAriaControlsAttribute = function () {\r\n // apply aria labels to make it clear which elements this action will toggle\r\n if (this.targetElements) {\r\n var elementIds = Object.keys(this.targetElements);\r\n if (this._renderedElement) {\r\n if (elementIds.length > 0) {\r\n this._renderedElement.setAttribute(\"aria-controls\", elementIds.join(\" \"));\r\n }\r\n else {\r\n this._renderedElement.removeAttribute(\"aria-controls\");\r\n }\r\n }\r\n }\r\n };\r\n ToggleVisibilityAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.targetElements) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"targetElements\"));\r\n }\r\n };\r\n ToggleVisibilityAction.prototype.getJsonTypeName = function () {\r\n return ToggleVisibilityAction.JsonTypeName;\r\n };\r\n ToggleVisibilityAction.prototype.render = function () {\r\n _super.prototype.render.call(this);\r\n this.updateAriaControlsAttribute();\r\n };\r\n ToggleVisibilityAction.prototype.execute = function () {\r\n _super.prototype.execute.call(this);\r\n if (this.parent) {\r\n for (var _i = 0, _a = Object.keys(this.targetElements); _i < _a.length; _i++) {\r\n var elementId = _a[_i];\r\n var targetElement = this.parent.getRootElement().getElementById(elementId);\r\n if (targetElement) {\r\n if (typeof this.targetElements[elementId] === \"boolean\") {\r\n targetElement.isVisible = this.targetElements[elementId];\r\n }\r\n else {\r\n targetElement.isVisible = !targetElement.isVisible;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n ToggleVisibilityAction.prototype.addTargetElement = function (elementId, isVisible) {\r\n if (isVisible === void 0) { isVisible = undefined; }\r\n this.targetElements[elementId] = isVisible;\r\n this.updateAriaControlsAttribute();\r\n };\r\n ToggleVisibilityAction.prototype.removeTargetElement = function (elementId) {\r\n delete this.targetElements[elementId];\r\n this.updateAriaControlsAttribute();\r\n };\r\n ToggleVisibilityAction.targetElementsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_2, \"targetElements\", function (sender, prop, source, context) {\r\n var result = {};\r\n if (Array.isArray(source[prop.name])) {\r\n for (var _i = 0, _a = source[prop.name]; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (typeof item === \"string\") {\r\n result[item] = undefined;\r\n }\r\n else if (typeof item === \"object\") {\r\n var elementId = item[\"elementId\"];\r\n if (typeof elementId === \"string\") {\r\n result[elementId] = Utils.parseBool(item[\"isVisible\"]);\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }, function (sender, prop, target, value, context) {\r\n var targetElements = [];\r\n for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) {\r\n var id = _a[_i];\r\n if (typeof value[id] === \"boolean\") {\r\n targetElements.push({\r\n elementId: id,\r\n isVisible: value[id]\r\n });\r\n }\r\n else {\r\n targetElements.push(id);\r\n }\r\n }\r\n context.serializeArray(target, prop.name, targetElements);\r\n }, {}, function (sender) {\r\n return {};\r\n });\r\n //#endregion\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n ToggleVisibilityAction.JsonTypeName = \"Action.ToggleVisibility\";\r\n __decorate([\r\n (0, serialization_1.property)(ToggleVisibilityAction.targetElementsProperty)\r\n ], ToggleVisibilityAction.prototype, \"targetElements\", void 0);\r\n return ToggleVisibilityAction;\r\n}(Action));\r\nexports.ToggleVisibilityAction = ToggleVisibilityAction;\r\nvar StringWithSubstitutionProperty = /** @class */ (function (_super) {\r\n __extends(StringWithSubstitutionProperty, _super);\r\n function StringWithSubstitutionProperty(targetVersion, name) {\r\n var _this = _super.call(this, targetVersion, name, undefined, function () {\r\n return new shared_1.StringWithSubstitutions();\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n return _this;\r\n }\r\n StringWithSubstitutionProperty.prototype.parse = function (sender, source, context) {\r\n var result = new shared_1.StringWithSubstitutions();\r\n result.set(Utils.parseString(source[this.name]));\r\n return result;\r\n };\r\n StringWithSubstitutionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value.getOriginal());\r\n };\r\n return StringWithSubstitutionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nvar HttpHeader = /** @class */ (function (_super) {\r\n __extends(HttpHeader, _super);\r\n //#endregion\r\n function HttpHeader(name, value) {\r\n if (name === void 0) { name = \"\"; }\r\n if (value === void 0) { value = \"\"; }\r\n var _this = _super.call(this) || this;\r\n _this.name = name;\r\n _this.value = value;\r\n return _this;\r\n }\r\n HttpHeader.prototype.getSchemaKey = function () {\r\n return \"HttpHeader\";\r\n };\r\n HttpHeader.prototype.getReferencedInputs = function (inputs, referencedInputs) {\r\n this._value.getReferencedInputs(inputs, referencedInputs);\r\n };\r\n HttpHeader.prototype.prepareForExecution = function (inputs) {\r\n this._value.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\r\n };\r\n Object.defineProperty(HttpHeader.prototype, \"value\", {\r\n get: function () {\r\n return this._value.get();\r\n },\r\n set: function (newValue) {\r\n this._value.set(newValue);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n HttpHeader.nameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"name\");\r\n HttpHeader.valueProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(HttpHeader.nameProperty)\r\n ], HttpHeader.prototype, \"name\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpHeader.valueProperty)\r\n ], HttpHeader.prototype, \"_value\", void 0);\r\n return HttpHeader;\r\n}(serialization_1.SerializableObject));\r\nexports.HttpHeader = HttpHeader;\r\nvar HttpAction = /** @class */ (function (_super) {\r\n __extends(HttpAction, _super);\r\n function HttpAction() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._ignoreInputValidation = false;\r\n return _this;\r\n }\r\n HttpAction.prototype.internalGetReferencedInputs = function () {\r\n var allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : [];\r\n var result = {};\r\n this._url.getReferencedInputs(allInputs, result);\r\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\r\n var header = _a[_i];\r\n header.getReferencedInputs(allInputs, result);\r\n }\r\n this._body.getReferencedInputs(allInputs, result);\r\n return result;\r\n };\r\n HttpAction.prototype.internalPrepareForExecution = function (inputs) {\r\n if (inputs) {\r\n this._url.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\r\n var contentType = shared_1.ContentTypes.applicationJson;\r\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\r\n var header = _a[_i];\r\n header.prepareForExecution(inputs);\r\n if (header.name && header.name.toLowerCase() === \"content-type\") {\r\n contentType = header.value;\r\n }\r\n }\r\n this._body.substituteInputValues(inputs, contentType);\r\n }\r\n };\r\n HttpAction.prototype.getJsonTypeName = function () {\r\n return HttpAction.JsonTypeName;\r\n };\r\n HttpAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.url) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\r\n }\r\n if (this.headers.length > 0) {\r\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\r\n var header = _a[_i];\r\n if (!header.name) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.actionHttpHeadersMustHaveNameAndValue());\r\n }\r\n }\r\n }\r\n };\r\n Object.defineProperty(HttpAction.prototype, \"ignoreInputValidation\", {\r\n get: function () {\r\n return this._ignoreInputValidation;\r\n },\r\n set: function (value) {\r\n this._ignoreInputValidation = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HttpAction.prototype, \"url\", {\r\n get: function () {\r\n return this._url.get();\r\n },\r\n set: function (value) {\r\n this._url.set(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HttpAction.prototype, \"body\", {\r\n get: function () {\r\n return this._body.get();\r\n },\r\n set: function (value) {\r\n this._body.set(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n HttpAction.urlProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"url\");\r\n HttpAction.bodyProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"body\");\r\n HttpAction.methodProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"method\");\r\n HttpAction.headersProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"headers\", HttpHeader);\r\n HttpAction.ignoreInputValidationProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"ignoreInputValidation\", false);\r\n //#endregion\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n HttpAction.JsonTypeName = \"Action.Http\";\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.urlProperty)\r\n ], HttpAction.prototype, \"_url\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.bodyProperty)\r\n ], HttpAction.prototype, \"_body\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.methodProperty)\r\n ], HttpAction.prototype, \"method\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.headersProperty)\r\n ], HttpAction.prototype, \"headers\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.ignoreInputValidationProperty)\r\n ], HttpAction.prototype, \"_ignoreInputValidation\", void 0);\r\n return HttpAction;\r\n}(Action));\r\nexports.HttpAction = HttpAction;\r\nvar ShowCardAction = /** @class */ (function (_super) {\r\n __extends(ShowCardAction, _super);\r\n function ShowCardAction() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.card = new InlineAdaptiveCard();\r\n return _this;\r\n }\r\n ShowCardAction.prototype.updateCssClasses = function () {\r\n _super.prototype.updateCssClasses.call(this);\r\n if (this.renderedElement) {\r\n var effectiveHostConfig = this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\r\n this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName(\"expandable\"));\r\n this.renderedElement.setAttribute(\"aria-expanded\", (this.state === 1 /* Expanded */).toString());\r\n }\r\n };\r\n ShowCardAction.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n var jsonCard = source[\"card\"];\r\n if (jsonCard) {\r\n this.card.parse(jsonCard, context);\r\n }\r\n else {\r\n context.logParseEvent(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.showCardMustHaveCard());\r\n }\r\n };\r\n ShowCardAction.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n if (this.card) {\r\n context.serializeValue(target, \"card\", this.card.toJSON(context));\r\n }\r\n };\r\n ShowCardAction.prototype.raiseExecuteActionEvent = function () {\r\n if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) {\r\n // Only raise the event in Popup mode.\r\n _super.prototype.raiseExecuteActionEvent.call(this);\r\n }\r\n };\r\n ShowCardAction.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this.card.releaseDOMResources();\r\n };\r\n ShowCardAction.prototype.getJsonTypeName = function () {\r\n return ShowCardAction.JsonTypeName;\r\n };\r\n ShowCardAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n this.card.internalValidateProperties(context);\r\n };\r\n ShowCardAction.prototype.setParent = function (value) {\r\n _super.prototype.setParent.call(this, value);\r\n this.card.setParent(value);\r\n };\r\n ShowCardAction.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return this.card.getAllInputs(processActions);\r\n };\r\n ShowCardAction.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n result.push.apply(result, this.card.getAllActions());\r\n return result;\r\n };\r\n ShowCardAction.prototype.getResourceInformation = function () {\r\n var result = _super.prototype.getResourceInformation.call(this);\r\n result.push.apply(result, this.card.getResourceInformation());\r\n return result;\r\n };\r\n ShowCardAction.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result) {\r\n result = this.card.getActionById(id);\r\n }\r\n return result;\r\n };\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n ShowCardAction.JsonTypeName = \"Action.ShowCard\";\r\n return ShowCardAction;\r\n}(Action));\r\nexports.ShowCardAction = ShowCardAction;\r\nvar OverflowAction = /** @class */ (function (_super) {\r\n __extends(OverflowAction, _super);\r\n function OverflowAction(actions) {\r\n var _this = _super.call(this) || this;\r\n _this._actions = actions;\r\n _this.title = strings_1.Strings.defaults.overflowButtonText();\r\n _this.tooltip = strings_1.Strings.defaults.overflowButtonTooltip();\r\n return _this;\r\n }\r\n OverflowAction.prototype.getActions = function () {\r\n return this._actions;\r\n };\r\n OverflowAction.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n result.push.apply(result, this._actions);\r\n return result;\r\n };\r\n OverflowAction.prototype.getJsonTypeName = function () {\r\n return ShowCardAction.JsonTypeName;\r\n };\r\n OverflowAction.prototype.execute = function () {\r\n var _this = this;\r\n var _a;\r\n var shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(this, this.renderedElement);\r\n if (shouldDisplayPopupMenu && this.renderedElement) {\r\n var contextMenu_1 = new controls_1.PopupMenu();\r\n contextMenu_1.hostConfig = this.hostConfig;\r\n var _loop_2 = function (i) {\r\n var menuItem = new controls_1.MenuItem(i.toString(), (_a = this_1._actions[i].title) !== null && _a !== void 0 ? _a : \"\");\r\n menuItem.isEnabled = this_1._actions[i].isEnabled;\r\n menuItem.onClick = function () {\r\n var actionToExecute = _this._actions[i];\r\n contextMenu_1.closePopup(false);\r\n if (actionToExecute.isEnabled) {\r\n actionToExecute.execute();\r\n }\r\n };\r\n contextMenu_1.items.add(menuItem);\r\n };\r\n var this_1 = this;\r\n for (var i = 0; i < this._actions.length; i++) {\r\n _loop_2(i);\r\n }\r\n contextMenu_1.onClose = function () {\r\n var _a, _b;\r\n (_a = _this.renderedElement) === null || _a === void 0 ? void 0 : _a.focus();\r\n (_b = _this.renderedElement) === null || _b === void 0 ? void 0 : _b.setAttribute(\"aria-expanded\", \"false\");\r\n };\r\n this.renderedElement.setAttribute(\"aria-expanded\", \"true\");\r\n contextMenu_1.popup(this.renderedElement);\r\n contextMenu_1.selectedIndex = 0;\r\n }\r\n };\r\n OverflowAction.prototype.setupElementForAccessibility = function (element, promoteTooltipToLabel) {\r\n if (promoteTooltipToLabel === void 0) { promoteTooltipToLabel = false; }\r\n _super.prototype.setupElementForAccessibility.call(this, element, promoteTooltipToLabel);\r\n element.setAttribute(\"aria-label\", strings_1.Strings.defaults.overflowButtonTooltip());\r\n element.setAttribute(\"aria-expanded\", \"false\");\r\n };\r\n OverflowAction.JsonTypeName = \"Action.Overflow\";\r\n return OverflowAction;\r\n}(Action));\r\nvar ActionCollection = /** @class */ (function () {\r\n function ActionCollection(owner) {\r\n this._items = [];\r\n this._renderedActions = [];\r\n this._owner = owner;\r\n }\r\n ActionCollection.prototype.isActionAllowed = function (action) {\r\n var forbiddenTypes = this._owner.getForbiddenActionTypes();\r\n if (forbiddenTypes) {\r\n for (var _i = 0, forbiddenTypes_1 = forbiddenTypes; _i < forbiddenTypes_1.length; _i++) {\r\n var forbiddenType = forbiddenTypes_1[_i];\r\n if (action.constructor === forbiddenType) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n ActionCollection.prototype.refreshContainer = function () {\r\n clearElement(this._actionCardContainer);\r\n if (!this._actionCard) {\r\n this._actionCardContainer.style.marginTop = \"0px\";\r\n return;\r\n }\r\n this._actionCardContainer.style.marginTop =\r\n this.renderedActionCount > 0\r\n ? this._owner.hostConfig.actions.showCard.inlineTopMargin + \"px\"\r\n : \"0px\";\r\n var padding = this._owner.getEffectivePadding();\r\n this._owner.getImmediateSurroundingPadding(padding);\r\n var physicalPadding = this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n if (this._actionCard) {\r\n this._actionCard.style.paddingLeft = physicalPadding.left + \"px\";\r\n this._actionCard.style.paddingRight = physicalPadding.right + \"px\";\r\n this._actionCard.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this._actionCard.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n if (physicalPadding.bottom !== 0 && !this._owner.isDesignMode()) {\r\n this._actionCard.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this._actionCard.style.marginBottom = \"-\" + physicalPadding.bottom + \"px\";\r\n }\r\n Utils.appendChild(this._actionCardContainer, this._actionCard);\r\n }\r\n };\r\n ActionCollection.prototype.layoutChanged = function () {\r\n this._owner.getRootElement().updateLayout();\r\n };\r\n ActionCollection.prototype.showActionCard = function (action, suppressStyle, raiseEvent) {\r\n if (suppressStyle === void 0) { suppressStyle = false; }\r\n if (raiseEvent === void 0) { raiseEvent = true; }\r\n action.card.suppressStyle = suppressStyle;\r\n // Always re-render a ShowCard action in design mode; reuse already rendered ShowCard (if available) otherwise\r\n var renderedCard = action.card.renderedElement && !this._owner.isDesignMode()\r\n ? action.card.renderedElement\r\n : action.card.render();\r\n this._actionCard = renderedCard;\r\n this._expandedAction = action;\r\n this.refreshContainer();\r\n if (raiseEvent) {\r\n this.layoutChanged();\r\n raiseInlineCardExpandedEvent(action, true);\r\n }\r\n };\r\n ActionCollection.prototype.collapseExpandedAction = function () {\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n action.state = 0 /* Normal */;\r\n }\r\n var previouslyExpandedAction = this._expandedAction;\r\n this._expandedAction = undefined;\r\n this._actionCard = undefined;\r\n this.refreshContainer();\r\n if (previouslyExpandedAction) {\r\n this.layoutChanged();\r\n raiseInlineCardExpandedEvent(previouslyExpandedAction, false);\r\n }\r\n };\r\n ActionCollection.prototype.expandShowCardAction = function (action, raiseEvent) {\r\n var _this = this;\r\n var afterSelectedAction = false;\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var renderedAction = _a[_i];\r\n // Remove actions after selected action from tabOrder if the actions are oriented horizontally, to skip focus directly to expanded card\r\n if (this._owner.hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal &&\r\n afterSelectedAction) {\r\n renderedAction.isFocusable = false;\r\n }\r\n if (renderedAction !== action) {\r\n renderedAction.state = 2 /* Subdued */;\r\n }\r\n else {\r\n renderedAction.state = 1 /* Expanded */;\r\n afterSelectedAction = true;\r\n if (renderedAction.renderedElement) {\r\n renderedAction.renderedElement.onblur = function (_e) {\r\n for (var _i = 0, _a = _this._renderedActions; _i < _a.length; _i++) {\r\n var ra = _a[_i];\r\n ra.isFocusable = true;\r\n }\r\n };\r\n }\r\n }\r\n }\r\n this.showActionCard(action, !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()), raiseEvent);\r\n };\r\n ActionCollection.prototype.releaseDOMResources = function () {\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n action.releaseDOMResources();\r\n }\r\n };\r\n ActionCollection.prototype.actionExecuted = function (action) {\r\n if (!(action instanceof ShowCardAction)) {\r\n this.collapseExpandedAction();\r\n }\r\n else {\r\n if (action === this._expandedAction) {\r\n this.collapseExpandedAction();\r\n }\r\n else if (this._owner.hostConfig.actions.showCard.actionMode ===\r\n Enums.ShowCardActionMode.Inline) {\r\n this.expandShowCardAction(action, true);\r\n }\r\n }\r\n };\r\n ActionCollection.prototype.parse = function (source, context) {\r\n this.clear();\r\n if (Array.isArray(source)) {\r\n for (var _i = 0, source_1 = source; _i < source_1.length; _i++) {\r\n var jsonAction = source_1[_i];\r\n var forbiddenActions = [];\r\n // If the action owner is a ContainerWithActions, we should check for forbidden actions\r\n if (this._owner instanceof ContainerWithActions) {\r\n forbiddenActions = this._owner.getForbiddenActionNames();\r\n }\r\n var action = context.parseAction(this._owner, jsonAction, forbiddenActions, !this._owner.isDesignMode());\r\n if (action) {\r\n this.addAction(action);\r\n }\r\n }\r\n }\r\n };\r\n ActionCollection.prototype.toJSON = function (target, propertyName, context) {\r\n context.serializeArray(target, propertyName, this._items);\r\n };\r\n ActionCollection.prototype.getActionAt = function (id) {\r\n return this._items[id];\r\n };\r\n ActionCollection.prototype.getActionCount = function () {\r\n return this._items.length;\r\n };\r\n ActionCollection.prototype.getActionById = function (id) {\r\n var result = undefined;\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n result = item.getActionById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n return result;\r\n };\r\n ActionCollection.prototype.validateProperties = function (context) {\r\n if (this._owner.hostConfig.actions.maxActions &&\r\n this._items.length > this._owner.hostConfig.actions.maxActions) {\r\n context.addFailure(this._owner, Enums.ValidationEvent.TooManyActions, strings_1.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions));\r\n }\r\n if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) {\r\n context.addFailure(this._owner, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\r\n }\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (!this.isActionAllowed(item)) {\r\n context.addFailure(this._owner, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(item.getJsonTypeName()));\r\n }\r\n item.internalValidateProperties(context);\r\n }\r\n };\r\n ActionCollection.prototype.render = function (orientation) {\r\n // Cache hostConfig for better perf\r\n var hostConfig = this._owner.hostConfig;\r\n if (!hostConfig.supportsInteractivity) {\r\n return undefined;\r\n }\r\n var element = document.createElement(\"div\");\r\n var maxActions = hostConfig.actions.maxActions\r\n ? Math.min(hostConfig.actions.maxActions, this._items.length)\r\n : this._items.length;\r\n this._actionCardContainer = document.createElement(\"div\");\r\n this._renderedActions = [];\r\n if (hostConfig.actions.preExpandSingleShowCardAction &&\r\n maxActions === 1 &&\r\n this._items[0] instanceof ShowCardAction &&\r\n this.isActionAllowed(this._items[0])) {\r\n this.showActionCard(this._items[0], true);\r\n this._renderedActions.push(this._items[0]);\r\n }\r\n else {\r\n var buttonStrip = document.createElement(\"div\");\r\n buttonStrip.className = hostConfig.makeCssClassName(\"ac-actionSet\");\r\n buttonStrip.style.display = \"flex\";\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n buttonStrip.style.flexDirection = \"row\";\r\n if (this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n }\r\n else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n buttonStrip.style.flexDirection = \"column\";\r\n if (this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n }\r\n else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n case Enums.ActionAlignment.Stretch:\r\n buttonStrip.style.alignItems = \"stretch\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n }\r\n }\r\n var allowedActions = this._items.filter(this.isActionAllowed.bind(this));\r\n var primaryActions_1 = [];\r\n var secondaryActions_1 = [];\r\n if (!this._owner.isDesignMode()) {\r\n allowedActions.forEach(function (action) {\r\n return action.mode === Enums.ActionMode.Secondary\r\n ? secondaryActions_1.push(action)\r\n : primaryActions_1.push(action);\r\n });\r\n // If primaryActions.length > maxActions, extra actions are moved to overflow\r\n var overflowPrimaryActions = primaryActions_1.splice(hostConfig.actions.maxActions);\r\n if (shared_1.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) {\r\n secondaryActions_1.push.apply(secondaryActions_1, overflowPrimaryActions);\r\n }\r\n var shouldRenderOverflowActionButton = true;\r\n if (secondaryActions_1.length > 0) {\r\n if (!this._overflowAction) {\r\n this._overflowAction = new OverflowAction(secondaryActions_1);\r\n this._overflowAction.setParent(this._owner);\r\n this._overflowAction[\"_actionCollection\"] = this;\r\n }\r\n var isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent;\r\n shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(this._overflowAction, isRootAction);\r\n }\r\n if (this._overflowAction && shouldRenderOverflowActionButton) {\r\n primaryActions_1.push(this._overflowAction);\r\n }\r\n }\r\n else {\r\n primaryActions_1 = allowedActions;\r\n }\r\n for (var i = 0; i < primaryActions_1.length; i++) {\r\n var action = primaryActions_1[i];\r\n action.render();\r\n if (action.renderedElement) {\r\n if (hostConfig.actions.actionsOrientation === Enums.Orientation.Horizontal &&\r\n hostConfig.actions.actionAlignment === Enums.ActionAlignment.Stretch) {\r\n action.renderedElement.style.flex = \"0 1 100%\";\r\n }\r\n else {\r\n action.renderedElement.style.flex = \"0 1 auto\";\r\n }\r\n buttonStrip.appendChild(action.renderedElement);\r\n this._renderedActions.push(action);\r\n if (i < primaryActions_1.length - 1 && hostConfig.actions.buttonSpacing > 0) {\r\n var spacer = document.createElement(\"div\");\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n spacer.style.flex = \"0 0 auto\";\r\n spacer.style.width = hostConfig.actions.buttonSpacing + \"px\";\r\n }\r\n else {\r\n spacer.style.height = hostConfig.actions.buttonSpacing + \"px\";\r\n }\r\n Utils.appendChild(buttonStrip, spacer);\r\n }\r\n }\r\n }\r\n var buttonStripContainer = document.createElement(\"div\");\r\n buttonStripContainer.style.overflow = \"hidden\";\r\n buttonStripContainer.appendChild(buttonStrip);\r\n Utils.appendChild(element, buttonStripContainer);\r\n }\r\n Utils.appendChild(element, this._actionCardContainer);\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var renderedAction = _a[_i];\r\n if (renderedAction.state === 1 /* Expanded */) {\r\n this.expandShowCardAction(renderedAction, false);\r\n break;\r\n }\r\n }\r\n return this._renderedActions.length > 0 ? element : undefined;\r\n };\r\n ActionCollection.prototype.addAction = function (action) {\r\n if (!action) {\r\n throw new Error(\"The action parameter cannot be null.\");\r\n }\r\n if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) {\r\n this._items.push(action);\r\n if (!action.parent) {\r\n action.setParent(this._owner);\r\n }\r\n action[\"_actionCollection\"] = this;\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.actionAlreadyParented());\r\n }\r\n };\r\n ActionCollection.prototype.removeAction = function (action) {\r\n if (this.expandedAction && this._expandedAction === action) {\r\n this.collapseExpandedAction();\r\n }\r\n var actionIndex = this._items.indexOf(action);\r\n if (actionIndex >= 0) {\r\n this._items.splice(actionIndex, 1);\r\n action.setParent(undefined);\r\n action[\"_actionCollection\"] = undefined;\r\n for (var i = 0; i < this._renderedActions.length; i++) {\r\n if (this._renderedActions[i] === action) {\r\n this._renderedActions.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n ActionCollection.prototype.clear = function () {\r\n this._items = [];\r\n this._renderedActions = [];\r\n this._expandedAction = undefined;\r\n };\r\n ActionCollection.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n var result = [];\r\n if (processActions) {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n result.push.apply(result, action.getAllInputs());\r\n }\r\n }\r\n return result;\r\n };\r\n ActionCollection.prototype.getResourceInformation = function () {\r\n var result = [];\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n result.push.apply(result, action.getResourceInformation());\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ActionCollection.prototype, \"renderedActionCount\", {\r\n get: function () {\r\n return this._renderedActions.length;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ActionCollection.prototype, \"expandedAction\", {\r\n get: function () {\r\n return this._expandedAction;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ActionCollection;\r\n}());\r\nvar ActionSet = /** @class */ (function (_super) {\r\n __extends(ActionSet, _super);\r\n function ActionSet() {\r\n var _this = _super.call(this) || this;\r\n _this._actionCollection = new ActionCollection(_this);\r\n return _this;\r\n }\r\n ActionSet.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n };\r\n ActionSet.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n };\r\n ActionSet.prototype.internalRender = function () {\r\n return this._actionCollection.render(this.orientation !== undefined\r\n ? this.orientation\r\n : this.hostConfig.actions.actionsOrientation);\r\n };\r\n ActionSet.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this._actionCollection.releaseDOMResources();\r\n };\r\n ActionSet.prototype.isBleedingAtBottom = function () {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return _super.prototype.isBleedingAtBottom.call(this);\r\n }\r\n else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction);\r\n }\r\n else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n };\r\n ActionSet.prototype.getJsonTypeName = function () {\r\n return \"ActionSet\";\r\n };\r\n ActionSet.prototype.getActionCount = function () {\r\n return this._actionCollection.getActionCount();\r\n };\r\n ActionSet.prototype.getActionAt = function (index) {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n }\r\n else {\r\n return _super.prototype.getActionAt.call(this, index);\r\n }\r\n };\r\n ActionSet.prototype.getActionById = function (id) {\r\n var result = this._actionCollection.getActionById(id);\r\n return result ? result : _super.prototype.getActionById.call(this, id);\r\n };\r\n ActionSet.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n return result;\r\n };\r\n ActionSet.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n this._actionCollection.validateProperties(context);\r\n };\r\n ActionSet.prototype.addAction = function (action) {\r\n this._actionCollection.addAction(action);\r\n };\r\n ActionSet.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return processActions ? this._actionCollection.getAllInputs() : [];\r\n };\r\n ActionSet.prototype.getResourceInformation = function () {\r\n return this._actionCollection.getResourceInformation();\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n ActionSet.prototype.findDOMNodeOwner = function (node) {\r\n var target = undefined;\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action) {\r\n // recur through each Action\r\n target = action.findDOMNodeOwner(node);\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n }\r\n // if not found in any Action, defer to parent implementation\r\n return _super.prototype.findDOMNodeOwner.call(this, node);\r\n };\r\n ActionSet.prototype.getElementById = function (id) {\r\n var result = _super.prototype.getElementById.call(this, id);\r\n if (!result) {\r\n result = this.getElementByIdFromAction(id);\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ActionSet.prototype, \"isInteractive\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n ActionSet.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"orientation\", Enums.Orientation);\r\n __decorate([\r\n (0, serialization_1.property)(ActionSet.orientationProperty)\r\n ], ActionSet.prototype, \"orientation\", void 0);\r\n return ActionSet;\r\n}(CardElement));\r\nexports.ActionSet = ActionSet;\r\nvar ContainerStyleProperty = /** @class */ (function (_super) {\r\n __extends(ContainerStyleProperty, _super);\r\n function ContainerStyleProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, [\r\n { value: Enums.ContainerStyle.Default },\r\n { value: Enums.ContainerStyle.Emphasis },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Accent },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Good },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Attention },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Warning }\r\n ], defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n return ContainerStyleProperty;\r\n}(serialization_1.ValueSetProperty));\r\nexports.ContainerStyleProperty = ContainerStyleProperty;\r\nvar StylableCardElementContainer = /** @class */ (function (_super) {\r\n __extends(StylableCardElementContainer, _super);\r\n function StylableCardElementContainer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(StylableCardElementContainer.prototype, \"style\", {\r\n get: function () {\r\n if (this.allowCustomStyle) {\r\n var style = this.getValue(StylableCardElementContainer.styleProperty);\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n }\r\n return undefined;\r\n },\r\n set: function (value) {\r\n this.setValue(StylableCardElementContainer.styleProperty, value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(StylableCardElementContainer.prototype, \"allowCustomStyle\", {\r\n //#endregion\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(StylableCardElementContainer.prototype, \"hasExplicitStyle\", {\r\n get: function () {\r\n return this.getValue(StylableCardElementContainer.styleProperty) !== undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n StylableCardElementContainer.prototype.applyBorder = function () {\r\n // No border in base implementation\r\n };\r\n StylableCardElementContainer.prototype.applyBackground = function () {\r\n if (this.renderedElement) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\r\n if (styleDefinition.backgroundColor) {\r\n var bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor);\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n };\r\n StylableCardElementContainer.prototype.applyPadding = function () {\r\n _super.prototype.applyPadding.call(this);\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n var physicalPadding = new shared_1.SpacingDefinition();\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\r\n }\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n if (this.isBleeding()) {\r\n // Bleed into the first parent that does have padding\r\n var padding = new shared_1.PaddingDefinition();\r\n this.getImmediateSurroundingPadding(padding);\r\n var surroundingPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n this.renderedElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n this.renderedElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n if (!this.isDesignMode()) {\r\n this.renderedElement.style.marginTop = \"-\" + surroundingPadding.top + \"px\";\r\n this.renderedElement.style.marginBottom = \"-\" + surroundingPadding.bottom + \"px\";\r\n }\r\n if (this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n this.separatorElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n }\r\n }\r\n else {\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n this.renderedElement.style.marginTop = \"0\";\r\n this.renderedElement.style.marginBottom = \"0\";\r\n if (this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n };\r\n StylableCardElementContainer.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n var currentElement = this.parent;\r\n while (currentElement) {\r\n var currentElementHasBackgroundImage = false;\r\n if (ignoreBackgroundImages) {\r\n currentElementHasBackgroundImage = false;\r\n }\r\n else {\r\n currentElementHasBackgroundImage =\r\n currentElement instanceof Container\r\n ? currentElement.backgroundImage.isValid()\r\n : false;\r\n }\r\n if (currentElement instanceof StylableCardElementContainer) {\r\n if (this.hasExplicitStyle &&\r\n (currentElement.getEffectiveStyle() !== this.getEffectiveStyle() ||\r\n currentElementHasBackgroundImage)) {\r\n return true;\r\n }\r\n }\r\n currentElement = currentElement.parent;\r\n }\r\n return false;\r\n };\r\n StylableCardElementContainer.prototype.getDefaultPadding = function () {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding)\r\n : _super.prototype.getDefaultPadding.call(this);\r\n };\r\n StylableCardElementContainer.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n var explicitStyle = this.getValue(StylableCardElementContainer.styleProperty);\r\n if (explicitStyle !== undefined) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle);\r\n if (!styleDefinition) {\r\n context.addFailure(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(explicitStyle, \"style\"));\r\n }\r\n }\r\n };\r\n StylableCardElementContainer.prototype.render = function () {\r\n var renderedElement = _super.prototype.render.call(this);\r\n if (renderedElement && this.getHasBackground()) {\r\n this.applyBackground();\r\n }\r\n this.applyBorder();\r\n return renderedElement;\r\n };\r\n StylableCardElementContainer.prototype.getEffectiveStyle = function () {\r\n var effectiveStyle = this.style;\r\n return effectiveStyle ? effectiveStyle : _super.prototype.getEffectiveStyle.call(this);\r\n };\r\n //#region Schema\r\n StylableCardElementContainer.styleProperty = new ContainerStyleProperty(serialization_1.Versions.v1_0, \"style\");\r\n __decorate([\r\n (0, serialization_1.property)(StylableCardElementContainer.styleProperty)\r\n ], StylableCardElementContainer.prototype, \"style\", null);\r\n return StylableCardElementContainer;\r\n}(CardElementContainer));\r\nexports.StylableCardElementContainer = StylableCardElementContainer;\r\nvar ContainerBase = /** @class */ (function (_super) {\r\n __extends(ContainerBase, _super);\r\n function ContainerBase() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._bleed = false;\r\n return _this;\r\n }\r\n //#endregion\r\n ContainerBase.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n _super.prototype.adjustRenderedElementSize.call(this, renderedElement);\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n };\r\n ContainerBase.prototype.getHasExpandedAction = function () {\r\n return false;\r\n };\r\n ContainerBase.prototype.getBleed = function () {\r\n return this._bleed;\r\n };\r\n ContainerBase.prototype.setBleed = function (value) {\r\n this._bleed = value;\r\n };\r\n Object.defineProperty(ContainerBase.prototype, \"renderedActionCount\", {\r\n get: function () {\r\n return 0;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ContainerBase.prototype.isBleeding = function () {\r\n return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed();\r\n };\r\n ContainerBase.bleedProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"bleed\", false);\r\n ContainerBase.minHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_2, \"minHeight\");\r\n __decorate([\r\n (0, serialization_1.property)(ContainerBase.bleedProperty)\r\n ], ContainerBase.prototype, \"_bleed\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ContainerBase.minHeightProperty)\r\n ], ContainerBase.prototype, \"minPixelHeight\", void 0);\r\n return ContainerBase;\r\n}(StylableCardElementContainer));\r\nexports.ContainerBase = ContainerBase;\r\nvar BackgroundImage = /** @class */ (function (_super) {\r\n __extends(BackgroundImage, _super);\r\n function BackgroundImage() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n BackgroundImage.prototype.getSchemaKey = function () {\r\n return \"BackgroundImage\";\r\n };\r\n BackgroundImage.prototype.internalParse = function (source, context) {\r\n if (typeof source === \"string\") {\r\n this.resetDefaultValues();\r\n this.url = source;\r\n }\r\n else {\r\n return _super.prototype.internalParse.call(this, source, context);\r\n }\r\n };\r\n BackgroundImage.prototype.apply = function (element) {\r\n if (this.url && element.renderedElement) {\r\n element.renderedElement.style.backgroundImage =\r\n \"url('\" +\r\n element.preProcessPropertyValue(BackgroundImage.urlProperty, this.url) +\r\n \"')\";\r\n switch (this.fillMode) {\r\n case Enums.FillMode.Repeat:\r\n element.renderedElement.style.backgroundRepeat = \"repeat\";\r\n break;\r\n case Enums.FillMode.RepeatHorizontally:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-x\";\r\n break;\r\n case Enums.FillMode.RepeatVertically:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-y\";\r\n break;\r\n case Enums.FillMode.Cover:\r\n default:\r\n element.renderedElement.style.backgroundRepeat = \"no-repeat\";\r\n element.renderedElement.style.backgroundSize = \"cover\";\r\n break;\r\n }\r\n switch (this.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Left:\r\n break;\r\n case Enums.HorizontalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionX = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.renderedElement.style.backgroundPositionX = \"right\";\r\n break;\r\n }\r\n switch (this.verticalAlignment) {\r\n case Enums.VerticalAlignment.Top:\r\n break;\r\n case Enums.VerticalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionY = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.renderedElement.style.backgroundPositionY = \"bottom\";\r\n break;\r\n }\r\n }\r\n };\r\n BackgroundImage.prototype.isValid = function () {\r\n return this.url ? true : false;\r\n };\r\n //#region Schema\r\n BackgroundImage.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\r\n BackgroundImage.fillModeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fillMode\", Enums.FillMode, Enums.FillMode.Cover);\r\n BackgroundImage.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"horizontalAlignment\", Enums.HorizontalAlignment, Enums.HorizontalAlignment.Left);\r\n BackgroundImage.verticalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"verticalAlignment\", Enums.VerticalAlignment, Enums.VerticalAlignment.Top);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.urlProperty)\r\n ], BackgroundImage.prototype, \"url\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.fillModeProperty)\r\n ], BackgroundImage.prototype, \"fillMode\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.horizontalAlignmentProperty)\r\n ], BackgroundImage.prototype, \"horizontalAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.verticalAlignmentProperty)\r\n ], BackgroundImage.prototype, \"verticalAlignment\", void 0);\r\n return BackgroundImage;\r\n}(serialization_1.SerializableObject));\r\nexports.BackgroundImage = BackgroundImage;\r\nvar Container = /** @class */ (function (_super) {\r\n __extends(Container, _super);\r\n function Container() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n //#endregion\r\n _this._items = [];\r\n _this._renderedItems = [];\r\n return _this;\r\n }\r\n Object.defineProperty(Container.prototype, \"backgroundImage\", {\r\n get: function () {\r\n return this.getValue(Container.backgroundImageProperty);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Container.prototype.insertItemAt = function (item, index, forceInsert) {\r\n if (!item.parent || forceInsert) {\r\n if (item.isStandalone) {\r\n if (index < 0 || index >= this._items.length) {\r\n this._items.push(item);\r\n }\r\n else {\r\n this._items.splice(index, 0, item);\r\n }\r\n item.setParent(this);\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.elementTypeNotStandalone(item.getJsonTypeName()));\r\n }\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\r\n }\r\n };\r\n Container.prototype.getItemsCollectionPropertyName = function () {\r\n return \"items\";\r\n };\r\n Container.prototype.applyBackground = function () {\r\n if (this.backgroundImage.isValid() && this.renderedElement) {\r\n this.backgroundImage.apply(this);\r\n }\r\n _super.prototype.applyBackground.call(this);\r\n };\r\n Container.prototype.applyRTL = function (element) {\r\n if (this.rtl !== undefined) {\r\n element.dir = this.rtl ? \"rtl\" : \"ltr\";\r\n }\r\n };\r\n Container.prototype.internalRender = function () {\r\n this._renderedItems = [];\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n var hostConfig = this.hostConfig;\r\n var element = document.createElement(\"div\");\r\n this.applyRTL(element);\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-container\"));\r\n element.style.display = \"flex\";\r\n element.style.flexDirection = \"column\";\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // Forces the container to be at least as tall as its content.\r\n //\r\n // Fixes a quirk in Chrome where, for nested flex elements, the\r\n // inner element's height would never exceed the outer element's\r\n // height. This caused overflow truncation to break -- containers\r\n // would always be measured as not overflowing, since their heights\r\n // were constrained by their parents as opposed to truly reflecting\r\n // the height of their content.\r\n //\r\n // See the \"Browser Rendering Notes\" section of this answer:\r\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n switch (this.getEffectiveVerticalContentAlignment()) {\r\n case Enums.VerticalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n if (this._items.length > 0) {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n var renderedItem = this.isElementAllowed(item) ? item.render() : undefined;\r\n if (renderedItem) {\r\n if (this._renderedItems.length > 0 && item.separatorElement) {\r\n item.separatorElement.style.flex = \"0 0 auto\";\r\n Utils.appendChild(element, item.separatorElement);\r\n }\r\n Utils.appendChild(element, renderedItem);\r\n this._renderedItems.push(item);\r\n }\r\n }\r\n }\r\n else {\r\n if (this.isDesignMode()) {\r\n var placeholderElement = this.createPlaceholderElement();\r\n placeholderElement.style.width = \"100%\";\r\n placeholderElement.style.height = \"100%\";\r\n element.appendChild(placeholderElement);\r\n }\r\n }\r\n return element;\r\n };\r\n Container.prototype.truncateOverflow = function (maxHeight) {\r\n if (this.renderedElement) {\r\n // Add 1 to account for rounding differences between browsers\r\n var boundary_1 = this.renderedElement.offsetTop + maxHeight + 1;\r\n var handleElement_1 = function (cardElement) {\r\n var elt = cardElement.renderedElement;\r\n if (elt) {\r\n switch (Utils.getFitStatus(elt, boundary_1)) {\r\n case Enums.ContainerFitStatus.FullyInContainer:\r\n var sizeChanged = cardElement[\"resetOverflow\"]();\r\n // If the element's size changed after resetting content,\r\n // we have to check if it still fits fully in the card\r\n if (sizeChanged) {\r\n handleElement_1(cardElement);\r\n }\r\n break;\r\n case Enums.ContainerFitStatus.Overflowing:\r\n var containerMaxHeight = boundary_1 - elt.offsetTop;\r\n cardElement[\"handleOverflow\"](containerMaxHeight);\r\n break;\r\n case Enums.ContainerFitStatus.FullyOutOfContainer:\r\n cardElement[\"handleOverflow\"](0);\r\n break;\r\n }\r\n }\r\n };\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n handleElement_1(item);\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n Container.prototype.undoOverflowTruncation = function () {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n item[\"resetOverflow\"]();\r\n }\r\n };\r\n Container.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n var result = ignoreBackgroundImages ? false : this.backgroundImage.isValid();\r\n return result || _super.prototype.getHasBackground.call(this, ignoreBackgroundImages);\r\n };\r\n Container.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.clear();\r\n this.setShouldFallback(false);\r\n var jsonItems = source[this.getItemsCollectionPropertyName()];\r\n if (Array.isArray(jsonItems)) {\r\n for (var _i = 0, jsonItems_1 = jsonItems; _i < jsonItems_1.length; _i++) {\r\n var item = jsonItems_1[_i];\r\n var element = context.parseElement(this, item, this.forbiddenChildElements(), !this.isDesignMode());\r\n if (element) {\r\n this.insertItemAt(element, -1, true);\r\n }\r\n }\r\n }\r\n };\r\n Container.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n var collectionPropertyName = this.getItemsCollectionPropertyName();\r\n context.serializeArray(target, collectionPropertyName, this._items);\r\n };\r\n Object.defineProperty(Container.prototype, \"isSelectable\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Container.prototype.getEffectivePadding = function () {\r\n if (shared_1.GlobalSettings.removePaddingFromContainersWithBackgroundImage &&\r\n !this.getHasBackground(true)) {\r\n return new shared_1.PaddingDefinition();\r\n }\r\n return _super.prototype.getEffectivePadding.call(this);\r\n };\r\n Container.prototype.getEffectiveVerticalContentAlignment = function () {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n var parentContainer = this.getParentContainer();\r\n return parentContainer\r\n ? parentContainer.getEffectiveVerticalContentAlignment()\r\n : Enums.VerticalAlignment.Top;\r\n };\r\n Container.prototype.getItemCount = function () {\r\n return this._items.length;\r\n };\r\n Container.prototype.getItemAt = function (index) {\r\n return this._items[index];\r\n };\r\n Container.prototype.getFirstVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (var _i = 0, _a = this._renderedItems; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (item.isVisible) {\r\n return item;\r\n }\r\n }\r\n }\r\n return undefined;\r\n };\r\n Container.prototype.getLastVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (var i = this._renderedItems.length - 1; i >= 0; i--) {\r\n if (this._renderedItems[i].isVisible) {\r\n return this._renderedItems[i];\r\n }\r\n }\r\n }\r\n return undefined;\r\n };\r\n Container.prototype.getJsonTypeName = function () {\r\n return \"Container\";\r\n };\r\n Container.prototype.isFirstElement = function (element) {\r\n var designMode = this.isDesignMode();\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (item.isVisible || designMode) {\r\n return item === element;\r\n }\r\n }\r\n return false;\r\n };\r\n Container.prototype.isLastElement = function (element) {\r\n var designMode = this.isDesignMode();\r\n for (var i = this._items.length - 1; i >= 0; i--) {\r\n if (this._items[i].isVisible || designMode) {\r\n return this._items[i] === element;\r\n }\r\n }\r\n return false;\r\n };\r\n Container.prototype.isRtl = function () {\r\n if (this.rtl !== undefined) {\r\n return this.rtl;\r\n }\r\n else {\r\n var parentContainer = this.getParentContainer();\r\n return parentContainer ? parentContainer.isRtl() : false;\r\n }\r\n };\r\n Container.prototype.isBleedingAtTop = function () {\r\n var firstRenderedItem = this.getFirstVisibleRenderedItem();\r\n return (this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false));\r\n };\r\n Container.prototype.isBleedingAtBottom = function () {\r\n var lastRenderedItem = this.getLastVisibleRenderedItem();\r\n return (this.isBleeding() ||\r\n (lastRenderedItem\r\n ? lastRenderedItem.isBleedingAtBottom() &&\r\n lastRenderedItem.getEffectiveStyle() === this.getEffectiveStyle()\r\n : false));\r\n };\r\n Container.prototype.indexOf = function (cardElement) {\r\n return this._items.indexOf(cardElement);\r\n };\r\n Container.prototype.addItem = function (item) {\r\n this.insertItemAt(item, -1, false);\r\n };\r\n Container.prototype.insertItemBefore = function (item, insertBefore) {\r\n this.insertItemAt(item, this._items.indexOf(insertBefore), false);\r\n };\r\n Container.prototype.insertItemAfter = function (item, insertAfter) {\r\n this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false);\r\n };\r\n Container.prototype.removeItem = function (item) {\r\n var itemIndex = this._items.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n return false;\r\n };\r\n Container.prototype.clear = function () {\r\n this._items = [];\r\n this._renderedItems = [];\r\n };\r\n Container.prototype.getResourceInformation = function () {\r\n var result = _super.prototype.getResourceInformation.call(this);\r\n if (this.backgroundImage.isValid()) {\r\n result.push({\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- validated by `isValid()`\r\n url: this.backgroundImage.url,\r\n mimeType: \"image\"\r\n });\r\n }\r\n return result;\r\n };\r\n Container.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result) {\r\n if (this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n if (!result) {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n result = item.getActionById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(Container.prototype, \"padding\", {\r\n get: function () {\r\n return this.getPadding();\r\n },\r\n set: function (value) {\r\n this.setPadding(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"selectAction\", {\r\n get: function () {\r\n return this._selectAction;\r\n },\r\n set: function (value) {\r\n this._selectAction = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"bleed\", {\r\n get: function () {\r\n return this.getBleed();\r\n },\r\n set: function (value) {\r\n this.setBleed(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n Container.backgroundImageProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_0, \"backgroundImage\", BackgroundImage);\r\n Container.verticalContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"verticalContentAlignment\", Enums.VerticalAlignment);\r\n Container.rtlProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"rtl\");\r\n __decorate([\r\n (0, serialization_1.property)(Container.backgroundImageProperty)\r\n ], Container.prototype, \"backgroundImage\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Container.verticalContentAlignmentProperty)\r\n ], Container.prototype, \"verticalContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Container.rtlProperty)\r\n ], Container.prototype, \"rtl\", void 0);\r\n return Container;\r\n}(ContainerBase));\r\nexports.Container = Container;\r\nvar Column = /** @class */ (function (_super) {\r\n __extends(Column, _super);\r\n function Column(width) {\r\n if (width === void 0) { width = \"stretch\"; }\r\n var _this = _super.call(this) || this;\r\n _this.width = \"stretch\";\r\n //#endregion\r\n _this._computedWeight = 0;\r\n _this.width = width;\r\n return _this;\r\n }\r\n Column.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n var minDesignTimeColumnHeight = 20;\r\n if (this.isDesignMode()) {\r\n renderedElement.style.minWidth = \"20px\";\r\n renderedElement.style.minHeight =\r\n (!this.minPixelHeight\r\n ? minDesignTimeColumnHeight\r\n : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + \"px\";\r\n }\r\n else {\r\n renderedElement.style.minWidth = \"0\";\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n }\r\n if (this.width === \"auto\") {\r\n renderedElement.style.flex = \"0 1 auto\";\r\n }\r\n else if (this.width === \"stretch\") {\r\n renderedElement.style.flex = \"1 1 50px\";\r\n }\r\n else if (this.width instanceof shared_1.SizeAndUnit) {\r\n if (this.width.unit === Enums.SizeUnit.Pixel) {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n renderedElement.style.width = this.width.physicalSize + \"px\";\r\n }\r\n else {\r\n renderedElement.style.flex =\r\n \"1 1 \" +\r\n (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) +\r\n \"%\";\r\n }\r\n }\r\n };\r\n Column.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n Object.defineProperty(Column.prototype, \"separatorOrientation\", {\r\n get: function () {\r\n return Enums.Orientation.Vertical;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Column.prototype.getJsonTypeName = function () {\r\n return \"Column\";\r\n };\r\n Object.defineProperty(Column.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n if (this.parent && this.parent instanceof ColumnSet) {\r\n return this.separatorElement !== undefined && !this.parent.isLeftMostElement(this);\r\n }\r\n else {\r\n return false;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Column.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n Column.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"width\", function (sender, prop, source, context) {\r\n var result = prop.defaultValue;\r\n var value = source[prop.name];\r\n var invalidWidth = false;\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight);\r\n }\r\n else if (value === \"auto\" || value === \"stretch\") {\r\n result = value;\r\n }\r\n else if (typeof value === \"string\") {\r\n try {\r\n result = shared_1.SizeAndUnit.parse(value);\r\n if (result.unit === Enums.SizeUnit.Pixel &&\r\n prop.targetVersion.compareTo(context.targetVersion) > 0) {\r\n invalidWidth = true;\r\n }\r\n }\r\n catch (e) {\r\n invalidWidth = true;\r\n }\r\n }\r\n else {\r\n invalidWidth = true;\r\n }\r\n if (invalidWidth) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\r\n result = \"auto\";\r\n }\r\n return result;\r\n }, function (sender, property, target, value, context) {\r\n if (value instanceof shared_1.SizeAndUnit) {\r\n if (value.unit === Enums.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n }\r\n else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n }\r\n else {\r\n context.serializeValue(target, \"width\", value);\r\n }\r\n }, \"stretch\");\r\n __decorate([\r\n (0, serialization_1.property)(Column.widthProperty)\r\n ], Column.prototype, \"width\", void 0);\r\n return Column;\r\n}(Container));\r\nexports.Column = Column;\r\nvar ColumnSet = /** @class */ (function (_super) {\r\n __extends(ColumnSet, _super);\r\n function ColumnSet() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._columns = [];\r\n return _this;\r\n }\r\n ColumnSet.prototype.createColumnInstance = function (source, context) {\r\n return context.parseCardObject(this, source, [], !this.isDesignMode(), function (typeName) {\r\n return !typeName || typeName === \"Column\" ? new Column() : undefined;\r\n }, function (typeName, _errorType) {\r\n context.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n });\r\n };\r\n ColumnSet.prototype.internalRender = function () {\r\n this._renderedColumns = [];\r\n if (this._columns.length > 0) {\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n var hostConfig = this.hostConfig;\r\n var element = document.createElement(\"div\");\r\n element.className = hostConfig.makeCssClassName(\"ac-columnSet\");\r\n element.style.display = \"flex\";\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // See comment in Container.internalRender()\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n var totalWeight = 0;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.width instanceof shared_1.SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight) {\r\n totalWeight += column.width.physicalSize;\r\n }\r\n }\r\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\r\n var column = _c[_b];\r\n if (column.width instanceof shared_1.SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight &&\r\n totalWeight > 0) {\r\n var computedWeight = (100 / totalWeight) * column.width.physicalSize;\r\n // Best way to emulate \"internal\" access I know of\r\n column[\"_computedWeight\"] = computedWeight;\r\n }\r\n var renderedColumn = column.render();\r\n if (renderedColumn) {\r\n if (this._renderedColumns.length > 0 && column.separatorElement) {\r\n column.separatorElement.style.flex = \"0 0 auto\";\r\n Utils.appendChild(element, column.separatorElement);\r\n }\r\n Utils.appendChild(element, renderedColumn);\r\n this._renderedColumns.push(column);\r\n }\r\n }\r\n return this._renderedColumns.length > 0 ? element : undefined;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ColumnSet.prototype.truncateOverflow = function (maxHeight) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n column[\"handleOverflow\"](maxHeight);\r\n }\r\n return true;\r\n };\r\n ColumnSet.prototype.undoOverflowTruncation = function () {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n column[\"resetOverflow\"]();\r\n }\r\n };\r\n Object.defineProperty(ColumnSet.prototype, \"isSelectable\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ColumnSet.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._columns = [];\r\n this._renderedColumns = [];\r\n var jsonColumns = source[\"columns\"];\r\n if (Array.isArray(jsonColumns)) {\r\n for (var _i = 0, jsonColumns_1 = jsonColumns; _i < jsonColumns_1.length; _i++) {\r\n var item = jsonColumns_1[_i];\r\n var column = this.createColumnInstance(item, context);\r\n if (column) {\r\n this._columns.push(column);\r\n }\r\n }\r\n }\r\n };\r\n ColumnSet.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n context.serializeArray(target, \"columns\", this._columns);\r\n };\r\n ColumnSet.prototype.isFirstElement = function (element) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.isVisible) {\r\n return column === element;\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.isBleedingAtTop = function () {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.isBleedingAtTop()) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.isBleedingAtBottom = function () {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.isBleedingAtBottom()) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.getItemCount = function () {\r\n return this._columns.length;\r\n };\r\n ColumnSet.prototype.getFirstVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[0];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ColumnSet.prototype.getLastVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[this._renderedColumns.length - 1];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ColumnSet.prototype.getColumnAt = function (index) {\r\n return this._columns[index];\r\n };\r\n ColumnSet.prototype.getItemAt = function (index) {\r\n return this.getColumnAt(index);\r\n };\r\n ColumnSet.prototype.getJsonTypeName = function () {\r\n return \"ColumnSet\";\r\n };\r\n ColumnSet.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n var weightedColumns = 0;\r\n var stretchedColumns = 0;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (typeof column.width === \"number\") {\r\n weightedColumns++;\r\n }\r\n else if (column.width === \"stretch\") {\r\n stretchedColumns++;\r\n }\r\n }\r\n if (weightedColumns > 0 && stretchedColumns > 0) {\r\n context.addFailure(this, Enums.ValidationEvent.Hint, strings_1.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet());\r\n }\r\n };\r\n ColumnSet.prototype.addColumn = function (column) {\r\n if (!column.parent) {\r\n this._columns.push(column);\r\n column.setParent(this);\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.columnAlreadyBelongsToAnotherSet());\r\n }\r\n };\r\n ColumnSet.prototype.removeItem = function (item) {\r\n if (item instanceof Column) {\r\n var itemIndex = this._columns.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._columns.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1;\r\n };\r\n ColumnSet.prototype.isLeftMostElement = function (element) {\r\n return this._columns.indexOf(element) === 0;\r\n };\r\n ColumnSet.prototype.isRightMostElement = function (element) {\r\n return this._columns.indexOf(element) === this._columns.length - 1;\r\n };\r\n ColumnSet.prototype.isTopElement = function (element) {\r\n return this._columns.indexOf(element) >= 0;\r\n };\r\n ColumnSet.prototype.isBottomElement = function (element) {\r\n return this._columns.indexOf(element) >= 0;\r\n };\r\n ColumnSet.prototype.getActionById = function (id) {\r\n var result = undefined;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n result = column.getActionById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ColumnSet.prototype, \"bleed\", {\r\n get: function () {\r\n return this.getBleed();\r\n },\r\n set: function (value) {\r\n this.setBleed(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColumnSet.prototype, \"padding\", {\r\n get: function () {\r\n return this.getPadding();\r\n },\r\n set: function (value) {\r\n this.setPadding(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColumnSet.prototype, \"selectAction\", {\r\n get: function () {\r\n return this._selectAction;\r\n },\r\n set: function (value) {\r\n this._selectAction = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ColumnSet;\r\n}(ContainerBase));\r\nexports.ColumnSet = ColumnSet;\r\nfunction raiseImageLoadedEvent(image) {\r\n var card = image.getRootElement();\r\n var onImageLoadedHandler = card && card.onImageLoaded ? card.onImageLoaded : AdaptiveCard.onImageLoaded;\r\n if (onImageLoadedHandler) {\r\n onImageLoadedHandler(image);\r\n }\r\n}\r\nfunction raiseAnchorClickedEvent(element, anchor, ev) {\r\n var card = element.getRootElement();\r\n var onAnchorClickedHandler = card && card.onAnchorClicked ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked;\r\n return onAnchorClickedHandler !== undefined\r\n ? onAnchorClickedHandler(element, anchor, ev)\r\n : false;\r\n}\r\nfunction raiseExecuteActionEvent(action) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onExecuteActionHandler = card && card.onExecuteAction ? card.onExecuteAction : AdaptiveCard.onExecuteAction;\r\n if (action.prepareForExecution() && onExecuteActionHandler) {\r\n onExecuteActionHandler(action);\r\n }\r\n}\r\nfunction raiseInlineCardExpandedEvent(action, isExpanded) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onInlineCardExpandedHandler = card && card.onInlineCardExpanded\r\n ? card.onInlineCardExpanded\r\n : AdaptiveCard.onInlineCardExpanded;\r\n if (onInlineCardExpandedHandler) {\r\n onInlineCardExpandedHandler(action, isExpanded);\r\n }\r\n}\r\nfunction raiseInputValueChangedEvent(input) {\r\n var card = input.getRootElement();\r\n var onInputValueChangedHandler = card && card.onInputValueChanged\r\n ? card.onInputValueChanged\r\n : AdaptiveCard.onInputValueChanged;\r\n if (onInputValueChangedHandler) {\r\n onInputValueChangedHandler(input);\r\n }\r\n}\r\nfunction raiseElementVisibilityChangedEvent(element, shouldUpdateLayout) {\r\n if (shouldUpdateLayout === void 0) { shouldUpdateLayout = true; }\r\n var rootElement = element.getRootElement();\r\n if (shouldUpdateLayout) {\r\n rootElement.updateLayout();\r\n }\r\n var card = rootElement;\r\n var onElementVisibilityChangedHandler = card && card.onElementVisibilityChanged\r\n ? card.onElementVisibilityChanged\r\n : AdaptiveCard.onElementVisibilityChanged;\r\n if (onElementVisibilityChangedHandler !== undefined) {\r\n onElementVisibilityChangedHandler(element);\r\n }\r\n}\r\nfunction updateInputAdornersVisibility(input, hide) {\r\n if (!!hide) {\r\n // hides the time/date picker icon\r\n input.readOnly = true;\r\n // hides the cross button icon\r\n input.required = true;\r\n }\r\n else {\r\n // shows the time/date picker icon\r\n input.readOnly = false;\r\n // shows the cross button icon\r\n input.required = false;\r\n }\r\n}\r\n/**\r\n * @returns return false to continue with default context menu; return true to skip SDK default context menu\r\n */\r\nfunction raiseDisplayOverflowActionMenuEvent(action, target) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onDisplayOverflowActionMenuHandler = card && card.onDisplayOverflowActionMenu\r\n ? card.onDisplayOverflowActionMenu\r\n : AdaptiveCard.onDisplayOverflowActionMenu;\r\n return onDisplayOverflowActionMenuHandler !== undefined\r\n ? onDisplayOverflowActionMenuHandler(action.getActions(), target)\r\n : false;\r\n}\r\n/**\r\n * @returns return false to continue with default action button; return true to skip SDK default action button\r\n */\r\nfunction raiseRenderOverflowActionsEvent(action, isAtRootLevelActions) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onRenderOverflowActionsHandler = card && card.onRenderOverflowActions\r\n ? card.onRenderOverflowActions\r\n : AdaptiveCard.onRenderOverflowActions;\r\n return onRenderOverflowActionsHandler !== undefined\r\n ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions)\r\n : false;\r\n}\r\nvar ContainerWithActions = /** @class */ (function (_super) {\r\n __extends(ContainerWithActions, _super);\r\n function ContainerWithActions() {\r\n var _this = _super.call(this) || this;\r\n _this._actionCollection = new ActionCollection(_this);\r\n return _this;\r\n }\r\n ContainerWithActions.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.parseActions(source, context);\r\n };\r\n ContainerWithActions.prototype.parseActions = function (source, context) {\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n };\r\n ContainerWithActions.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n };\r\n ContainerWithActions.prototype.internalRender = function () {\r\n var element = _super.prototype.internalRender.call(this);\r\n if (element) {\r\n var renderedActions = this._actionCollection.render(this.hostConfig.actions.actionsOrientation);\r\n if (renderedActions) {\r\n Utils.appendChild(element, renderSeparation(this.hostConfig, {\r\n spacing: this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing)\r\n }, Enums.Orientation.Horizontal));\r\n Utils.appendChild(element, renderedActions);\r\n }\r\n if (this.renderIfEmpty) {\r\n return element;\r\n }\r\n else {\r\n return element.children.length > 0 ? element : undefined;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ContainerWithActions.prototype.getHasExpandedAction = function () {\r\n if (this.renderedActionCount === 0) {\r\n return false;\r\n }\r\n else if (this.renderedActionCount === 1) {\r\n return (this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction);\r\n }\r\n else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n };\r\n Object.defineProperty(ContainerWithActions.prototype, \"renderedActionCount\", {\r\n get: function () {\r\n return this._actionCollection.renderedActionCount;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContainerWithActions.prototype, \"renderIfEmpty\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ContainerWithActions.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this._actionCollection.releaseDOMResources();\r\n };\r\n ContainerWithActions.prototype.getActionCount = function () {\r\n return this._actionCollection.getActionCount();\r\n };\r\n ContainerWithActions.prototype.getActionAt = function (index) {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n }\r\n else {\r\n return _super.prototype.getActionAt.call(this, index);\r\n }\r\n };\r\n ContainerWithActions.prototype.getActionById = function (id) {\r\n var result = this._actionCollection.getActionById(id);\r\n return result ? result : _super.prototype.getActionById.call(this, id);\r\n };\r\n ContainerWithActions.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (this._actionCollection) {\r\n this._actionCollection.validateProperties(context);\r\n }\r\n };\r\n ContainerWithActions.prototype.isLastElement = function (element) {\r\n return _super.prototype.isLastElement.call(this, element) && this._actionCollection.getActionCount() === 0;\r\n };\r\n ContainerWithActions.prototype.addAction = function (action) {\r\n this._actionCollection.addAction(action);\r\n };\r\n ContainerWithActions.prototype.clear = function () {\r\n _super.prototype.clear.call(this);\r\n this._actionCollection.clear();\r\n };\r\n ContainerWithActions.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n var result = _super.prototype.getAllInputs.call(this, processActions);\r\n if (processActions) {\r\n result.push.apply(result, this._actionCollection.getAllInputs(processActions));\r\n }\r\n return result;\r\n };\r\n ContainerWithActions.prototype.getResourceInformation = function () {\r\n var result = _super.prototype.getResourceInformation.call(this);\r\n result.push.apply(result, this._actionCollection.getResourceInformation());\r\n return result;\r\n };\r\n ContainerWithActions.prototype.isBleedingAtBottom = function () {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return _super.prototype.isBleedingAtBottom.call(this);\r\n }\r\n else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction);\r\n }\r\n else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n };\r\n ContainerWithActions.prototype.getForbiddenActionNames = function () {\r\n return [];\r\n };\r\n ContainerWithActions.prototype.getElementById = function (id) {\r\n var result = _super.prototype.getElementById.call(this, id);\r\n if (!result) {\r\n result = this.getElementByIdFromAction(id);\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ContainerWithActions.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ContainerWithActions;\r\n}(Container));\r\nexports.ContainerWithActions = ContainerWithActions;\r\nvar RefreshActionProperty = /** @class */ (function (_super) {\r\n __extends(RefreshActionProperty, _super);\r\n function RefreshActionProperty(targetVersion, name) {\r\n var _this = _super.call(this, targetVersion, name, undefined) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n return _this;\r\n }\r\n RefreshActionProperty.prototype.parse = function (sender, source, context) {\r\n var action = context.parseAction(sender.parent, source[this.name], [], false);\r\n if (action !== undefined) {\r\n if (action instanceof ExecuteAction) {\r\n return action;\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(action.getJsonTypeName()));\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"action\"));\r\n return undefined;\r\n };\r\n RefreshActionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\r\n };\r\n return RefreshActionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nexports.RefreshActionProperty = RefreshActionProperty;\r\nvar RefreshDefinition = /** @class */ (function (_super) {\r\n __extends(RefreshDefinition, _super);\r\n function RefreshDefinition() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(RefreshDefinition.prototype, \"action\", {\r\n get: function () {\r\n return this.getValue(RefreshDefinition.actionProperty);\r\n },\r\n set: function (value) {\r\n this.setValue(RefreshDefinition.actionProperty, value);\r\n if (value) {\r\n value.setParent(this.parent);\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n RefreshDefinition.prototype.getSchemaKey = function () {\r\n return \"RefreshDefinition\";\r\n };\r\n //#region Schema\r\n RefreshDefinition.actionProperty = new RefreshActionProperty(serialization_1.Versions.v1_4, \"action\");\r\n RefreshDefinition.userIdsProperty = new serialization_1.StringArrayProperty(serialization_1.Versions.v1_4, \"userIds\");\r\n __decorate([\r\n (0, serialization_1.property)(RefreshDefinition.actionProperty)\r\n ], RefreshDefinition.prototype, \"action\", null);\r\n __decorate([\r\n (0, serialization_1.property)(RefreshDefinition.userIdsProperty)\r\n ], RefreshDefinition.prototype, \"userIds\", void 0);\r\n return RefreshDefinition;\r\n}(serialization_1.SerializableObject));\r\nexports.RefreshDefinition = RefreshDefinition;\r\nvar AuthCardButton = /** @class */ (function (_super) {\r\n __extends(AuthCardButton, _super);\r\n function AuthCardButton() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n AuthCardButton.prototype.getSchemaKey = function () {\r\n return \"AuthCardButton\";\r\n };\r\n //#region Schema\r\n AuthCardButton.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"type\");\r\n AuthCardButton.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"title\");\r\n AuthCardButton.imageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"image\");\r\n AuthCardButton.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.typeProperty)\r\n ], AuthCardButton.prototype, \"type\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.titleProperty)\r\n ], AuthCardButton.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.imageProperty)\r\n ], AuthCardButton.prototype, \"image\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.valueProperty)\r\n ], AuthCardButton.prototype, \"value\", void 0);\r\n return AuthCardButton;\r\n}(serialization_1.SerializableObject));\r\nexports.AuthCardButton = AuthCardButton;\r\nvar TokenExchangeResource = /** @class */ (function (_super) {\r\n __extends(TokenExchangeResource, _super);\r\n function TokenExchangeResource() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TokenExchangeResource.prototype.getSchemaKey = function () {\r\n return \"TokenExchangeResource\";\r\n };\r\n //#region Schema\r\n TokenExchangeResource.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"id\");\r\n TokenExchangeResource.uriProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"uri\");\r\n TokenExchangeResource.providerIdProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"providerId\");\r\n __decorate([\r\n (0, serialization_1.property)(TokenExchangeResource.idProperty)\r\n ], TokenExchangeResource.prototype, \"id\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TokenExchangeResource.uriProperty)\r\n ], TokenExchangeResource.prototype, \"uri\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TokenExchangeResource.providerIdProperty)\r\n ], TokenExchangeResource.prototype, \"providerId\", void 0);\r\n return TokenExchangeResource;\r\n}(serialization_1.SerializableObject));\r\nexports.TokenExchangeResource = TokenExchangeResource;\r\nvar Authentication = /** @class */ (function (_super) {\r\n __extends(Authentication, _super);\r\n function Authentication() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Authentication.prototype.getSchemaKey = function () {\r\n return \"Authentication\";\r\n };\r\n //#region Schema\r\n Authentication.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"text\");\r\n Authentication.connectionNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"connectionName\");\r\n Authentication.buttonsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_4, \"buttons\", AuthCardButton);\r\n Authentication.tokenExchangeResourceProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"tokenExchangeResource\", TokenExchangeResource, true);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.textProperty)\r\n ], Authentication.prototype, \"text\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.connectionNameProperty)\r\n ], Authentication.prototype, \"connectionName\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.buttonsProperty)\r\n ], Authentication.prototype, \"buttons\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.tokenExchangeResourceProperty)\r\n ], Authentication.prototype, \"tokenExchangeResource\", void 0);\r\n return Authentication;\r\n}(serialization_1.SerializableObject));\r\nexports.Authentication = Authentication;\r\n// @dynamic\r\nvar AdaptiveCard = /** @class */ (function (_super) {\r\n __extends(AdaptiveCard, _super);\r\n function AdaptiveCard() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.designMode = false;\r\n return _this;\r\n }\r\n Object.defineProperty(AdaptiveCard.prototype, \"refresh\", {\r\n get: function () {\r\n return this.getValue(AdaptiveCard.refreshProperty);\r\n },\r\n set: function (value) {\r\n this.setValue(AdaptiveCard.refreshProperty, value);\r\n if (value) {\r\n value.parent = this;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard, \"processMarkdown\", {\r\n get: function () {\r\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\r\n },\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n set: function (_value) {\r\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveCard.applyMarkdown = function (text) {\r\n var result = {\r\n didProcess: false\r\n };\r\n if (AdaptiveCard.onProcessMarkdown) {\r\n AdaptiveCard.onProcessMarkdown(text, result);\r\n }\r\n else if (window.markdownit) {\r\n // Check for markdownit\r\n var markdownIt = window.markdownit;\r\n result.outputHtml = markdownIt().render(text);\r\n result.didProcess = true;\r\n }\r\n else if (!AdaptiveCard._haveWarnedAboutNoMarkdownProcessing) {\r\n // eslint-disable-next-line no-console\r\n console.warn(strings_1.Strings.errors.markdownProcessingNotEnabled);\r\n AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = true;\r\n }\r\n return result;\r\n };\r\n AdaptiveCard.prototype.isVersionSupported = function () {\r\n if (this.bypassVersionCheck) {\r\n return true;\r\n }\r\n else {\r\n var unsupportedVersion = !this.version ||\r\n !this.version.isValid ||\r\n this.maxVersion.major < this.version.major ||\r\n (this.maxVersion.major === this.version.major &&\r\n this.maxVersion.minor < this.version.minor);\r\n return !unsupportedVersion;\r\n }\r\n };\r\n AdaptiveCard.prototype.getDefaultSerializationContext = function () {\r\n return new SerializationContext(this.version);\r\n };\r\n AdaptiveCard.prototype.getItemsCollectionPropertyName = function () {\r\n return \"body\";\r\n };\r\n AdaptiveCard.prototype.internalParse = function (source, context) {\r\n this._fallbackCard = undefined;\r\n var fallbackElement = context.parseElement(undefined, source[\"fallback\"], this.forbiddenChildElements(), !this.isDesignMode());\r\n if (fallbackElement) {\r\n this._fallbackCard = new AdaptiveCard();\r\n this._fallbackCard.addItem(fallbackElement);\r\n }\r\n _super.prototype.internalParse.call(this, source, context);\r\n };\r\n AdaptiveCard.prototype.internalToJSON = function (target, context) {\r\n this.setValue(AdaptiveCard.versionProperty, context.targetVersion);\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n };\r\n AdaptiveCard.prototype.internalRender = function () {\r\n var renderedElement = _super.prototype.internalRender.call(this);\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) {\r\n // Unlike containers, the root card element should be allowed to\r\n // be shorter than its content (otherwise the overflow truncation\r\n // logic would never get triggered)\r\n renderedElement.style.removeProperty(\"minHeight\");\r\n }\r\n return renderedElement;\r\n };\r\n AdaptiveCard.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n return true;\r\n };\r\n AdaptiveCard.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding);\r\n };\r\n AdaptiveCard.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n Object.defineProperty(AdaptiveCard.prototype, \"renderIfEmpty\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard.prototype, \"bypassVersionCheck\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard.prototype, \"allowCustomStyle\", {\r\n get: function () {\r\n return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard.prototype, \"hasBackground\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveCard.prototype.getJsonTypeName = function () {\r\n return \"AdaptiveCard\";\r\n };\r\n AdaptiveCard.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (this.getValue(CardElement.typeNameProperty) !== \"AdaptiveCard\") {\r\n context.addFailure(this, Enums.ValidationEvent.MissingCardType, strings_1.Strings.errors.invalidCardType());\r\n }\r\n if (!this.bypassVersionCheck && !this.version) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"version\"));\r\n }\r\n else if (!this.isVersionSupported()) {\r\n context.addFailure(this, Enums.ValidationEvent.UnsupportedCardVersion, strings_1.Strings.errors.unsupportedCardVersion(this.version.toString(), this.maxVersion.toString()));\r\n }\r\n };\r\n AdaptiveCard.prototype.render = function (target) {\r\n var _this = this;\r\n var renderedCard;\r\n if (this.shouldFallback() && this._fallbackCard) {\r\n this._fallbackCard.hostConfig = this.hostConfig;\r\n renderedCard = this._fallbackCard.render();\r\n }\r\n else {\r\n renderedCard = _super.prototype.render.call(this);\r\n if (renderedCard) {\r\n renderedCard.classList.add(this.hostConfig.makeCssClassName(\"ac-adaptiveCard\"));\r\n // Having a tabIndex on the root container for a card can mess up accessibility in some scenarios.\r\n // However, we've shipped this behavior before, and so can't just turn it off in a point release. For\r\n // now, to unblock accessibility scenarios for our customers, we've got an option to turn it off. In a\r\n // future release, we should strongly consider flipping the default such that we *don't* emit a tabIndex\r\n // by default.\r\n if (shared_1.GlobalSettings.setTabIndexAtCardRoot) {\r\n renderedCard.tabIndex = 0;\r\n }\r\n if (this.speak) {\r\n renderedCard.setAttribute(\"aria-label\", this.speak);\r\n }\r\n renderedCard.onmouseenter = function (ev) {\r\n _this.updateInputsVisualState(true /* hover */);\r\n };\r\n renderedCard.onmouseleave = function (ev) {\r\n _this.updateInputsVisualState(false /* hover */);\r\n };\r\n this.getRootElement().updateActionsEnabledState();\r\n }\r\n }\r\n if (target) {\r\n Utils.appendChild(target, renderedCard);\r\n this.updateLayout();\r\n }\r\n var inputElements = this.getAllInputs();\r\n document.onclick = function (event) {\r\n inputElements.forEach(function (input) {\r\n var _a, _b;\r\n if (input instanceof ChoiceSetInput &&\r\n !((_a = input.renderedElement) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {\r\n (_b = input\r\n .getDropdownElement()) === null || _b === void 0 ? void 0 : _b.classList.remove(_this.hostConfig.makeCssClassName(\"ac-choiceSetInput-filtered-dropdown-open\"));\r\n }\r\n });\r\n };\r\n return renderedCard;\r\n };\r\n AdaptiveCard.prototype.updateLayout = function (processChildren) {\r\n if (processChildren === void 0) { processChildren = true; }\r\n _super.prototype.updateLayout.call(this, processChildren);\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) {\r\n var padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default);\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n this[\"handleOverflow\"](this.renderedElement.offsetHeight - padding);\r\n }\r\n };\r\n AdaptiveCard.prototype.shouldFallback = function () {\r\n return _super.prototype.shouldFallback.call(this) || !this.isVersionSupported();\r\n };\r\n Object.defineProperty(AdaptiveCard.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveCard.schemaUrl = \"http://adaptivecards.io/schemas/adaptive-card.json\";\r\n //#region Schema\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n AdaptiveCard.$schemaProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"$schema\", function (sender, property, source, context) {\r\n return AdaptiveCard.schemaUrl;\r\n }, function (sender, prop, target, value, context) {\r\n context.serializeValue(target, prop.name, AdaptiveCard.schemaUrl);\r\n });\r\n AdaptiveCard.versionProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"version\", function (sender, prop, source, context) {\r\n var version = serialization_1.Version.parse(source[prop.name], context);\r\n if (version === undefined) {\r\n version = serialization_1.Versions.latest;\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidCardVersion(version.toString()));\r\n }\r\n return version;\r\n }, function (sender, prop, target, value, context) {\r\n if (value !== undefined) {\r\n context.serializeValue(target, prop.name, value.toString());\r\n }\r\n }, serialization_1.Versions.v1_0);\r\n AdaptiveCard.fallbackTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"fallbackText\");\r\n AdaptiveCard.speakProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"speak\");\r\n AdaptiveCard.refreshProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"refresh\", RefreshDefinition, true);\r\n AdaptiveCard.authenticationProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"authentication\", Authentication, true);\r\n //#endregion\r\n AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = false;\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.versionProperty)\r\n ], AdaptiveCard.prototype, \"version\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.fallbackTextProperty)\r\n ], AdaptiveCard.prototype, \"fallbackText\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.speakProperty)\r\n ], AdaptiveCard.prototype, \"speak\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.refreshProperty)\r\n ], AdaptiveCard.prototype, \"refresh\", null);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.authenticationProperty)\r\n ], AdaptiveCard.prototype, \"authentication\", void 0);\r\n return AdaptiveCard;\r\n}(ContainerWithActions));\r\nexports.AdaptiveCard = AdaptiveCard;\r\nvar InlineAdaptiveCard = /** @class */ (function (_super) {\r\n __extends(InlineAdaptiveCard, _super);\r\n function InlineAdaptiveCard() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.suppressStyle = false;\r\n return _this;\r\n }\r\n InlineAdaptiveCard.prototype.getSchemaKey = function () {\r\n return \"InlineAdaptiveCard\";\r\n };\r\n InlineAdaptiveCard.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty);\r\n };\r\n //#endregion\r\n InlineAdaptiveCard.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition(this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding, this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding);\r\n };\r\n Object.defineProperty(InlineAdaptiveCard.prototype, \"bypassVersionCheck\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(InlineAdaptiveCard.prototype, \"defaultStyle\", {\r\n get: function () {\r\n if (this.suppressStyle) {\r\n return Enums.ContainerStyle.Default;\r\n }\r\n else {\r\n return this.hostConfig.actions.showCard.style\r\n ? this.hostConfig.actions.showCard.style\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n InlineAdaptiveCard.prototype.render = function (target) {\r\n var renderedCard = _super.prototype.render.call(this, target);\r\n if (renderedCard) {\r\n renderedCard.setAttribute(\"aria-live\", \"polite\");\r\n renderedCard.removeAttribute(\"tabindex\");\r\n }\r\n return renderedCard;\r\n };\r\n return InlineAdaptiveCard;\r\n}(AdaptiveCard));\r\nvar SerializationContext = /** @class */ (function (_super) {\r\n __extends(SerializationContext, _super);\r\n function SerializationContext() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._forbiddenTypes = new Set();\r\n return _this;\r\n }\r\n SerializationContext.prototype.internalParseCardObject = function (parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent) {\r\n var _this = this;\r\n var result = undefined;\r\n if (source && typeof source === \"object\") {\r\n var oldForbiddenTypes_1 = new Set();\r\n this._forbiddenTypes.forEach(function (type) {\r\n oldForbiddenTypes_1.add(type);\r\n });\r\n forbiddenTypes.forEach(function (type) {\r\n _this._forbiddenTypes.add(type);\r\n });\r\n var typeName = Utils.parseString(source[\"type\"]);\r\n if (typeName && this._forbiddenTypes.has(typeName)) {\r\n logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType);\r\n }\r\n else {\r\n var tryToFallback = false;\r\n result = createInstanceCallback(typeName);\r\n if (!result) {\r\n tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback;\r\n logParseEvent(typeName, Enums.TypeErrorType.UnknownType);\r\n }\r\n else {\r\n result.setParent(parent);\r\n result.parse(source, this);\r\n tryToFallback =\r\n shared_1.GlobalSettings.enableFallback && allowFallback && result.shouldFallback();\r\n }\r\n if (tryToFallback) {\r\n var fallback = source[\"fallback\"];\r\n if (!fallback && parent) {\r\n parent.setShouldFallback(true);\r\n }\r\n if (typeof fallback === \"string\" && fallback.toLowerCase() === \"drop\") {\r\n result = undefined;\r\n }\r\n else if (typeof fallback === \"object\") {\r\n result = this.internalParseCardObject(parent, fallback, forbiddenTypes, true, createInstanceCallback, logParseEvent);\r\n }\r\n }\r\n }\r\n this._forbiddenTypes = oldForbiddenTypes_1;\r\n }\r\n return result;\r\n };\r\n SerializationContext.prototype.cardObjectParsed = function (o, source) {\r\n if (o instanceof Action && this.onParseAction) {\r\n this.onParseAction(o, source, this);\r\n }\r\n else if (o instanceof CardElement && this.onParseElement) {\r\n this.onParseElement(o, source, this);\r\n }\r\n };\r\n SerializationContext.prototype.shouldSerialize = function (o) {\r\n if (o instanceof Action) {\r\n return this.actionRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n }\r\n else if (o instanceof CardElement) {\r\n return this.elementRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n SerializationContext.prototype.parseCardObject = function (parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent) {\r\n var forbiddenTypes = new Set(forbiddenTypeNames);\r\n var result = this.internalParseCardObject(parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent);\r\n if (result !== undefined) {\r\n this.cardObjectParsed(result, source);\r\n }\r\n return result;\r\n };\r\n SerializationContext.prototype.parseElement = function (parent, source, forbiddenTypes, allowFallback) {\r\n var _this = this;\r\n return this.parseCardObject(parent, source, forbiddenTypes, allowFallback, function (typeName) {\r\n return _this.elementRegistry.createInstance(typeName, _this.targetVersion);\r\n }, function (typeName, errorType) {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownElementType, strings_1.Strings.errors.unknownElementType(typeName));\r\n }\r\n else {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n }\r\n });\r\n };\r\n SerializationContext.prototype.parseAction = function (parent, source, forbiddenActionTypes, allowFallback) {\r\n var _this = this;\r\n return this.parseCardObject(parent, source, forbiddenActionTypes, allowFallback, function (typeName) {\r\n return _this.actionRegistry.createInstance(typeName, _this.targetVersion);\r\n }, function (typeName, errorType) {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownActionType, strings_1.Strings.errors.unknownActionType(typeName));\r\n }\r\n else {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(typeName));\r\n }\r\n });\r\n };\r\n Object.defineProperty(SerializationContext.prototype, \"elementRegistry\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._elementRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.elements;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n SerializationContext.prototype.setElementRegistry = function (value) {\r\n this._elementRegistry = value;\r\n };\r\n Object.defineProperty(SerializationContext.prototype, \"actionRegistry\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._actionRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.actions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n SerializationContext.prototype.setActionRegistry = function (value) {\r\n this._actionRegistry = value;\r\n };\r\n return SerializationContext;\r\n}(serialization_1.BaseSerializationContext));\r\nexports.SerializationContext = SerializationContext;\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Container\", Container);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"TextBlock\", TextBlock);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"RichTextBlock\", RichTextBlock, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"TextRun\", TextRun, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Image\", Image);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"ImageSet\", ImageSet);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Media\", Media, serialization_1.Versions.v1_1);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"FactSet\", FactSet);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"ColumnSet\", ColumnSet);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"ActionSet\", ActionSet, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Text\", TextInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Date\", DateInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Time\", TimeInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Number\", NumberInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.ChoiceSet\", ChoiceSetInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Toggle\", ToggleInput);\r\nregistry_1.GlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction);\r\nregistry_1.GlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction);\r\nregistry_1.GlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction);\r\nregistry_1.GlobalRegistry.defaultActions.register(ToggleVisibilityAction.JsonTypeName, ToggleVisibilityAction, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, serialization_1.Versions.v1_4);\r\n//# sourceMappingURL=card-elements.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CardObject = exports.ValidationResults = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar strings_1 = require(\"./strings\");\r\nvar shared_1 = require(\"./shared\");\r\nvar host_capabilities_1 = require(\"./host-capabilities\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar ValidationResults = /** @class */ (function () {\r\n function ValidationResults() {\r\n this.allIds = {};\r\n this.validationEvents = [];\r\n }\r\n ValidationResults.prototype.addFailure = function (cardObject, event, message) {\r\n this.validationEvents.push({\r\n phase: Enums.ValidationPhase.Validation,\r\n source: cardObject,\r\n event: event,\r\n message: message\r\n });\r\n };\r\n return ValidationResults;\r\n}());\r\nexports.ValidationResults = ValidationResults;\r\nvar CardObject = /** @class */ (function (_super) {\r\n __extends(CardObject, _super);\r\n function CardObject() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n //#endregion\r\n _this._shouldFallback = false;\r\n return _this;\r\n }\r\n CardObject.prototype.getSchemaKey = function () {\r\n return this.getJsonTypeName();\r\n };\r\n Object.defineProperty(CardObject.prototype, \"requires\", {\r\n get: function () {\r\n return this.getValue(CardObject.requiresProperty);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if this CardObject contains the given DOM Node.\r\n * @param node The DOM Node to look for.\r\n * @returns `true` if the DOM Node was found, `false` otherwise.\r\n */\r\n CardObject.prototype.contains = function (node) {\r\n if (this._renderedElement) {\r\n return this._renderedElement.contains(node);\r\n }\r\n return false;\r\n };\r\n CardObject.prototype.preProcessPropertyValue = function (prop, propertyValue) {\r\n var value = propertyValue === undefined ? this.getValue(prop) : propertyValue;\r\n if (shared_1.GlobalSettings.allowPreProcessingPropertyValues) {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n var currentObject = this;\r\n while (currentObject && !currentObject.onPreProcessPropertyValue) {\r\n currentObject = currentObject.parent;\r\n }\r\n if (currentObject && currentObject.onPreProcessPropertyValue) {\r\n return currentObject.onPreProcessPropertyValue(this, prop, value);\r\n }\r\n }\r\n return value;\r\n };\r\n CardObject.prototype.setParent = function (value) {\r\n this._parent = value;\r\n };\r\n CardObject.prototype.setShouldFallback = function (value) {\r\n this._shouldFallback = value;\r\n };\r\n CardObject.prototype.shouldFallback = function () {\r\n return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities);\r\n };\r\n CardObject.prototype.getRootObject = function () {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n var currentObject = this;\r\n while (currentObject.parent) {\r\n currentObject = currentObject.parent;\r\n }\r\n return currentObject;\r\n };\r\n CardObject.prototype.internalValidateProperties = function (context) {\r\n if (this.id) {\r\n if (context.allIds.hasOwnProperty(this.id)) {\r\n if (context.allIds[this.id] === 1) {\r\n context.addFailure(this, Enums.ValidationEvent.DuplicateId, strings_1.Strings.errors.duplicateId(this.id));\r\n }\r\n context.allIds[this.id] += 1;\r\n }\r\n else {\r\n context.allIds[this.id] = 1;\r\n }\r\n }\r\n };\r\n CardObject.prototype.validateProperties = function () {\r\n var result = new ValidationResults();\r\n this.internalValidateProperties(result);\r\n return result;\r\n };\r\n /**\r\n * Recursively searches this CardObject and any children to find the\r\n * innermost CardObject that owns the given DOM Node.\r\n *\r\n * @param node The DOM Node to look for.\r\n *\r\n * @returns The owner of the given DOM Node, or `undefined` if no owner was found.\r\n */\r\n CardObject.prototype.findDOMNodeOwner = function (node) {\r\n // default implementation for CardObjects with no associated children\r\n return this.contains(node) ? this : undefined;\r\n };\r\n CardObject.prototype.releaseDOMResources = function () {\r\n // Do nothing in base implementation\r\n };\r\n Object.defineProperty(CardObject.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardObject.prototype, \"renderedElement\", {\r\n get: function () {\r\n return this._renderedElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardObject.typeNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"type\", undefined, undefined, undefined, function (sender) {\r\n return sender.getJsonTypeName();\r\n });\r\n CardObject.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"id\");\r\n CardObject.requiresProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_2, \"requires\", host_capabilities_1.HostCapabilities, false, new host_capabilities_1.HostCapabilities());\r\n __decorate([\r\n (0, serialization_1.property)(CardObject.idProperty)\r\n ], CardObject.prototype, \"id\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardObject.requiresProperty)\r\n ], CardObject.prototype, \"requires\", null);\r\n return CardObject;\r\n}(serialization_1.SerializableObject));\r\nexports.CardObject = CardObject;\r\n//# sourceMappingURL=card-object.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CarouselEvent = exports.Carousel = exports.CarouselPage = void 0;\r\n// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar card_elements_1 = require(\"./card-elements\");\r\nvar Enums = require(\"./enums\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar registry_1 = require(\"./registry\");\r\nvar enums_1 = require(\"./enums\");\r\nvar strings_1 = require(\"./strings\");\r\nvar swiper_1 = require(\"swiper\");\r\nvar Utils = require(\"./utils\");\r\nvar shared_1 = require(\"./shared\");\r\n// Note: to function correctly, consumers need to have CSS from swiper/css, swiper/css/pagination, and\r\n// swiper/css/navigation\r\nvar CarouselPage = /** @class */ (function (_super) {\r\n __extends(CarouselPage, _super);\r\n function CarouselPage() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#region Schema\r\n CarouselPage.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n // `style`, `bleed`, `isVisible` are not supported in CarouselPage\r\n schema.remove(card_elements_1.Container.styleProperty);\r\n schema.remove(card_elements_1.Container.bleedProperty);\r\n schema.remove(card_elements_1.Container.isVisibleProperty);\r\n };\r\n //#endregion\r\n CarouselPage.prototype.internalRender = function () {\r\n var carouselSlide = document.createElement(\"div\");\r\n carouselSlide.className = this.hostConfig.makeCssClassName(\"swiper-slide\");\r\n // `isRtl()` will set the correct value of rtl by reading the value from the parents\r\n this.rtl = this.isRtl();\r\n var renderedElement = _super.prototype.internalRender.call(this);\r\n Utils.appendChild(carouselSlide, renderedElement);\r\n return carouselSlide;\r\n };\r\n CarouselPage.prototype.getForbiddenActionTypes = function () {\r\n return [card_elements_1.ShowCardAction, card_elements_1.ToggleVisibilityAction];\r\n };\r\n CarouselPage.prototype.getForbiddenChildElements = function () {\r\n return this.forbiddenChildElements();\r\n };\r\n CarouselPage.prototype.forbiddenChildElements = function () {\r\n return __spreadArray([\r\n card_elements_1.ToggleVisibilityAction.JsonTypeName,\r\n card_elements_1.ShowCardAction.JsonTypeName,\r\n \"Media\",\r\n \"ActionSet\",\r\n \"Input.Text\",\r\n \"Input.Date\",\r\n \"Input.Time\",\r\n \"Input.Number\",\r\n \"Input.ChoiceSet\",\r\n \"Input.Toggle\",\r\n \"Carousel\"\r\n ], _super.prototype.forbiddenChildElements.call(this), true);\r\n };\r\n CarouselPage.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.setShouldFallback(false);\r\n };\r\n CarouselPage.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n CarouselPage.prototype.getJsonTypeName = function () {\r\n return \"CarouselPage\";\r\n };\r\n Object.defineProperty(CarouselPage.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CarouselPage.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return CarouselPage;\r\n}(card_elements_1.Container));\r\nexports.CarouselPage = CarouselPage;\r\nvar Carousel = /** @class */ (function (_super) {\r\n __extends(Carousel, _super);\r\n function Carousel() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.carouselLoop = true;\r\n _this.carouselOrientation = Enums.Orientation.Horizontal;\r\n _this._pages = [];\r\n _this._currentIndex = 0;\r\n _this._previousEventType = Enums.CarouselInteractionEvent.Pagination;\r\n return _this;\r\n }\r\n //#region Schema\r\n Carousel.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n // `style`, `bleed`, `isVisible` are not supported in Carousel\r\n schema.remove(card_elements_1.Container.styleProperty);\r\n schema.remove(card_elements_1.Container.bleedProperty);\r\n schema.remove(card_elements_1.Container.isVisibleProperty);\r\n };\r\n Object.defineProperty(Carousel.prototype, \"timer\", {\r\n get: function () {\r\n var timer = this.getValue(Carousel.timerProperty);\r\n if (timer && timer < this.hostConfig.carousel.minAutoplayDelay) {\r\n console.warn(strings_1.Strings.errors.tooLittleTimeDelay);\r\n timer = this.hostConfig.carousel.minAutoplayDelay;\r\n }\r\n return timer;\r\n },\r\n set: function (value) {\r\n if (value && value < this.hostConfig.carousel.minAutoplayDelay) {\r\n console.warn(strings_1.Strings.errors.tooLittleTimeDelay);\r\n this.setValue(Carousel.timerProperty, this.hostConfig.carousel.minAutoplayDelay);\r\n }\r\n else {\r\n this.setValue(Carousel.timerProperty, value);\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Carousel.prototype, \"initialPageIndex\", {\r\n get: function () {\r\n return this.getValue(Carousel.initialPageProperty);\r\n },\r\n set: function (value) {\r\n if (this.isValidParsedPageIndex(value)) {\r\n this.setValue(Carousel.initialPageProperty, value);\r\n }\r\n else {\r\n console.warn(strings_1.Strings.errors.invalidInitialPageIndex(value));\r\n this.setValue(Carousel.initialPageProperty, 0);\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Carousel.prototype.isValidParsedPageIndex = function (index) {\r\n return this._pages ? this.isValidPageIndex(index, this._pages.length) : false;\r\n };\r\n Carousel.prototype.isValidRenderedPageIndex = function (index) {\r\n return this._renderedPages ? this.isValidPageIndex(index, this._renderedPages.length) : false;\r\n };\r\n Carousel.prototype.isValidPageIndex = function (index, collectionSize) {\r\n return (collectionSize > 0 && 0 <= index && index < collectionSize);\r\n };\r\n Object.defineProperty(Carousel.prototype, \"previousEventType\", {\r\n //#endregion\r\n get: function () {\r\n return this._previousEventType;\r\n },\r\n set: function (eventType) {\r\n this._previousEventType = eventType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Question: Why do we place this on the Carousel instead of the CarouselPage?\r\n Carousel.prototype.forbiddenChildElements = function () {\r\n return __spreadArray([\r\n card_elements_1.ToggleVisibilityAction.JsonTypeName,\r\n card_elements_1.ShowCardAction.JsonTypeName,\r\n \"Media\",\r\n \"ActionSet\",\r\n \"Input.Text\",\r\n \"Input.Date\",\r\n \"Input.Time\",\r\n \"Input.Number\",\r\n \"Input.ChoiceSet\",\r\n \"Input.Toggle\"\r\n ], _super.prototype.forbiddenChildElements.call(this), true);\r\n };\r\n Carousel.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n _super.prototype.adjustRenderedElementSize.call(this, renderedElement);\r\n if (this.height == \"stretch\" && this._containerForAdorners !== undefined) {\r\n this._containerForAdorners.style.height = \"100%\";\r\n }\r\n // Assign the explicit height to carouselPageContainer if given\r\n if (this.carouselHeight) {\r\n this._carouselPageContainer.style.height = this.carouselHeight + \"px\";\r\n }\r\n };\r\n Carousel.prototype.getJsonTypeName = function () {\r\n return \"Carousel\";\r\n };\r\n Carousel.prototype.getItemCount = function () {\r\n return this._pages.length;\r\n };\r\n Carousel.prototype.getItemAt = function (index) {\r\n return this._pages[index];\r\n };\r\n Carousel.prototype.addPage = function (page) {\r\n this._pages.push(page);\r\n page.setParent(this);\r\n };\r\n Carousel.prototype.removeItem = function (item) {\r\n if (item instanceof CarouselPage) {\r\n var itemIndex = this._pages.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._pages.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Carousel.prototype.getFirstVisibleRenderedItem = function () {\r\n var _a;\r\n if (this.renderedElement && ((_a = this._renderedPages) === null || _a === void 0 ? void 0 : _a.length) > 0) {\r\n return this._renderedPages[0];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n Carousel.prototype.getLastVisibleRenderedItem = function () {\r\n var _a;\r\n if (this.renderedElement && ((_a = this._renderedPages) === null || _a === void 0 ? void 0 : _a.length) > 0) {\r\n return this._renderedPages[this._renderedPages.length - 1];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n Object.defineProperty(Carousel.prototype, \"currentPageId\", {\r\n get: function () {\r\n var _a, _b;\r\n if ((_b = (_a = this._carousel) === null || _a === void 0 ? void 0 : _a.slides) === null || _b === void 0 ? void 0 : _b.length) {\r\n var activeSlide = this._carousel.slides[this._carousel.activeIndex];\r\n return activeSlide.id;\r\n }\r\n return undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Carousel.prototype, \"currentPageIndex\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._carousel) === null || _a === void 0 ? void 0 : _a.realIndex;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Carousel.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._pages = [];\r\n var jsonPages = source[\"pages\"];\r\n if (Array.isArray(jsonPages)) {\r\n for (var _i = 0, jsonPages_1 = jsonPages; _i < jsonPages_1.length; _i++) {\r\n var item = jsonPages_1[_i];\r\n var page = this.createCarouselPageInstance(item, context);\r\n if (page) {\r\n this._pages.push(page);\r\n }\r\n }\r\n }\r\n // everything is parsed do validate on initial page index\r\n this.validateParsing(context);\r\n };\r\n Carousel.prototype.validateParsing = function (context) {\r\n if (!this.isValidParsedPageIndex(this.initialPageIndex)) {\r\n context.logParseEvent(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidInitialPageIndex(this.initialPageIndex));\r\n }\r\n };\r\n Carousel.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n context.serializeArray(target, \"pages\", this._pages);\r\n };\r\n Carousel.prototype.internalRender = function () {\r\n var _a;\r\n this._renderedPages = [];\r\n if (this._pages.length <= 0) {\r\n return undefined;\r\n }\r\n this.validateOrientationProperties();\r\n var cardLevelContainer = document.createElement(\"div\");\r\n cardLevelContainer.className = this.hostConfig.makeCssClassName(\"ac-carousel-card-level-container\");\r\n var carouselContainer = document.createElement(\"div\");\r\n carouselContainer.className = this.hostConfig.makeCssClassName(\"swiper\", \"ac-carousel\");\r\n this._carouselPageContainer = carouselContainer;\r\n var containerForAdorners = document.createElement(\"div\");\r\n containerForAdorners.className = this.hostConfig.makeCssClassName(\"ac-carousel-container\");\r\n this._containerForAdorners = containerForAdorners;\r\n cardLevelContainer.appendChild(containerForAdorners);\r\n var carouselWrapper = document.createElement(\"div\");\r\n carouselWrapper.className = this.hostConfig.makeCssClassName(\"swiper-wrapper\", \"ac-carousel-card-container\");\r\n carouselWrapper.style.display = \"flex\";\r\n switch (this.getEffectiveVerticalContentAlignment()) {\r\n case Enums.VerticalAlignment.Top:\r\n carouselWrapper.style.alignItems = \"flex-start\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n carouselWrapper.style.alignItems = \"flex-end\";\r\n break;\r\n default:\r\n carouselWrapper.style.alignItems = \"center\";\r\n break;\r\n }\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // Forces the container to be at least as tall as its content.\r\n //\r\n // Fixes a quirk in Chrome where, for nested flex elements, the\r\n // inner element's height would never exceed the outer element's\r\n // height. This caused overflow truncation to break -- containers\r\n // would always be measured as not overflowing, since their heights\r\n // were constrained by their parents as opposed to truly reflecting\r\n // the height of their content.\r\n //\r\n // See the \"Browser Rendering Notes\" section of this answer:\r\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\r\n carouselWrapper.style.minHeight = \"-webkit-min-content\";\r\n }\r\n var navigationContainer = document.createElement(\"div\");\r\n navigationContainer.className = this.hostConfig.makeCssClassName(\"ac-carousel-navigation\");\r\n var prevElementDiv = document.createElement(\"div\");\r\n prevElementDiv.className = this.hostConfig.makeCssClassName(\"swiper-button-prev\");\r\n var nextElementDiv = document.createElement(\"div\");\r\n nextElementDiv.className = this.hostConfig.makeCssClassName(\"swiper-button-next\");\r\n if (this.carouselOrientation === Enums.Orientation.Horizontal) {\r\n this.updateCssForHorizontalCarousel(prevElementDiv, nextElementDiv);\r\n }\r\n else {\r\n this.updateCssForVerticalCarousel(navigationContainer, prevElementDiv, nextElementDiv);\r\n }\r\n var pagination = document.createElement(\"div\");\r\n pagination.className = this.hostConfig.makeCssClassName(\"swiper-pagination\", \"ac-carousel-pagination\");\r\n navigationContainer.appendChild(prevElementDiv);\r\n Utils.addCancelSelectActionEventHandler(prevElementDiv);\r\n navigationContainer.appendChild(pagination);\r\n Utils.addCancelSelectActionEventHandler(pagination);\r\n navigationContainer.appendChild(nextElementDiv);\r\n Utils.addCancelSelectActionEventHandler(nextElementDiv);\r\n if (this.isDesignMode()) {\r\n // If we are in design mode, we need to ensure these elements are in front of the peers\r\n prevElementDiv.style.zIndex = \"20\";\r\n nextElementDiv.style.zIndex = \"20\";\r\n pagination.style.zIndex = \"20\";\r\n }\r\n var requestedNumberOfPages = Math.min(this._pages.length, this.hostConfig.carousel.maxCarouselPages);\r\n if (this._pages.length > this.hostConfig.carousel.maxCarouselPages) {\r\n console.warn(strings_1.Strings.errors.tooManyCarouselPages);\r\n }\r\n if (this._pages.length > 0) {\r\n for (var i = 0; i < requestedNumberOfPages; i++) {\r\n var page = this._pages[i];\r\n var renderedItem = this.isElementAllowed(page) ? page.render() : undefined;\r\n renderedItem === null || renderedItem === void 0 ? void 0 : renderedItem.classList.add(\"ac-carousel-page\");\r\n (_a = renderedItem === null || renderedItem === void 0 ? void 0 : renderedItem.children[0]) === null || _a === void 0 ? void 0 : _a.classList.add(\"ac-carousel-page-container\");\r\n if (renderedItem) {\r\n Utils.appendChild(carouselWrapper, renderedItem);\r\n this._renderedPages.push(page);\r\n }\r\n }\r\n }\r\n carouselContainer.appendChild(carouselWrapper);\r\n carouselContainer.tabIndex = this.isDesignMode() ? -1 : 0;\r\n containerForAdorners.appendChild(carouselContainer);\r\n containerForAdorners.appendChild(navigationContainer);\r\n // `isRtl()` will set the correct value of rtl by reading the value from the parents\r\n this.rtl = this.isRtl();\r\n this.applyRTL(pagination);\r\n if (!this.isDesignMode()) {\r\n if (this.isValidRenderedPageIndex(this.initialPageIndex)) {\r\n this._currentIndex = this.initialPageIndex;\r\n }\r\n else {\r\n console.warn(strings_1.Strings.errors.invalidInitialPageIndex(this.initialPageIndex));\r\n this._currentIndex = 0;\r\n }\r\n }\r\n this.initializeCarouselControl(carouselContainer, nextElementDiv, prevElementDiv, pagination, this.rtl);\r\n return this._renderedPages.length > 0 ? cardLevelContainer : undefined;\r\n };\r\n Carousel.prototype.applyRTL = function (pagination) {\r\n _super.prototype.applyRTL.call(this, this._carouselPageContainer);\r\n if (this.rtl) {\r\n pagination.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-pagination-rtl\"));\r\n }\r\n };\r\n Carousel.prototype.validateOrientationProperties = function () {\r\n if (!this.carouselHeight) {\r\n this.carouselOrientation = Enums.Orientation.Horizontal;\r\n }\r\n };\r\n Carousel.prototype.updateCssForHorizontalCarousel = function (prevElementDiv, nextElementDiv) {\r\n prevElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-left\"));\r\n nextElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-right\"));\r\n };\r\n Carousel.prototype.updateCssForVerticalCarousel = function (navigationContainer, prevElementDiv, nextElementDiv) {\r\n this._containerForAdorners.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-container-vertical\"));\r\n navigationContainer.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-navigation-vertical\"));\r\n prevElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-up\"));\r\n nextElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-down\"));\r\n };\r\n Carousel.prototype.initializeCarouselControl = function (carouselContainer, nextElement, prevElement, paginationElement, rtl) {\r\n var _this = this;\r\n var _a, _b, _c;\r\n var nextElementAdjustedForRtl = (rtl === undefined || !rtl ? nextElement : prevElement);\r\n var prevElementAdjustedForRtl = (rtl === undefined || !rtl ? prevElement : nextElement);\r\n var prevElementAdjustedForOrientation = (Enums.Orientation.Horizontal === this.carouselOrientation) ? prevElementAdjustedForRtl : prevElement;\r\n var nextElementAdjustedForOrientation = (Enums.Orientation.Horizontal === this.carouselOrientation) ? nextElementAdjustedForRtl : nextElement;\r\n var swiperOptions = {\r\n loop: !this.isDesignMode() && this.carouselLoop,\r\n modules: [swiper_1.Navigation, swiper_1.Pagination, swiper_1.Scrollbar, swiper_1.A11y, swiper_1.History, swiper_1.Keyboard],\r\n pagination: {\r\n el: paginationElement,\r\n clickable: true\r\n },\r\n navigation: {\r\n prevEl: prevElementAdjustedForOrientation,\r\n nextEl: nextElementAdjustedForOrientation\r\n },\r\n a11y: {\r\n enabled: true\r\n },\r\n keyboard: {\r\n enabled: false,\r\n onlyInViewport: true\r\n },\r\n direction: this.carouselOrientation === Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\",\r\n resizeObserver: false,\r\n initialSlide: this._currentIndex\r\n };\r\n if (this.timer && !this.isDesignMode()) {\r\n (_a = swiperOptions.modules) === null || _a === void 0 ? void 0 : _a.push(swiper_1.Autoplay);\r\n swiperOptions.autoplay = { delay: this.timer, pauseOnMouseEnter: true };\r\n }\r\n var carousel = new swiper_1.Swiper(carouselContainer, swiperOptions);\r\n // While the 'pauseOnMouseEnter' option should resume autoplay on\r\n // mouse exit it doesn't do it, so adding custom events to handle it\r\n carouselContainer.addEventListener(\"mouseenter\", function (_event) {\r\n var _a;\r\n (_a = carousel.autoplay) === null || _a === void 0 ? void 0 : _a.stop();\r\n });\r\n carouselContainer.addEventListener(\"mouseleave\", function (_event) {\r\n var _a;\r\n (_a = carousel.autoplay) === null || _a === void 0 ? void 0 : _a.start();\r\n });\r\n carousel.on('navigationNext', function (swiper) {\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.NavigationNext);\r\n });\r\n carousel.on('navigationPrev', function (swiper) {\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.NavigationPrevious);\r\n });\r\n carousel.on('slideChangeTransitionEnd', function (swiper) {\r\n _this.currentIndex = swiper.realIndex;\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.Pagination);\r\n });\r\n carousel.on('autoplay', function () {\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.Autoplay);\r\n });\r\n carousel.on('paginationRender', function (swiper, paginationEl) {\r\n swiper.pagination.bullets.forEach(function (bullet, index) {\r\n bullet.addEventListener(\"keypress\", function (event) {\r\n if (event.key == \"Enter\") {\r\n event.preventDefault();\r\n swiper.slideTo(index + 1);\r\n }\r\n });\r\n });\r\n });\r\n carousel.on('destroy', function () {\r\n _this.destroyResizeObserver();\r\n });\r\n prevElement.title = (_b = prevElement.ariaLabel) !== null && _b !== void 0 ? _b : strings_1.Strings.defaults.carouselNavigationPreviousTooltip();\r\n nextElement.title = (_c = nextElement.ariaLabel) !== null && _c !== void 0 ? _c : strings_1.Strings.defaults.carouselNavigationNextTooltip();\r\n this._carousel = carousel;\r\n this.createResizeObserver();\r\n };\r\n Carousel.prototype.createCarouselPageInstance = function (source, context) {\r\n return context.parseCardObject(this, source, this.forbiddenChildElements(), !this.isDesignMode(), function (typeName) {\r\n return !typeName || typeName === \"CarouselPage\" ? new CarouselPage() : undefined;\r\n }, function (typeName, _errorType) {\r\n context.logParseEvent(undefined, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n });\r\n };\r\n Carousel.prototype.slideTo = function (index) {\r\n var _a;\r\n (_a = this._carousel) === null || _a === void 0 ? void 0 : _a.slideTo(index);\r\n };\r\n Object.defineProperty(Carousel.prototype, \"carouselPageContainer\", {\r\n get: function () {\r\n return this._carouselPageContainer;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Carousel.prototype, \"currentIndex\", {\r\n get: function () {\r\n return this._currentIndex;\r\n },\r\n set: function (currentIndex) {\r\n this._currentIndex = currentIndex;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Carousel.prototype.createCarouselEvent = function (type) {\r\n var currentPageId;\r\n if (this.currentPageIndex != undefined) {\r\n currentPageId = this.getItemAt(this.currentPageIndex).id;\r\n }\r\n return new CarouselEvent(type, this.id, currentPageId, this.currentPageIndex);\r\n };\r\n Carousel.prototype.raiseCarouselEvent = function (eventType) {\r\n var card = this.parent ? this.parent.getRootElement() : undefined;\r\n var onCarouselEventHandler = card && card.onCarouselEvent\r\n ? card.onCarouselEvent\r\n : card_elements_1.AdaptiveCard.onCarouselEvent;\r\n // pagination event is triggered on slide transition end event \r\n if (onCarouselEventHandler && eventType == Enums.CarouselInteractionEvent.Pagination) {\r\n // returns the event type that causes slide transition\r\n onCarouselEventHandler(this.createCarouselEvent(this.previousEventType));\r\n }\r\n this.previousEventType = eventType;\r\n };\r\n /// Swiper version 8 added requestAnimationFrame() call in its resize observer code\r\n /// The new call causes flickering issue,\r\n /// We've copied resize observer code from Swiper version 7 with some modifications\r\n Carousel.prototype.createResizeObserver = function () {\r\n var _this = this;\r\n var _a;\r\n if (!this.checkIfCarouselInValidStateForResizeEvent()) {\r\n return;\r\n }\r\n this._observer = new ResizeObserver(function (entries) {\r\n var _a, _b, _c, _d;\r\n var width = (_a = _this._carousel) === null || _a === void 0 ? void 0 : _a.width;\r\n var height = (_b = _this._carousel) === null || _b === void 0 ? void 0 : _b.height;\r\n var newWidth = width;\r\n var newHeight = height;\r\n entries.forEach(function (_a) {\r\n var _b;\r\n var contentBoxSize = _a.contentBoxSize, contentRect = _a.contentRect, target = _a.target;\r\n if (target && target !== ((_b = _this._carousel) === null || _b === void 0 ? void 0 : _b.el)) {\r\n return;\r\n }\r\n newWidth = contentRect\r\n ? contentRect.width\r\n : (contentBoxSize[0] || contentBoxSize).inlineSize;\r\n newHeight = contentRect\r\n ? contentRect.height\r\n : (contentBoxSize[0] || contentBoxSize).blockSize;\r\n });\r\n if (newWidth !== width || newHeight !== height) {\r\n if (_this.checkIfCarouselInValidStateForResizeEvent()) {\r\n (_c = _this._carousel) === null || _c === void 0 ? void 0 : _c.emit('beforeResize');\r\n (_d = _this._carousel) === null || _d === void 0 ? void 0 : _d.emit('resize');\r\n }\r\n }\r\n });\r\n this._observer.observe((_a = this._carousel) === null || _a === void 0 ? void 0 : _a.el);\r\n };\r\n Carousel.prototype.destroyResizeObserver = function () {\r\n var _a;\r\n if (this._observer && this._observer.unobserve && ((_a = this._carousel) === null || _a === void 0 ? void 0 : _a.el)) {\r\n this._observer.unobserve(this._carousel.el);\r\n this._observer = null;\r\n }\r\n };\r\n ;\r\n Carousel.prototype.checkIfCarouselInValidStateForResizeEvent = function () {\r\n return this._carousel && !this._carousel.destroyed;\r\n };\r\n Carousel.timerProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"timer\", undefined);\r\n Carousel.initialPageProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"initialPage\", 0);\r\n Carousel.loopProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, \"loop\", true);\r\n Carousel.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"orientation\", Enums.Orientation, Enums.Orientation.Horizontal);\r\n Carousel.carouselHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_6, \"heightInPixels\");\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.timerProperty)\r\n ], Carousel.prototype, \"timer\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.initialPageProperty)\r\n ], Carousel.prototype, \"initialPageIndex\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.loopProperty)\r\n ], Carousel.prototype, \"carouselLoop\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.orientationProperty)\r\n ], Carousel.prototype, \"carouselOrientation\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.carouselHeightProperty)\r\n ], Carousel.prototype, \"carouselHeight\", void 0);\r\n return Carousel;\r\n}(card_elements_1.Container));\r\nexports.Carousel = Carousel;\r\nvar CarouselEvent = /** @class */ (function () {\r\n function CarouselEvent(type, carouselId, activeCarouselPageId, activeCarouselPageIndex) {\r\n this.type = type;\r\n this.carouselId = carouselId;\r\n this.activeCarouselPageId = activeCarouselPageId;\r\n this.activeCarouselPageIndex = activeCarouselPageIndex;\r\n }\r\n return CarouselEvent;\r\n}());\r\nexports.CarouselEvent = CarouselEvent;\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Carousel\", Carousel, serialization_1.Versions.v1_6);\r\n//# sourceMappingURL=carousel.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ChannelAdapter = void 0;\r\nvar ChannelAdapter = /** @class */ (function () {\r\n function ChannelAdapter() {\r\n }\r\n return ChannelAdapter;\r\n}());\r\nexports.ChannelAdapter = ChannelAdapter;\r\n//# sourceMappingURL=channel-adapter.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Collection = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Collection = /** @class */ (function () {\r\n function Collection() {\r\n this._items = [];\r\n }\r\n Collection.prototype.get = function (index) {\r\n return this._items[index];\r\n };\r\n Collection.prototype.add = function (item) {\r\n this._items.push(item);\r\n if (this.onItemAdded) {\r\n this.onItemAdded(item);\r\n }\r\n };\r\n Collection.prototype.remove = function (item) {\r\n var i = this._items.indexOf(item);\r\n if (i >= 0) {\r\n this._items = this._items.splice(i, 1);\r\n if (this.onItemRemoved) {\r\n this.onItemRemoved(item);\r\n }\r\n }\r\n };\r\n Collection.prototype.indexOf = function (item) {\r\n return this._items.indexOf(item);\r\n };\r\n Object.defineProperty(Collection.prototype, \"length\", {\r\n get: function () {\r\n return this._items.length;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return Collection;\r\n}());\r\nexports.Collection = Collection;\r\n//# sourceMappingURL=collection.js.map","\"use strict\";\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Constants = void 0;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar Constants = /** @class */ (function () {\r\n function Constants() {\r\n }\r\n Constants.keys = {\r\n tab: \"Tab\",\r\n enter: \"Enter\",\r\n escape: \"Escape\",\r\n space: \" \",\r\n up: \"ArrowUp\",\r\n down: \"ArrowDown\",\r\n delete: \"Delete\"\r\n };\r\n return Constants;\r\n}());\r\nexports.Constants = Constants;\r\n//# sourceMappingURL=constants.js.map","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n__exportStar(require(\"./menu-item\"), exports);\r\n__exportStar(require(\"./popup-menu\"), exports);\r\n//# sourceMappingURL=index.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.MenuItem = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar host_config_1 = require(\"../host-config\");\r\nvar constants_1 = require(\"./constants\");\r\nvar MenuItem = /** @class */ (function () {\r\n function MenuItem(key, value) {\r\n this._isEnabled = true;\r\n this.key = key;\r\n this._value = value;\r\n }\r\n MenuItem.prototype.click = function () {\r\n if (this.isEnabled && this.onClick) {\r\n this.onClick(this);\r\n }\r\n };\r\n MenuItem.prototype.updateCssClasses = function () {\r\n if (this._element) {\r\n var effectiveHostConfig = this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\r\n this._element.className = effectiveHostConfig.makeCssClassName(\"ac-ctrl\");\r\n this._element.classList.add(effectiveHostConfig.makeCssClassName(this.isEnabled ? \"ac-ctrl-dropdown-item\" : \"ac-ctrl-dropdown-item-disabled\"));\r\n if (!this.isEnabled) {\r\n this._element.classList.add(effectiveHostConfig.makeCssClassName(\"ac-disabled\"));\r\n }\r\n }\r\n };\r\n MenuItem.prototype.toString = function () {\r\n return this.value;\r\n };\r\n MenuItem.prototype.render = function (hostConfig) {\r\n var _this = this;\r\n this._hostConfig = hostConfig;\r\n if (!this._element) {\r\n this._element = document.createElement(\"span\");\r\n this._element.innerText = this.value;\r\n this._element.setAttribute(\"role\", \"menuitem\");\r\n if (!this.isEnabled) {\r\n this._element.setAttribute(\"aria-disabled\", \"true\");\r\n }\r\n this._element.setAttribute(\"aria-current\", \"false\");\r\n this._element.onmouseup = function (_e) {\r\n _this.click();\r\n };\r\n this._element.onkeydown = function (e) {\r\n if (e.key === constants_1.Constants.keys.enter) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n _this.click();\r\n }\r\n };\r\n this.updateCssClasses();\r\n }\r\n return this._element;\r\n };\r\n Object.defineProperty(MenuItem.prototype, \"value\", {\r\n get: function () {\r\n return this._value;\r\n },\r\n set: function (newValue) {\r\n this._value = newValue;\r\n if (this._element) {\r\n this._element.innerText = newValue;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(MenuItem.prototype, \"isEnabled\", {\r\n get: function () {\r\n return this._isEnabled;\r\n },\r\n set: function (value) {\r\n if (this._isEnabled !== value) {\r\n this._isEnabled = value;\r\n this.updateCssClasses();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return MenuItem;\r\n}());\r\nexports.MenuItem = MenuItem;\r\n//# sourceMappingURL=menu-item.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PopupControl = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar constants_1 = require(\"./constants\");\r\nvar Utils = require(\"../utils\");\r\nvar host_config_1 = require(\"../host-config\");\r\nvar PopupControl = /** @class */ (function () {\r\n function PopupControl() {\r\n this._isOpen = false;\r\n }\r\n PopupControl.prototype.keyDown = function (e) {\r\n switch (e.key) {\r\n case constants_1.Constants.keys.escape:\r\n this.closePopup(true);\r\n break;\r\n }\r\n };\r\n PopupControl.prototype.render = function (_rootElementBounds) {\r\n var _this = this;\r\n var element = document.createElement(\"div\");\r\n element.tabIndex = 0;\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl\", \"ac-ctrl-popup-container\");\r\n element.setAttribute(\"role\", \"dialog\");\r\n element.setAttribute(\"aria-modal\", \"true\");\r\n element.onkeydown = function (e) {\r\n _this.keyDown(e);\r\n return !e.cancelBubble;\r\n };\r\n element.appendChild(this.renderContent());\r\n return element;\r\n };\r\n PopupControl.prototype.focus = function () {\r\n if (this._popupElement) {\r\n this._popupElement.firstElementChild.focus();\r\n }\r\n };\r\n PopupControl.prototype.popup = function (rootElement) {\r\n var _a, _b, _c, _d, _f;\r\n var _this = this;\r\n if (!this._isOpen) {\r\n this._overlayElement = document.createElement(\"div\");\r\n this._overlayElement.className = this.hostConfig.makeCssClassName(\"ac-ctrl-overlay\");\r\n this._overlayElement.tabIndex = 0;\r\n this._overlayElement.style.width = document.documentElement.scrollWidth + \"px\";\r\n this._overlayElement.style.height = document.documentElement.scrollHeight + \"px\";\r\n this._overlayElement.onfocus = function (_e) {\r\n _this.closePopup(true);\r\n };\r\n document.body.appendChild(this._overlayElement);\r\n var rootElementBounds = rootElement.getBoundingClientRect();\r\n this._popupElement = this.render(rootElementBounds);\r\n (_a = this._popupElement.classList).remove.apply(_a, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\", \"ac-ctrl-slideRightToLeft\", \"ac-ctrl-slideTopToBottom\", \"ac-ctrl-slideRightToLeft\"));\r\n window.addEventListener(\"resize\", function (_e) {\r\n _this.closePopup(true);\r\n });\r\n var rootElementLabel = rootElement.getAttribute(\"aria-label\");\r\n if (rootElementLabel) {\r\n this._popupElement.setAttribute(\"aria-label\", rootElementLabel);\r\n }\r\n this._overlayElement.appendChild(this._popupElement);\r\n var popupElementBounds = this._popupElement.getBoundingClientRect();\r\n var availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;\r\n var availableSpaceAbove = rootElementBounds.top;\r\n var availableSpaceRight = window.innerWidth - rootElementBounds.right;\r\n var availableSpaceLeft = rootElementBounds.left;\r\n var left = rootElementBounds.left + Utils.getScrollX();\r\n var top_1;\r\n if (availableSpaceAbove < popupElementBounds.height &&\r\n availableSpaceBelow < popupElementBounds.height) {\r\n // Not enough space above or below root element\r\n var actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);\r\n this._popupElement.style.maxHeight = actualPopupHeight + \"px\";\r\n if (actualPopupHeight < popupElementBounds.height) {\r\n top_1 = Utils.getScrollY();\r\n }\r\n else {\r\n top_1 =\r\n Utils.getScrollY() +\r\n rootElementBounds.top +\r\n (rootElementBounds.height - actualPopupHeight) / 2;\r\n }\r\n if (availableSpaceLeft < popupElementBounds.width &&\r\n availableSpaceRight < popupElementBounds.width) {\r\n // Not enough space left or right of root element\r\n var actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);\r\n this._popupElement.style.maxWidth = actualPopupWidth + \"px\";\r\n if (actualPopupWidth < popupElementBounds.width) {\r\n left = Utils.getScrollX();\r\n }\r\n else {\r\n left =\r\n Utils.getScrollX() +\r\n rootElementBounds.left +\r\n (rootElementBounds.width - actualPopupWidth) / 2;\r\n }\r\n }\r\n else {\r\n // Enough space on the left or right of the root element\r\n if (availableSpaceRight >= popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right;\r\n (_b = this._popupElement.classList).add.apply(_b, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\"));\r\n }\r\n else {\r\n left =\r\n Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;\r\n (_c = this._popupElement.classList).add.apply(_c, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideRightToLeft\"));\r\n }\r\n }\r\n }\r\n else {\r\n // Enough space above or below root element\r\n if (availableSpaceBelow >= popupElementBounds.height) {\r\n top_1 = Utils.getScrollY() + rootElementBounds.bottom;\r\n (_d = this._popupElement.classList).add.apply(_d, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideTopToBottom\"));\r\n }\r\n else {\r\n top_1 = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;\r\n (_f = this._popupElement.classList).add.apply(_f, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideBottomToTop\"));\r\n }\r\n if (availableSpaceRight < popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;\r\n }\r\n }\r\n this._popupElement.style.left = left + \"px\";\r\n this._popupElement.style.top = top_1 + \"px\";\r\n this._popupElement.focus();\r\n this._isOpen = true;\r\n }\r\n };\r\n PopupControl.prototype.closePopup = function (wasCancelled) {\r\n if (this._isOpen) {\r\n document.body.removeChild(this._overlayElement);\r\n this._isOpen = false;\r\n if (this.onClose) {\r\n this.onClose(this, wasCancelled);\r\n }\r\n }\r\n };\r\n Object.defineProperty(PopupControl.prototype, \"hostConfig\", {\r\n get: function () {\r\n return this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\r\n },\r\n set: function (value) {\r\n this._hostConfig = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(PopupControl.prototype, \"isOpen\", {\r\n get: function () {\r\n return this._isOpen;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return PopupControl;\r\n}());\r\nexports.PopupControl = PopupControl;\r\n//# sourceMappingURL=popup-control.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PopupMenu = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar constants_1 = require(\"./constants\");\r\nvar collection_1 = require(\"./collection\");\r\nvar popup_control_1 = require(\"./popup-control\");\r\nvar PopupMenu = /** @class */ (function (_super) {\r\n __extends(PopupMenu, _super);\r\n function PopupMenu() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._items = new collection_1.Collection();\r\n _this._renderedItems = [];\r\n _this._selectedIndex = -1;\r\n return _this;\r\n }\r\n PopupMenu.prototype.renderContent = function () {\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl ac-popup\");\r\n element.setAttribute(\"role\", \"listbox\");\r\n for (var i = 0; i < this._items.length; i++) {\r\n var renderedItem = this._items.get(i).render(this.hostConfig);\r\n renderedItem.tabIndex = 0;\r\n element.appendChild(renderedItem);\r\n if (i == 0) {\r\n renderedItem.setAttribute(\"aria-expanded\", \"true\");\r\n }\r\n if (i === this.selectedIndex) {\r\n renderedItem.focus();\r\n }\r\n this._renderedItems.push(renderedItem);\r\n }\r\n return element;\r\n };\r\n PopupMenu.prototype.keyDown = function (e) {\r\n _super.prototype.keyDown.call(this, e);\r\n var selectedItemIndex = this._selectedIndex;\r\n switch (e.key) {\r\n case constants_1.Constants.keys.tab:\r\n this.closePopup(true);\r\n break;\r\n /*\r\n case Constants.keys.enter:\r\n if (this.selectedIndex >= 0) {\r\n this.selectedIndex = this.selectedIndex;\r\n\r\n this.close();\r\n }\r\n\r\n break;\r\n */\r\n case constants_1.Constants.keys.up:\r\n if (selectedItemIndex <= 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n }\r\n else {\r\n selectedItemIndex--;\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n }\r\n }\r\n this.selectedIndex = selectedItemIndex;\r\n this.removeAriaExpanded(selectedItemIndex);\r\n e.cancelBubble = true;\r\n break;\r\n case constants_1.Constants.keys.down:\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = 0;\r\n }\r\n else {\r\n selectedItemIndex++;\r\n if (selectedItemIndex >= this._renderedItems.length) {\r\n selectedItemIndex = 0;\r\n }\r\n this.removeAriaExpanded(selectedItemIndex);\r\n }\r\n this.selectedIndex = selectedItemIndex;\r\n e.cancelBubble = true;\r\n break;\r\n }\r\n };\r\n Object.defineProperty(PopupMenu.prototype, \"items\", {\r\n get: function () {\r\n return this._items;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(PopupMenu.prototype, \"selectedIndex\", {\r\n get: function () {\r\n return this._selectedIndex;\r\n },\r\n set: function (index) {\r\n if (index >= 0 && index < this._renderedItems.length) {\r\n this._renderedItems[index].focus();\r\n this._selectedIndex = index;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // remove aria-expanded attribute from menu item\r\n PopupMenu.prototype.removeAriaExpanded = function (index) {\r\n if (this._renderedItems[index].getAttribute(\"aria-expanded\") === \"true\") {\r\n this._renderedItems[index].removeAttribute(\"aria-expanded\");\r\n }\r\n };\r\n return PopupMenu;\r\n}(popup_control_1.PopupControl));\r\nexports.PopupMenu = PopupMenu;\r\n//# sourceMappingURL=popup-menu.js.map","\"use strict\";\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ActionRole = exports.CarouselInteractionEvent = exports.LogLevel = exports.RefreshMode = exports.TypeErrorType = exports.ContainerFitStatus = exports.ValidationEvent = exports.ValidationPhase = exports.InputLabelPosition = exports.InputTextStyle = exports.ActionIconPlacement = exports.FillMode = exports.Orientation = exports.ShowCardActionMode = exports.ImageStyle = exports.ActionAlignment = exports.VerticalAlignment = exports.HorizontalAlignment = exports.TextColor = exports.Spacing = exports.FontType = exports.TextWeight = exports.InputStyle = exports.TextSize = exports.SizeUnit = exports.ImageSetPresentationStyle = exports.ImageSize = exports.Size = exports.ActionMode = exports.ActionStyle = exports.ContainerStyle = void 0;\r\n/*\r\n This should really be a string enum, e.g.\r\n\r\n export enum ContainerStyle {\r\n Default = \"default\",\r\n Emphasis = \"emphasis\"\r\n }\r\n\r\n However, some hosts do not use a version of TypeScript\r\n recent enough to understand string enums. This is\r\n a compatible construct that does not require using\r\n a more recent version of TypeScript.\r\n\r\n Also note the \"weird\" way these readonly fields are declared is to work around\r\n a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n and adopt this syntax for all other static readonly fields.\r\n*/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\nvar ContainerStyle = /** @class */ (function () {\r\n function ContainerStyle() {\r\n }\r\n ContainerStyle.Default = \"default\";\r\n ContainerStyle.Emphasis = \"emphasis\";\r\n ContainerStyle.Accent = \"accent\";\r\n ContainerStyle.Good = \"good\";\r\n ContainerStyle.Attention = \"attention\";\r\n ContainerStyle.Warning = \"warning\";\r\n return ContainerStyle;\r\n}());\r\nexports.ContainerStyle = ContainerStyle;\r\nvar ActionStyle = /** @class */ (function () {\r\n function ActionStyle() {\r\n }\r\n ActionStyle.Default = \"default\";\r\n ActionStyle.Positive = \"positive\";\r\n ActionStyle.Destructive = \"destructive\";\r\n return ActionStyle;\r\n}());\r\nexports.ActionStyle = ActionStyle;\r\nvar ActionMode = /** @class */ (function () {\r\n function ActionMode() {\r\n }\r\n ActionMode.Primary = \"primary\";\r\n ActionMode.Secondary = \"secondary\";\r\n return ActionMode;\r\n}());\r\nexports.ActionMode = ActionMode;\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\nvar Size;\r\n(function (Size) {\r\n Size[Size[\"Auto\"] = 0] = \"Auto\";\r\n Size[Size[\"Stretch\"] = 1] = \"Stretch\";\r\n Size[Size[\"Small\"] = 2] = \"Small\";\r\n Size[Size[\"Medium\"] = 3] = \"Medium\";\r\n Size[Size[\"Large\"] = 4] = \"Large\";\r\n})(Size = exports.Size || (exports.Size = {}));\r\nvar ImageSize;\r\n(function (ImageSize) {\r\n ImageSize[ImageSize[\"Small\"] = 0] = \"Small\";\r\n ImageSize[ImageSize[\"Medium\"] = 1] = \"Medium\";\r\n ImageSize[ImageSize[\"Large\"] = 2] = \"Large\";\r\n})(ImageSize = exports.ImageSize || (exports.ImageSize = {}));\r\nvar ImageSetPresentationStyle;\r\n(function (ImageSetPresentationStyle) {\r\n ImageSetPresentationStyle[ImageSetPresentationStyle[\"Default\"] = 0] = \"Default\";\r\n ImageSetPresentationStyle[ImageSetPresentationStyle[\"Stacked\"] = 1] = \"Stacked\";\r\n})(ImageSetPresentationStyle = exports.ImageSetPresentationStyle || (exports.ImageSetPresentationStyle = {}));\r\nvar SizeUnit;\r\n(function (SizeUnit) {\r\n SizeUnit[SizeUnit[\"Weight\"] = 0] = \"Weight\";\r\n SizeUnit[SizeUnit[\"Pixel\"] = 1] = \"Pixel\";\r\n})(SizeUnit = exports.SizeUnit || (exports.SizeUnit = {}));\r\nvar TextSize;\r\n(function (TextSize) {\r\n TextSize[TextSize[\"Small\"] = 0] = \"Small\";\r\n TextSize[TextSize[\"Default\"] = 1] = \"Default\";\r\n TextSize[TextSize[\"Medium\"] = 2] = \"Medium\";\r\n TextSize[TextSize[\"Large\"] = 3] = \"Large\";\r\n TextSize[TextSize[\"ExtraLarge\"] = 4] = \"ExtraLarge\";\r\n})(TextSize = exports.TextSize || (exports.TextSize = {}));\r\nvar InputStyle;\r\n(function (InputStyle) {\r\n InputStyle[InputStyle[\"RevealOnHover\"] = 0] = \"RevealOnHover\";\r\n InputStyle[InputStyle[\"Default\"] = 1] = \"Default\";\r\n})(InputStyle = exports.InputStyle || (exports.InputStyle = {}));\r\nvar TextWeight;\r\n(function (TextWeight) {\r\n TextWeight[TextWeight[\"Lighter\"] = 0] = \"Lighter\";\r\n TextWeight[TextWeight[\"Default\"] = 1] = \"Default\";\r\n TextWeight[TextWeight[\"Bolder\"] = 2] = \"Bolder\";\r\n})(TextWeight = exports.TextWeight || (exports.TextWeight = {}));\r\nvar FontType;\r\n(function (FontType) {\r\n FontType[FontType[\"Default\"] = 0] = \"Default\";\r\n FontType[FontType[\"Monospace\"] = 1] = \"Monospace\";\r\n})(FontType = exports.FontType || (exports.FontType = {}));\r\nvar Spacing;\r\n(function (Spacing) {\r\n Spacing[Spacing[\"None\"] = 0] = \"None\";\r\n Spacing[Spacing[\"Small\"] = 1] = \"Small\";\r\n Spacing[Spacing[\"Default\"] = 2] = \"Default\";\r\n Spacing[Spacing[\"Medium\"] = 3] = \"Medium\";\r\n Spacing[Spacing[\"Large\"] = 4] = \"Large\";\r\n Spacing[Spacing[\"ExtraLarge\"] = 5] = \"ExtraLarge\";\r\n Spacing[Spacing[\"Padding\"] = 6] = \"Padding\";\r\n})(Spacing = exports.Spacing || (exports.Spacing = {}));\r\nvar TextColor;\r\n(function (TextColor) {\r\n TextColor[TextColor[\"Default\"] = 0] = \"Default\";\r\n TextColor[TextColor[\"Dark\"] = 1] = \"Dark\";\r\n TextColor[TextColor[\"Light\"] = 2] = \"Light\";\r\n TextColor[TextColor[\"Accent\"] = 3] = \"Accent\";\r\n TextColor[TextColor[\"Good\"] = 4] = \"Good\";\r\n TextColor[TextColor[\"Warning\"] = 5] = \"Warning\";\r\n TextColor[TextColor[\"Attention\"] = 6] = \"Attention\";\r\n})(TextColor = exports.TextColor || (exports.TextColor = {}));\r\nvar HorizontalAlignment;\r\n(function (HorizontalAlignment) {\r\n HorizontalAlignment[HorizontalAlignment[\"Left\"] = 0] = \"Left\";\r\n HorizontalAlignment[HorizontalAlignment[\"Center\"] = 1] = \"Center\";\r\n HorizontalAlignment[HorizontalAlignment[\"Right\"] = 2] = \"Right\";\r\n})(HorizontalAlignment = exports.HorizontalAlignment || (exports.HorizontalAlignment = {}));\r\nvar VerticalAlignment;\r\n(function (VerticalAlignment) {\r\n VerticalAlignment[VerticalAlignment[\"Top\"] = 0] = \"Top\";\r\n VerticalAlignment[VerticalAlignment[\"Center\"] = 1] = \"Center\";\r\n VerticalAlignment[VerticalAlignment[\"Bottom\"] = 2] = \"Bottom\";\r\n})(VerticalAlignment = exports.VerticalAlignment || (exports.VerticalAlignment = {}));\r\nvar ActionAlignment;\r\n(function (ActionAlignment) {\r\n ActionAlignment[ActionAlignment[\"Left\"] = 0] = \"Left\";\r\n ActionAlignment[ActionAlignment[\"Center\"] = 1] = \"Center\";\r\n ActionAlignment[ActionAlignment[\"Right\"] = 2] = \"Right\";\r\n ActionAlignment[ActionAlignment[\"Stretch\"] = 3] = \"Stretch\";\r\n})(ActionAlignment = exports.ActionAlignment || (exports.ActionAlignment = {}));\r\nvar ImageStyle;\r\n(function (ImageStyle) {\r\n ImageStyle[ImageStyle[\"Default\"] = 0] = \"Default\";\r\n ImageStyle[ImageStyle[\"Person\"] = 1] = \"Person\";\r\n})(ImageStyle = exports.ImageStyle || (exports.ImageStyle = {}));\r\nvar ShowCardActionMode;\r\n(function (ShowCardActionMode) {\r\n ShowCardActionMode[ShowCardActionMode[\"Inline\"] = 0] = \"Inline\";\r\n ShowCardActionMode[ShowCardActionMode[\"Popup\"] = 1] = \"Popup\";\r\n})(ShowCardActionMode = exports.ShowCardActionMode || (exports.ShowCardActionMode = {}));\r\nvar Orientation;\r\n(function (Orientation) {\r\n Orientation[Orientation[\"Horizontal\"] = 0] = \"Horizontal\";\r\n Orientation[Orientation[\"Vertical\"] = 1] = \"Vertical\";\r\n})(Orientation = exports.Orientation || (exports.Orientation = {}));\r\nvar FillMode;\r\n(function (FillMode) {\r\n FillMode[FillMode[\"Cover\"] = 0] = \"Cover\";\r\n FillMode[FillMode[\"RepeatHorizontally\"] = 1] = \"RepeatHorizontally\";\r\n FillMode[FillMode[\"RepeatVertically\"] = 2] = \"RepeatVertically\";\r\n FillMode[FillMode[\"Repeat\"] = 3] = \"Repeat\";\r\n})(FillMode = exports.FillMode || (exports.FillMode = {}));\r\nvar ActionIconPlacement;\r\n(function (ActionIconPlacement) {\r\n ActionIconPlacement[ActionIconPlacement[\"LeftOfTitle\"] = 0] = \"LeftOfTitle\";\r\n ActionIconPlacement[ActionIconPlacement[\"AboveTitle\"] = 1] = \"AboveTitle\";\r\n})(ActionIconPlacement = exports.ActionIconPlacement || (exports.ActionIconPlacement = {}));\r\nvar InputTextStyle;\r\n(function (InputTextStyle) {\r\n InputTextStyle[InputTextStyle[\"Text\"] = 0] = \"Text\";\r\n InputTextStyle[InputTextStyle[\"Tel\"] = 1] = \"Tel\";\r\n InputTextStyle[InputTextStyle[\"Url\"] = 2] = \"Url\";\r\n InputTextStyle[InputTextStyle[\"Email\"] = 3] = \"Email\";\r\n InputTextStyle[InputTextStyle[\"Password\"] = 4] = \"Password\";\r\n})(InputTextStyle = exports.InputTextStyle || (exports.InputTextStyle = {}));\r\nvar InputLabelPosition;\r\n(function (InputLabelPosition) {\r\n InputLabelPosition[InputLabelPosition[\"Inline\"] = 0] = \"Inline\";\r\n InputLabelPosition[InputLabelPosition[\"Above\"] = 1] = \"Above\";\r\n})(InputLabelPosition = exports.InputLabelPosition || (exports.InputLabelPosition = {}));\r\nvar ValidationPhase;\r\n(function (ValidationPhase) {\r\n ValidationPhase[ValidationPhase[\"Parse\"] = 0] = \"Parse\";\r\n ValidationPhase[ValidationPhase[\"ToJSON\"] = 1] = \"ToJSON\";\r\n ValidationPhase[ValidationPhase[\"Validation\"] = 2] = \"Validation\";\r\n})(ValidationPhase = exports.ValidationPhase || (exports.ValidationPhase = {}));\r\nvar ValidationEvent;\r\n(function (ValidationEvent) {\r\n ValidationEvent[ValidationEvent[\"Hint\"] = 0] = \"Hint\";\r\n ValidationEvent[ValidationEvent[\"ActionTypeNotAllowed\"] = 1] = \"ActionTypeNotAllowed\";\r\n ValidationEvent[ValidationEvent[\"CollectionCantBeEmpty\"] = 2] = \"CollectionCantBeEmpty\";\r\n ValidationEvent[ValidationEvent[\"Deprecated\"] = 3] = \"Deprecated\";\r\n ValidationEvent[ValidationEvent[\"ElementTypeNotAllowed\"] = 4] = \"ElementTypeNotAllowed\";\r\n ValidationEvent[ValidationEvent[\"InteractivityNotAllowed\"] = 5] = \"InteractivityNotAllowed\";\r\n ValidationEvent[ValidationEvent[\"InvalidPropertyValue\"] = 6] = \"InvalidPropertyValue\";\r\n ValidationEvent[ValidationEvent[\"MissingCardType\"] = 7] = \"MissingCardType\";\r\n ValidationEvent[ValidationEvent[\"PropertyCantBeNull\"] = 8] = \"PropertyCantBeNull\";\r\n ValidationEvent[ValidationEvent[\"TooManyActions\"] = 9] = \"TooManyActions\";\r\n ValidationEvent[ValidationEvent[\"UnknownActionType\"] = 10] = \"UnknownActionType\";\r\n ValidationEvent[ValidationEvent[\"UnknownElementType\"] = 11] = \"UnknownElementType\";\r\n ValidationEvent[ValidationEvent[\"UnsupportedCardVersion\"] = 12] = \"UnsupportedCardVersion\";\r\n ValidationEvent[ValidationEvent[\"DuplicateId\"] = 13] = \"DuplicateId\";\r\n ValidationEvent[ValidationEvent[\"UnsupportedProperty\"] = 14] = \"UnsupportedProperty\";\r\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveLabel\"] = 15] = \"RequiredInputsShouldHaveLabel\";\r\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveErrorMessage\"] = 16] = \"RequiredInputsShouldHaveErrorMessage\";\r\n ValidationEvent[ValidationEvent[\"Other\"] = 17] = \"Other\";\r\n})(ValidationEvent = exports.ValidationEvent || (exports.ValidationEvent = {}));\r\nvar ContainerFitStatus;\r\n(function (ContainerFitStatus) {\r\n ContainerFitStatus[ContainerFitStatus[\"FullyInContainer\"] = 0] = \"FullyInContainer\";\r\n ContainerFitStatus[ContainerFitStatus[\"Overflowing\"] = 1] = \"Overflowing\";\r\n ContainerFitStatus[ContainerFitStatus[\"FullyOutOfContainer\"] = 2] = \"FullyOutOfContainer\";\r\n})(ContainerFitStatus = exports.ContainerFitStatus || (exports.ContainerFitStatus = {}));\r\nvar TypeErrorType;\r\n(function (TypeErrorType) {\r\n TypeErrorType[TypeErrorType[\"UnknownType\"] = 0] = \"UnknownType\";\r\n TypeErrorType[TypeErrorType[\"ForbiddenType\"] = 1] = \"ForbiddenType\";\r\n})(TypeErrorType = exports.TypeErrorType || (exports.TypeErrorType = {}));\r\nvar RefreshMode;\r\n(function (RefreshMode) {\r\n RefreshMode[RefreshMode[\"Disabled\"] = 0] = \"Disabled\";\r\n RefreshMode[RefreshMode[\"Manual\"] = 1] = \"Manual\";\r\n RefreshMode[RefreshMode[\"Automatic\"] = 2] = \"Automatic\";\r\n})(RefreshMode = exports.RefreshMode || (exports.RefreshMode = {}));\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Info\"] = 0] = \"Info\";\r\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\r\n LogLevel[LogLevel[\"Error\"] = 2] = \"Error\";\r\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\r\nvar CarouselInteractionEvent;\r\n(function (CarouselInteractionEvent) {\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"NavigationNext\"] = 0] = \"NavigationNext\";\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"NavigationPrevious\"] = 1] = \"NavigationPrevious\";\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"Pagination\"] = 2] = \"Pagination\";\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"Autoplay\"] = 3] = \"Autoplay\";\r\n})(CarouselInteractionEvent = exports.CarouselInteractionEvent || (exports.CarouselInteractionEvent = {}));\r\nvar ActionRole;\r\n(function (ActionRole) {\r\n ActionRole[ActionRole[\"Button\"] = 0] = \"Button\";\r\n ActionRole[ActionRole[\"Link\"] = 1] = \"Link\";\r\n ActionRole[ActionRole[\"Tab\"] = 2] = \"Tab\";\r\n ActionRole[ActionRole[\"Menu\"] = 3] = \"Menu\";\r\n ActionRole[ActionRole[\"MenuItem\"] = 4] = \"MenuItem\";\r\n})(ActionRole = exports.ActionRole || (exports.ActionRole = {}));\r\n//# sourceMappingURL=enums.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.HostCapabilities = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar serialization_1 = require(\"./serialization\");\r\nvar HostCapabilities = /** @class */ (function (_super) {\r\n __extends(HostCapabilities, _super);\r\n function HostCapabilities() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._capabilities = {};\r\n return _this;\r\n }\r\n HostCapabilities.prototype.getSchemaKey = function () {\r\n return \"HostCapabilities\";\r\n };\r\n HostCapabilities.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n if (source) {\r\n // eslint-disable-next-line guard-for-in\r\n for (var name_1 in source) {\r\n var jsonVersion = source[name_1];\r\n if (typeof jsonVersion === \"string\") {\r\n if (jsonVersion === \"*\") {\r\n this.addCapability(name_1, \"*\");\r\n }\r\n else {\r\n var version = serialization_1.Version.parse(jsonVersion, context);\r\n if (version === null || version === void 0 ? void 0 : version.isValid) {\r\n this.addCapability(name_1, version);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n HostCapabilities.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n // eslint-disable-next-line guard-for-in\r\n for (var key in this._capabilities) {\r\n target[key] = this._capabilities[key];\r\n }\r\n };\r\n HostCapabilities.prototype.addCapability = function (name, version) {\r\n this._capabilities[name] = version;\r\n };\r\n HostCapabilities.prototype.removeCapability = function (name) {\r\n delete this._capabilities[name];\r\n };\r\n HostCapabilities.prototype.clear = function () {\r\n this._capabilities = {};\r\n };\r\n HostCapabilities.prototype.hasCapability = function (name, version) {\r\n if (this._capabilities.hasOwnProperty(name)) {\r\n if (version === \"*\" || this._capabilities[name] === \"*\") {\r\n return true;\r\n }\r\n return version.compareTo(this._capabilities[name]) <= 0;\r\n }\r\n return false;\r\n };\r\n HostCapabilities.prototype.areAllMet = function (hostCapabilities) {\r\n for (var capabilityName in this._capabilities) {\r\n if (!hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n return HostCapabilities;\r\n}(serialization_1.SerializableObject));\r\nexports.HostCapabilities = HostCapabilities;\r\n//# sourceMappingURL=host-capabilities.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.defaultHostConfig = exports.HostConfig = exports.CarouselConfig = exports.FontTypeSet = exports.FontTypeDefinition = exports.ContainerStyleSet = exports.ContainerStyleDefinition = exports.ColorSetDefinition = exports.ActionsConfig = exports.ShowCardActionConfig = exports.FactSetConfig = exports.FactTitleDefinition = exports.FactTextDefinition = exports.InputConfig = exports.InputLabelConfig = exports.RequiredInputLabelTextDefinition = exports.TextBlockConfig = exports.TextStyleSet = exports.TextStyleDefinition = exports.BaseTextDefinition = exports.TableConfig = exports.MediaConfig = exports.ImageSetConfig = exports.AdaptiveCardConfig = exports.TextColorDefinition = exports.ColorDefinition = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar Utils = require(\"./utils\");\r\nvar Shared = require(\"./shared\");\r\nvar host_capabilities_1 = require(\"./host-capabilities\");\r\nfunction parseHostConfigEnum(targetEnum, value, defaultValue) {\r\n if (typeof value === \"string\") {\r\n var parsedValue = Utils.parseEnum(targetEnum, value, defaultValue);\r\n return parsedValue !== undefined ? parsedValue : defaultValue;\r\n }\r\n else if (typeof value === \"number\") {\r\n return value;\r\n }\r\n else {\r\n return defaultValue;\r\n }\r\n}\r\nvar ColorDefinition = /** @class */ (function () {\r\n function ColorDefinition(defaultColor, subtleColor) {\r\n this.default = \"#000000\";\r\n this.subtle = \"#666666\";\r\n if (defaultColor) {\r\n this.default = defaultColor;\r\n }\r\n if (subtleColor) {\r\n this.subtle = subtleColor;\r\n }\r\n }\r\n ColorDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.default = obj[\"default\"] || this.default;\r\n this.subtle = obj[\"subtle\"] || this.subtle;\r\n }\r\n };\r\n return ColorDefinition;\r\n}());\r\nexports.ColorDefinition = ColorDefinition;\r\nvar TextColorDefinition = /** @class */ (function (_super) {\r\n __extends(TextColorDefinition, _super);\r\n function TextColorDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.highlightColors = new ColorDefinition(\"#22000000\", \"#11000000\");\r\n return _this;\r\n }\r\n TextColorDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.highlightColors.parse(obj[\"highlightColors\"]);\r\n }\r\n };\r\n return TextColorDefinition;\r\n}(ColorDefinition));\r\nexports.TextColorDefinition = TextColorDefinition;\r\nvar AdaptiveCardConfig = /** @class */ (function () {\r\n function AdaptiveCardConfig(obj) {\r\n this.allowCustomStyle = false;\r\n if (obj) {\r\n this.allowCustomStyle = obj[\"allowCustomStyle\"] || this.allowCustomStyle;\r\n }\r\n }\r\n return AdaptiveCardConfig;\r\n}());\r\nexports.AdaptiveCardConfig = AdaptiveCardConfig;\r\nvar ImageSetConfig = /** @class */ (function () {\r\n function ImageSetConfig(obj) {\r\n this.imageSize = Enums.Size.Medium;\r\n this.maxImageHeight = 100;\r\n if (obj) {\r\n this.imageSize = obj[\"imageSize\"] != null ? obj[\"imageSize\"] : this.imageSize;\r\n this.maxImageHeight = Utils.parseNumber(obj[\"maxImageHeight\"], 100);\r\n }\r\n }\r\n ImageSetConfig.prototype.toJSON = function () {\r\n return {\r\n imageSize: Enums.Size[this.imageSize],\r\n maxImageHeight: this.maxImageHeight\r\n };\r\n };\r\n return ImageSetConfig;\r\n}());\r\nexports.ImageSetConfig = ImageSetConfig;\r\nvar MediaConfig = /** @class */ (function () {\r\n function MediaConfig(obj) {\r\n this.allowInlinePlayback = true;\r\n if (obj) {\r\n this.defaultPoster = obj[\"defaultPoster\"];\r\n this.allowInlinePlayback = obj[\"allowInlinePlayback\"] || this.allowInlinePlayback;\r\n }\r\n }\r\n MediaConfig.prototype.toJSON = function () {\r\n return {\r\n defaultPoster: this.defaultPoster,\r\n allowInlinePlayback: this.allowInlinePlayback\r\n };\r\n };\r\n return MediaConfig;\r\n}());\r\nexports.MediaConfig = MediaConfig;\r\nvar TableConfig = /** @class */ (function () {\r\n function TableConfig(obj) {\r\n this.cellSpacing = 8;\r\n if (obj) {\r\n this.cellSpacing =\r\n obj.cellSpacing && typeof obj.cellSpacing === \"number\"\r\n ? obj.cellSpacing\r\n : this.cellSpacing;\r\n }\r\n }\r\n TableConfig.prototype.toJSON = function () {\r\n return {\r\n cellSpacing: this.cellSpacing\r\n };\r\n };\r\n return TableConfig;\r\n}());\r\nexports.TableConfig = TableConfig;\r\nvar BaseTextDefinition = /** @class */ (function () {\r\n function BaseTextDefinition(obj) {\r\n this.size = Enums.TextSize.Default;\r\n this.color = Enums.TextColor.Default;\r\n this.isSubtle = false;\r\n this.weight = Enums.TextWeight.Default;\r\n this.parse(obj);\r\n }\r\n BaseTextDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.size = parseHostConfigEnum(Enums.TextSize, obj[\"size\"], this.size);\r\n this.color = parseHostConfigEnum(Enums.TextColor, obj[\"color\"], this.color);\r\n this.isSubtle =\r\n obj.isSubtle !== undefined && typeof obj.isSubtle === \"boolean\"\r\n ? obj.isSubtle\r\n : this.isSubtle;\r\n this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], this.getDefaultWeight());\r\n }\r\n };\r\n BaseTextDefinition.prototype.getDefaultWeight = function () {\r\n return Enums.TextWeight.Default;\r\n };\r\n BaseTextDefinition.prototype.toJSON = function () {\r\n return {\r\n size: Enums.TextSize[this.size],\r\n color: Enums.TextColor[this.color],\r\n isSubtle: this.isSubtle,\r\n weight: Enums.TextWeight[this.weight]\r\n };\r\n };\r\n return BaseTextDefinition;\r\n}());\r\nexports.BaseTextDefinition = BaseTextDefinition;\r\nvar TextStyleDefinition = /** @class */ (function (_super) {\r\n __extends(TextStyleDefinition, _super);\r\n function TextStyleDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.fontType = Enums.FontType.Default;\r\n return _this;\r\n }\r\n TextStyleDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType);\r\n }\r\n };\r\n return TextStyleDefinition;\r\n}(BaseTextDefinition));\r\nexports.TextStyleDefinition = TextStyleDefinition;\r\nvar TextStyleSet = /** @class */ (function () {\r\n function TextStyleSet(obj) {\r\n this.default = new TextStyleDefinition();\r\n this.heading = new TextStyleDefinition({\r\n size: \"Large\",\r\n weight: \"Bolder\"\r\n });\r\n this.columnHeader = new TextStyleDefinition({\r\n weight: \"Bolder\"\r\n });\r\n if (obj) {\r\n this.heading.parse(obj.heading);\r\n this.columnHeader.parse(obj.columnHeader);\r\n }\r\n }\r\n TextStyleSet.prototype.getStyleByName = function (name) {\r\n switch (name.toLowerCase()) {\r\n case \"heading\":\r\n return this.heading;\r\n case \"columnHeader\":\r\n return this.columnHeader;\r\n default:\r\n return this.default;\r\n }\r\n };\r\n return TextStyleSet;\r\n}());\r\nexports.TextStyleSet = TextStyleSet;\r\nvar TextBlockConfig = /** @class */ (function () {\r\n function TextBlockConfig(obj) {\r\n if (obj) {\r\n this.headingLevel = Utils.parseNumber(obj.headingLevel);\r\n }\r\n }\r\n return TextBlockConfig;\r\n}());\r\nexports.TextBlockConfig = TextBlockConfig;\r\nvar RequiredInputLabelTextDefinition = /** @class */ (function (_super) {\r\n __extends(RequiredInputLabelTextDefinition, _super);\r\n function RequiredInputLabelTextDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.suffix = \" *\";\r\n _this.suffixColor = Enums.TextColor.Attention;\r\n return _this;\r\n }\r\n RequiredInputLabelTextDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.suffix = obj[\"suffix\"] || this.suffix;\r\n this.suffixColor = parseHostConfigEnum(Enums.TextColor, obj[\"suffixColor\"], this.suffixColor);\r\n }\r\n };\r\n RequiredInputLabelTextDefinition.prototype.toJSON = function () {\r\n var result = _super.prototype.toJSON.call(this);\r\n result[\"suffix\"] = this.suffix;\r\n result[\"suffixColor\"] = Enums.TextColor[this.suffixColor];\r\n return result;\r\n };\r\n return RequiredInputLabelTextDefinition;\r\n}(BaseTextDefinition));\r\nexports.RequiredInputLabelTextDefinition = RequiredInputLabelTextDefinition;\r\nvar InputLabelConfig = /** @class */ (function () {\r\n function InputLabelConfig(obj) {\r\n this.inputSpacing = Enums.Spacing.Small;\r\n this.width = 30;\r\n this.requiredInputs = new RequiredInputLabelTextDefinition();\r\n this.optionalInputs = new BaseTextDefinition();\r\n if (obj) {\r\n this.inputSpacing = parseHostConfigEnum(Enums.Spacing, obj[\"inputSpacing\"], this.inputSpacing);\r\n this.requiredInputs = new RequiredInputLabelTextDefinition(obj[\"requiredInputs\"]);\r\n this.optionalInputs = new BaseTextDefinition(obj[\"optionalInputs\"]);\r\n this.width =\r\n obj[\"width\"] != null ? obj[\"width\"] : this.width;\r\n }\r\n }\r\n return InputLabelConfig;\r\n}());\r\nexports.InputLabelConfig = InputLabelConfig;\r\nvar InputConfig = /** @class */ (function () {\r\n function InputConfig(obj) {\r\n this.label = new InputLabelConfig();\r\n this.errorMessage = new BaseTextDefinition({\r\n color: Enums.TextColor.Attention\r\n });\r\n this.debounceTimeInMilliSeconds = 0;\r\n this.allowDynamicallyFilteredChoiceSet = true;\r\n this.allowRevealOnHoverStyle = false;\r\n if (obj) {\r\n this.label = new InputLabelConfig(obj[\"label\"]);\r\n this.errorMessage = new BaseTextDefinition(obj[\"errorMessage\"]);\r\n this.allowRevealOnHoverStyle =\r\n obj[\"allowRevealOnHoverStyle\"] || this.allowRevealOnHoverStyle;\r\n this.allowDynamicallyFilteredChoiceSet =\r\n obj[\"allowDynamicallyFilteredChoiceSet\"] || this.allowDynamicallyFilteredChoiceSet;\r\n this.debounceTimeInMilliSeconds =\r\n obj[\"debounceTimeInMilliSeconds\"] || this.debounceTimeInMilliSeconds;\r\n }\r\n }\r\n return InputConfig;\r\n}());\r\nexports.InputConfig = InputConfig;\r\nvar FactTextDefinition = /** @class */ (function (_super) {\r\n __extends(FactTextDefinition, _super);\r\n function FactTextDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.wrap = true;\r\n return _this;\r\n }\r\n FactTextDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.wrap = obj[\"wrap\"] != null ? obj[\"wrap\"] : this.wrap;\r\n }\r\n };\r\n FactTextDefinition.prototype.toJSON = function () {\r\n var result = _super.prototype.toJSON.call(this);\r\n result[\"wrap\"] = this.wrap;\r\n return result;\r\n };\r\n return FactTextDefinition;\r\n}(BaseTextDefinition));\r\nexports.FactTextDefinition = FactTextDefinition;\r\nvar FactTitleDefinition = /** @class */ (function (_super) {\r\n __extends(FactTitleDefinition, _super);\r\n function FactTitleDefinition(obj) {\r\n var _this = _super.call(this, obj) || this;\r\n _this.maxWidth = 150;\r\n _this.weight = Enums.TextWeight.Bolder;\r\n if (obj) {\r\n _this.maxWidth = obj[\"maxWidth\"] != null ? obj[\"maxWidth\"] : _this.maxWidth;\r\n _this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], Enums.TextWeight.Bolder);\r\n }\r\n return _this;\r\n }\r\n FactTitleDefinition.prototype.getDefaultWeight = function () {\r\n return Enums.TextWeight.Bolder;\r\n };\r\n return FactTitleDefinition;\r\n}(FactTextDefinition));\r\nexports.FactTitleDefinition = FactTitleDefinition;\r\nvar FactSetConfig = /** @class */ (function () {\r\n function FactSetConfig(obj) {\r\n this.title = new FactTitleDefinition();\r\n this.value = new FactTextDefinition();\r\n this.spacing = 10;\r\n if (obj) {\r\n this.title = new FactTitleDefinition(obj[\"title\"]);\r\n this.value = new FactTextDefinition(obj[\"value\"]);\r\n this.spacing =\r\n obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing;\r\n }\r\n }\r\n return FactSetConfig;\r\n}());\r\nexports.FactSetConfig = FactSetConfig;\r\nvar ShowCardActionConfig = /** @class */ (function () {\r\n function ShowCardActionConfig(obj) {\r\n this.actionMode = Enums.ShowCardActionMode.Inline;\r\n this.inlineTopMargin = 16;\r\n this.style = Enums.ContainerStyle.Emphasis;\r\n if (obj) {\r\n this.actionMode = parseHostConfigEnum(Enums.ShowCardActionMode, obj[\"actionMode\"], Enums.ShowCardActionMode.Inline);\r\n this.inlineTopMargin =\r\n obj[\"inlineTopMargin\"] != null ? obj[\"inlineTopMargin\"] : this.inlineTopMargin;\r\n this.style =\r\n obj[\"style\"] && typeof obj[\"style\"] === \"string\"\r\n ? obj[\"style\"]\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n }\r\n ShowCardActionConfig.prototype.toJSON = function () {\r\n return {\r\n actionMode: Enums.ShowCardActionMode[this.actionMode],\r\n inlineTopMargin: this.inlineTopMargin,\r\n style: this.style\r\n };\r\n };\r\n return ShowCardActionConfig;\r\n}());\r\nexports.ShowCardActionConfig = ShowCardActionConfig;\r\nvar ActionsConfig = /** @class */ (function () {\r\n function ActionsConfig(obj) {\r\n this.maxActions = 5;\r\n this.spacing = Enums.Spacing.Default;\r\n this.buttonSpacing = 20;\r\n this.showCard = new ShowCardActionConfig();\r\n this.preExpandSingleShowCardAction = false;\r\n this.actionsOrientation = Enums.Orientation.Horizontal;\r\n this.actionAlignment = Enums.ActionAlignment.Left;\r\n this.iconPlacement = Enums.ActionIconPlacement.LeftOfTitle;\r\n this.allowTitleToWrap = false;\r\n this.iconSize = 16;\r\n if (obj) {\r\n this.maxActions = obj[\"maxActions\"] != null ? obj[\"maxActions\"] : this.maxActions;\r\n this.spacing = parseHostConfigEnum(Enums.Spacing, obj.spacing && obj.spacing, Enums.Spacing.Default);\r\n this.buttonSpacing =\r\n obj[\"buttonSpacing\"] != null ? obj[\"buttonSpacing\"] : this.buttonSpacing;\r\n this.showCard = new ShowCardActionConfig(obj[\"showCard\"]);\r\n this.preExpandSingleShowCardAction = Utils.parseBool(obj[\"preExpandSingleShowCardAction\"], false);\r\n this.actionsOrientation = parseHostConfigEnum(Enums.Orientation, obj[\"actionsOrientation\"], Enums.Orientation.Horizontal);\r\n this.actionAlignment = parseHostConfigEnum(Enums.ActionAlignment, obj[\"actionAlignment\"], Enums.ActionAlignment.Left);\r\n this.iconPlacement = parseHostConfigEnum(Enums.ActionIconPlacement, obj[\"iconPlacement\"], Enums.ActionIconPlacement.LeftOfTitle);\r\n this.allowTitleToWrap =\r\n obj[\"allowTitleToWrap\"] != null ? obj[\"allowTitleToWrap\"] : this.allowTitleToWrap;\r\n try {\r\n var sizeAndUnit = Shared.SizeAndUnit.parse(obj[\"iconSize\"]);\r\n if (sizeAndUnit.unit === Enums.SizeUnit.Pixel) {\r\n this.iconSize = sizeAndUnit.physicalSize;\r\n }\r\n }\r\n catch (e) {\r\n // Swallow this, keep default icon size\r\n }\r\n }\r\n }\r\n ActionsConfig.prototype.toJSON = function () {\r\n return {\r\n maxActions: this.maxActions,\r\n spacing: Enums.Spacing[this.spacing],\r\n buttonSpacing: this.buttonSpacing,\r\n showCard: this.showCard,\r\n preExpandSingleShowCardAction: this.preExpandSingleShowCardAction,\r\n actionsOrientation: Enums.Orientation[this.actionsOrientation],\r\n actionAlignment: Enums.ActionAlignment[this.actionAlignment]\r\n };\r\n };\r\n return ActionsConfig;\r\n}());\r\nexports.ActionsConfig = ActionsConfig;\r\nvar ColorSetDefinition = /** @class */ (function () {\r\n function ColorSetDefinition(obj) {\r\n this.default = new TextColorDefinition();\r\n this.dark = new TextColorDefinition();\r\n this.light = new TextColorDefinition();\r\n this.accent = new TextColorDefinition();\r\n this.good = new TextColorDefinition();\r\n this.warning = new TextColorDefinition();\r\n this.attention = new TextColorDefinition();\r\n this.parse(obj);\r\n }\r\n ColorSetDefinition.prototype.parseSingleColor = function (obj, propertyName) {\r\n if (obj) {\r\n this[propertyName].parse(obj[propertyName]);\r\n }\r\n };\r\n ColorSetDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.parseSingleColor(obj, \"default\");\r\n this.parseSingleColor(obj, \"dark\");\r\n this.parseSingleColor(obj, \"light\");\r\n this.parseSingleColor(obj, \"accent\");\r\n this.parseSingleColor(obj, \"good\");\r\n this.parseSingleColor(obj, \"warning\");\r\n this.parseSingleColor(obj, \"attention\");\r\n }\r\n };\r\n return ColorSetDefinition;\r\n}());\r\nexports.ColorSetDefinition = ColorSetDefinition;\r\nvar ContainerStyleDefinition = /** @class */ (function () {\r\n function ContainerStyleDefinition(obj) {\r\n this.foregroundColors = new ColorSetDefinition({\r\n \"default\": { default: \"#333333\", subtle: \"#EE333333\" },\r\n \"dark\": { default: \"#000000\", subtle: \"#66000000\" },\r\n \"light\": { default: \"#FFFFFF\", subtle: \"#33000000\" },\r\n \"accent\": { default: \"#2E89FC\", subtle: \"#882E89FC\" },\r\n \"good\": { default: \"#028A02\", subtle: \"#DD027502\" },\r\n \"warning\": { default: \"#E69500\", subtle: \"#DDE69500\" },\r\n \"attention\": { default: \"#CC3300\", subtle: \"#DDCC3300\" }\r\n });\r\n this.parse(obj);\r\n }\r\n ContainerStyleDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.backgroundColor = obj[\"backgroundColor\"];\r\n this.foregroundColors.parse(obj[\"foregroundColors\"]);\r\n this.highlightBackgroundColor = obj[\"highlightBackgroundColor\"];\r\n this.highlightForegroundColor = obj[\"highlightForegroundColor\"];\r\n this.borderColor = obj[\"borderColor\"];\r\n }\r\n };\r\n Object.defineProperty(ContainerStyleDefinition.prototype, \"isBuiltIn\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ContainerStyleDefinition;\r\n}());\r\nexports.ContainerStyleDefinition = ContainerStyleDefinition;\r\nvar BuiltInContainerStyleDefinition = /** @class */ (function (_super) {\r\n __extends(BuiltInContainerStyleDefinition, _super);\r\n function BuiltInContainerStyleDefinition() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(BuiltInContainerStyleDefinition.prototype, \"isBuiltIn\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return BuiltInContainerStyleDefinition;\r\n}(ContainerStyleDefinition));\r\nvar ContainerStyleSet = /** @class */ (function () {\r\n function ContainerStyleSet(obj) {\r\n this._allStyles = {};\r\n this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition();\r\n if (obj) {\r\n this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]);\r\n this._allStyles[Enums.ContainerStyle.Emphasis].parse(obj[Enums.ContainerStyle.Emphasis]);\r\n this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]);\r\n this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]);\r\n this._allStyles[Enums.ContainerStyle.Attention].parse(obj[Enums.ContainerStyle.Attention]);\r\n this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]);\r\n var customStyleArray = obj[\"customStyles\"];\r\n if (customStyleArray && Array.isArray(customStyleArray)) {\r\n for (var _i = 0, customStyleArray_1 = customStyleArray; _i < customStyleArray_1.length; _i++) {\r\n var customStyle = customStyleArray_1[_i];\r\n if (customStyle) {\r\n var styleName = customStyle[\"name\"];\r\n if (styleName && typeof styleName === \"string\") {\r\n if (this._allStyles.hasOwnProperty(styleName)) {\r\n this._allStyles[styleName].parse(customStyle[\"style\"]);\r\n }\r\n else {\r\n this._allStyles[styleName] = new ContainerStyleDefinition(customStyle[\"style\"]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ContainerStyleSet.prototype.toJSON = function () {\r\n var _this = this;\r\n var customStyleArray = [];\r\n Object.keys(this._allStyles).forEach(function (key) {\r\n if (!_this._allStyles[key].isBuiltIn) {\r\n customStyleArray.push({\r\n name: key,\r\n style: _this._allStyles[key]\r\n });\r\n }\r\n });\r\n var result = {\r\n default: this.default,\r\n emphasis: this.emphasis\r\n };\r\n if (customStyleArray.length > 0) {\r\n result.customStyles = customStyleArray;\r\n }\r\n return result;\r\n };\r\n ContainerStyleSet.prototype.getStyleByName = function (name, defaultValue) {\r\n if (name && this._allStyles.hasOwnProperty(name)) {\r\n return this._allStyles[name];\r\n }\r\n else {\r\n return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default];\r\n }\r\n };\r\n Object.defineProperty(ContainerStyleSet.prototype, \"default\", {\r\n get: function () {\r\n return this._allStyles[Enums.ContainerStyle.Default];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContainerStyleSet.prototype, \"emphasis\", {\r\n get: function () {\r\n return this._allStyles[Enums.ContainerStyle.Emphasis];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ContainerStyleSet;\r\n}());\r\nexports.ContainerStyleSet = ContainerStyleSet;\r\nvar FontTypeDefinition = /** @class */ (function () {\r\n function FontTypeDefinition(fontFamily) {\r\n this.fontFamily = \"Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif\";\r\n this.fontSizes = {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n };\r\n this.fontWeights = {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n };\r\n if (fontFamily) {\r\n this.fontFamily = fontFamily;\r\n }\r\n }\r\n FontTypeDefinition.prototype.parse = function (obj) {\r\n this.fontFamily = obj[\"fontFamily\"] || this.fontFamily;\r\n this.fontSizes = {\r\n small: (obj.fontSizes && obj.fontSizes[\"small\"]) || this.fontSizes.small,\r\n default: (obj.fontSizes && obj.fontSizes[\"default\"]) || this.fontSizes.default,\r\n medium: (obj.fontSizes && obj.fontSizes[\"medium\"]) || this.fontSizes.medium,\r\n large: (obj.fontSizes && obj.fontSizes[\"large\"]) || this.fontSizes.large,\r\n extraLarge: (obj.fontSizes && obj.fontSizes[\"extraLarge\"]) || this.fontSizes.extraLarge\r\n };\r\n this.fontWeights = {\r\n lighter: (obj.fontWeights && obj.fontWeights[\"lighter\"]) || this.fontWeights.lighter,\r\n default: (obj.fontWeights && obj.fontWeights[\"default\"]) || this.fontWeights.default,\r\n bolder: (obj.fontWeights && obj.fontWeights[\"bolder\"]) || this.fontWeights.bolder\r\n };\r\n };\r\n FontTypeDefinition.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n return FontTypeDefinition;\r\n}());\r\nexports.FontTypeDefinition = FontTypeDefinition;\r\nvar FontTypeSet = /** @class */ (function () {\r\n function FontTypeSet(obj) {\r\n this.default = new FontTypeDefinition();\r\n this.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n if (obj) {\r\n this.default.parse(obj[\"default\"]);\r\n this.monospace.parse(obj[\"monospace\"]);\r\n }\r\n }\r\n FontTypeSet.prototype.getStyleDefinition = function (style) {\r\n switch (style) {\r\n case Enums.FontType.Monospace:\r\n return this.monospace;\r\n case Enums.FontType.Default:\r\n default:\r\n return this.default;\r\n }\r\n };\r\n return FontTypeSet;\r\n}());\r\nexports.FontTypeSet = FontTypeSet;\r\nvar CarouselConfig = /** @class */ (function () {\r\n function CarouselConfig(obj) {\r\n this.maxCarouselPages = 10;\r\n this.minAutoplayDelay = 5000.0;\r\n if (obj) {\r\n this.maxCarouselPages =\r\n obj[\"maxCarouselPages\"] != null ? obj[\"maxCarouselPages\"] : this.maxCarouselPages;\r\n this.minAutoplayDelay =\r\n obj[\"minAutoplayDelay\"] != null ? obj[\"minAutoplayDelay\"] : this.minAutoplayDelay;\r\n }\r\n }\r\n CarouselConfig.prototype.toJSON = function () {\r\n return {\r\n maxCarouselPages: this.maxCarouselPages,\r\n minAutoplayDelay: this.minAutoplayDelay\r\n };\r\n };\r\n return CarouselConfig;\r\n}());\r\nexports.CarouselConfig = CarouselConfig;\r\nvar HostConfig = /** @class */ (function () {\r\n function HostConfig(obj) {\r\n this.hostCapabilities = new host_capabilities_1.HostCapabilities();\r\n this.choiceSetInputValueSeparator = \",\";\r\n this.supportsInteractivity = true;\r\n this.spacing = {\r\n small: 3,\r\n default: 8,\r\n medium: 20,\r\n large: 30,\r\n extraLarge: 40,\r\n padding: 15\r\n };\r\n this.separator = {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n };\r\n this.imageSizes = {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n };\r\n this.containerStyles = new ContainerStyleSet();\r\n this.inputs = new InputConfig();\r\n this.actions = new ActionsConfig();\r\n this.adaptiveCard = new AdaptiveCardConfig();\r\n this.imageSet = new ImageSetConfig();\r\n this.media = new MediaConfig();\r\n this.factSet = new FactSetConfig();\r\n this.table = new TableConfig();\r\n this.textStyles = new TextStyleSet();\r\n this.textBlock = new TextBlockConfig();\r\n this.carousel = new CarouselConfig();\r\n this.alwaysAllowBleed = false;\r\n if (obj) {\r\n if (typeof obj === \"string\" || obj instanceof String) {\r\n obj = JSON.parse(obj);\r\n }\r\n this.choiceSetInputValueSeparator =\r\n obj && typeof obj[\"choiceSetInputValueSeparator\"] === \"string\"\r\n ? obj[\"choiceSetInputValueSeparator\"]\r\n : this.choiceSetInputValueSeparator;\r\n this.supportsInteractivity =\r\n obj && typeof obj[\"supportsInteractivity\"] === \"boolean\"\r\n ? obj[\"supportsInteractivity\"]\r\n : this.supportsInteractivity;\r\n this._legacyFontType = new FontTypeDefinition();\r\n this._legacyFontType.parse(obj);\r\n if (obj.fontTypes) {\r\n this.fontTypes = new FontTypeSet(obj.fontTypes);\r\n }\r\n if (obj.lineHeights) {\r\n this.lineHeights = {\r\n small: obj.lineHeights[\"small\"],\r\n default: obj.lineHeights[\"default\"],\r\n medium: obj.lineHeights[\"medium\"],\r\n large: obj.lineHeights[\"large\"],\r\n extraLarge: obj.lineHeights[\"extraLarge\"]\r\n };\r\n }\r\n this.imageSizes = {\r\n small: (obj.imageSizes && obj.imageSizes[\"small\"]) || this.imageSizes.small,\r\n medium: (obj.imageSizes && obj.imageSizes[\"medium\"]) || this.imageSizes.medium,\r\n large: (obj.imageSizes && obj.imageSizes[\"large\"]) || this.imageSizes.large\r\n };\r\n this.containerStyles = new ContainerStyleSet(obj[\"containerStyles\"]);\r\n this.spacing = {\r\n small: (obj.spacing && obj.spacing[\"small\"]) || this.spacing.small,\r\n default: (obj.spacing && obj.spacing[\"default\"]) || this.spacing.default,\r\n medium: (obj.spacing && obj.spacing[\"medium\"]) || this.spacing.medium,\r\n large: (obj.spacing && obj.spacing[\"large\"]) || this.spacing.large,\r\n extraLarge: (obj.spacing && obj.spacing[\"extraLarge\"]) || this.spacing.extraLarge,\r\n padding: (obj.spacing && obj.spacing[\"padding\"]) || this.spacing.padding\r\n };\r\n this.separator = {\r\n lineThickness: (obj.separator && obj.separator[\"lineThickness\"]) ||\r\n this.separator.lineThickness,\r\n lineColor: (obj.separator && obj.separator[\"lineColor\"]) || this.separator.lineColor\r\n };\r\n this.inputs = new InputConfig(obj.inputs || this.inputs);\r\n this.actions = new ActionsConfig(obj.actions || this.actions);\r\n this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard);\r\n this.imageSet = new ImageSetConfig(obj[\"imageSet\"]);\r\n this.factSet = new FactSetConfig(obj[\"factSet\"]);\r\n this.textStyles = new TextStyleSet(obj[\"textStyles\"]);\r\n this.textBlock = new TextBlockConfig(obj[\"textBlock\"]);\r\n this.carousel = new CarouselConfig(obj[\"carousel\"]);\r\n }\r\n }\r\n HostConfig.prototype.getFontTypeDefinition = function (style) {\r\n if (this.fontTypes) {\r\n return this.fontTypes.getStyleDefinition(style);\r\n }\r\n else {\r\n return style === Enums.FontType.Monospace\r\n ? FontTypeDefinition.monospace\r\n : this._legacyFontType;\r\n }\r\n };\r\n HostConfig.prototype.getEffectiveSpacing = function (spacing) {\r\n switch (spacing) {\r\n case Enums.Spacing.Small:\r\n return this.spacing.small;\r\n case Enums.Spacing.Default:\r\n return this.spacing.default;\r\n case Enums.Spacing.Medium:\r\n return this.spacing.medium;\r\n case Enums.Spacing.Large:\r\n return this.spacing.large;\r\n case Enums.Spacing.ExtraLarge:\r\n return this.spacing.extraLarge;\r\n case Enums.Spacing.Padding:\r\n return this.spacing.padding;\r\n default:\r\n return 0;\r\n }\r\n };\r\n HostConfig.prototype.paddingDefinitionToSpacingDefinition = function (paddingDefinition) {\r\n return new Shared.SpacingDefinition(this.getEffectiveSpacing(paddingDefinition.top), this.getEffectiveSpacing(paddingDefinition.right), this.getEffectiveSpacing(paddingDefinition.bottom), this.getEffectiveSpacing(paddingDefinition.left));\r\n };\r\n HostConfig.prototype.makeCssClassNames = function () {\r\n var classNames = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n classNames[_i] = arguments[_i];\r\n }\r\n var result = [];\r\n for (var _a = 0, classNames_1 = classNames; _a < classNames_1.length; _a++) {\r\n var className = classNames_1[_a];\r\n result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + \"-\" : \"\") + className);\r\n }\r\n return result;\r\n };\r\n HostConfig.prototype.makeCssClassName = function () {\r\n var classNames = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n classNames[_i] = arguments[_i];\r\n }\r\n var result = this.makeCssClassNames.apply(this, classNames).join(\" \");\r\n return result ? result : \"\";\r\n };\r\n Object.defineProperty(HostConfig.prototype, \"fontFamily\", {\r\n get: function () {\r\n return this._legacyFontType.fontFamily;\r\n },\r\n set: function (value) {\r\n this._legacyFontType.fontFamily = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HostConfig.prototype, \"fontSizes\", {\r\n get: function () {\r\n return this._legacyFontType.fontSizes;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HostConfig.prototype, \"fontWeights\", {\r\n get: function () {\r\n return this._legacyFontType.fontWeights;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return HostConfig;\r\n}());\r\nexports.HostConfig = HostConfig;\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexports.defaultHostConfig = new HostConfig({\r\n supportsInteractivity: true,\r\n spacing: {\r\n small: 10,\r\n default: 20,\r\n medium: 30,\r\n large: 40,\r\n extraLarge: 50,\r\n padding: 20\r\n },\r\n separator: {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n },\r\n fontTypes: {\r\n default: {\r\n fontFamily: \"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n },\r\n monospace: {\r\n fontFamily: \"'Courier New', Courier, monospace\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n }\r\n },\r\n imageSizes: {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n },\r\n containerStyles: {\r\n default: {\r\n backgroundColor: \"#FFFFFF\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n emphasis: {\r\n backgroundColor: \"#08000000\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n accent: {\r\n backgroundColor: \"#C7DEF9\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n good: {\r\n backgroundColor: \"#CCFFCC\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n attention: {\r\n backgroundColor: \"#FFC5B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n warning: {\r\n backgroundColor: \"#FFE2B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n }\r\n },\r\n inputs: {\r\n label: {\r\n requiredInputs: {\r\n weight: Enums.TextWeight.Bolder,\r\n suffix: \" *\",\r\n suffixColor: Enums.TextColor.Attention\r\n },\r\n optionalInputs: {\r\n weight: Enums.TextWeight.Bolder\r\n }\r\n },\r\n errorMessage: {\r\n color: Enums.TextColor.Attention,\r\n weight: Enums.TextWeight.Bolder\r\n },\r\n debounceTimeInMilliSeconds: 250\r\n },\r\n actions: {\r\n maxActions: 5,\r\n spacing: Enums.Spacing.Default,\r\n buttonSpacing: 10,\r\n showCard: {\r\n actionMode: Enums.ShowCardActionMode.Inline,\r\n inlineTopMargin: 16\r\n },\r\n actionsOrientation: Enums.Orientation.Horizontal,\r\n actionAlignment: Enums.ActionAlignment.Left\r\n },\r\n adaptiveCard: {\r\n allowCustomStyle: false\r\n },\r\n imageSet: {\r\n imageSize: Enums.Size.Medium,\r\n maxImageHeight: 100\r\n },\r\n factSet: {\r\n title: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Bolder,\r\n wrap: true,\r\n maxWidth: 150\r\n },\r\n value: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Default,\r\n wrap: true\r\n },\r\n spacing: 10\r\n },\r\n carousel: {\r\n maxCarouselPages: 10,\r\n minAutoplayDuration: 5000\r\n },\r\n textBlock: {\r\n headingLevel: 2\r\n }\r\n});\r\n//# sourceMappingURL=host-config.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.GlobalRegistry = exports.CardObjectRegistry = void 0;\r\nvar serialization_1 = require(\"./serialization\");\r\nvar CardObjectRegistry = /** @class */ (function () {\r\n function CardObjectRegistry() {\r\n this._items = {};\r\n }\r\n CardObjectRegistry.prototype.findByName = function (typeName) {\r\n return this._items.hasOwnProperty(typeName) ? this._items[typeName] : undefined;\r\n };\r\n CardObjectRegistry.prototype.clear = function () {\r\n this._items = {};\r\n };\r\n CardObjectRegistry.prototype.copyTo = function (target) {\r\n var keys = Object.keys(this._items);\r\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\r\n var key = keys_1[_i];\r\n var typeRegistration = this._items[key];\r\n target.register(typeRegistration.typeName, typeRegistration.objectType, typeRegistration.schemaVersion);\r\n }\r\n };\r\n CardObjectRegistry.prototype.register = function (typeName, objectType, schemaVersion) {\r\n if (schemaVersion === void 0) { schemaVersion = serialization_1.Versions.v1_0; }\r\n var registrationInfo = this.findByName(typeName);\r\n if (registrationInfo !== undefined) {\r\n registrationInfo.objectType = objectType;\r\n }\r\n else {\r\n registrationInfo = {\r\n typeName: typeName,\r\n objectType: objectType,\r\n schemaVersion: schemaVersion\r\n };\r\n }\r\n this._items[typeName] = registrationInfo;\r\n };\r\n CardObjectRegistry.prototype.unregister = function (typeName) {\r\n delete this._items[typeName];\r\n };\r\n CardObjectRegistry.prototype.createInstance = function (typeName, targetVersion) {\r\n var registrationInfo = this.findByName(typeName);\r\n return registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0\r\n ? new registrationInfo.objectType()\r\n : undefined;\r\n };\r\n CardObjectRegistry.prototype.getItemCount = function () {\r\n return Object.keys(this._items).length;\r\n };\r\n CardObjectRegistry.prototype.getItemAt = function (index) {\r\n var _this = this;\r\n return Object.keys(this._items).map(function (e) { return _this._items[e]; })[index];\r\n };\r\n return CardObjectRegistry;\r\n}());\r\nexports.CardObjectRegistry = CardObjectRegistry;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar GlobalRegistry = /** @class */ (function () {\r\n function GlobalRegistry() {\r\n }\r\n GlobalRegistry.populateWithDefaultElements = function (registry) {\r\n registry.clear();\r\n GlobalRegistry.defaultElements.copyTo(registry);\r\n };\r\n GlobalRegistry.populateWithDefaultActions = function (registry) {\r\n registry.clear();\r\n GlobalRegistry.defaultActions.copyTo(registry);\r\n };\r\n Object.defineProperty(GlobalRegistry, \"elements\", {\r\n get: function () {\r\n if (!GlobalRegistry._elements) {\r\n GlobalRegistry._elements = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultElements(GlobalRegistry._elements);\r\n }\r\n return GlobalRegistry._elements;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(GlobalRegistry, \"actions\", {\r\n get: function () {\r\n if (!GlobalRegistry._actions) {\r\n GlobalRegistry._actions = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultActions(GlobalRegistry._actions);\r\n }\r\n return GlobalRegistry._actions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n GlobalRegistry.reset = function () {\r\n GlobalRegistry._elements = undefined;\r\n GlobalRegistry._actions = undefined;\r\n };\r\n GlobalRegistry.defaultElements = new CardObjectRegistry();\r\n GlobalRegistry.defaultActions = new CardObjectRegistry();\r\n return GlobalRegistry;\r\n}());\r\nexports.GlobalRegistry = GlobalRegistry;\r\n//# sourceMappingURL=registry.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SerializableObject = exports.property = exports.SerializableObjectSchema = exports.CustomProperty = exports.SerializableObjectCollectionProperty = exports.SerializableObjectProperty = exports.EnumProperty = exports.ValueSetProperty = exports.StringArrayProperty = exports.PixelSizeProperty = exports.NumProperty = exports.BoolProperty = exports.StringProperty = exports.PropertyDefinition = exports.BaseSerializationContext = exports.isVersionLessOrEqual = exports.Versions = exports.Version = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar shared_1 = require(\"./shared\");\r\nvar Utils = require(\"./utils\");\r\nvar Enums = require(\"./enums\");\r\nvar strings_1 = require(\"./strings\");\r\nvar Version = /** @class */ (function () {\r\n function Version(major, minor, label) {\r\n if (major === void 0) { major = 1; }\r\n if (minor === void 0) { minor = 1; }\r\n this._isValid = true;\r\n this._major = major;\r\n this._minor = minor;\r\n this._label = label;\r\n }\r\n Version.parse = function (versionString, context) {\r\n if (!versionString) {\r\n return undefined;\r\n }\r\n var result = new Version();\r\n result._versionString = versionString;\r\n var regEx = /(\\d+).(\\d+)/gi;\r\n var matches = regEx.exec(versionString);\r\n if (matches != null && matches.length === 3) {\r\n result._major = parseInt(matches[1]);\r\n result._minor = parseInt(matches[2]);\r\n }\r\n else {\r\n result._isValid = false;\r\n }\r\n if (!result._isValid) {\r\n context.logParseEvent(undefined, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidVersionString(result._versionString));\r\n }\r\n return result;\r\n };\r\n Version.prototype.toString = function () {\r\n return !this._isValid ? this._versionString : this._major + \".\" + this._minor;\r\n };\r\n Version.prototype.toJSON = function () {\r\n return this.toString();\r\n };\r\n Version.prototype.compareTo = function (otherVersion) {\r\n if (!this.isValid || !otherVersion.isValid) {\r\n throw new Error(\"Cannot compare invalid version.\");\r\n }\r\n if (this.major > otherVersion.major) {\r\n return 1;\r\n }\r\n else if (this.major < otherVersion.major) {\r\n return -1;\r\n }\r\n else if (this.minor > otherVersion.minor) {\r\n return 1;\r\n }\r\n else if (this.minor < otherVersion.minor) {\r\n return -1;\r\n }\r\n return 0;\r\n };\r\n Object.defineProperty(Version.prototype, \"label\", {\r\n get: function () {\r\n return this._label ? this._label : this.toString();\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Version.prototype, \"major\", {\r\n get: function () {\r\n return this._major;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Version.prototype, \"minor\", {\r\n get: function () {\r\n return this._minor;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Version.prototype, \"isValid\", {\r\n get: function () {\r\n return this._isValid;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return Version;\r\n}());\r\nexports.Version = Version;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar Versions = /** @class */ (function () {\r\n function Versions() {\r\n }\r\n // If preview tag is added/removed from any version,\r\n // don't forget to update .ac-schema-version-1-?::after too in adaptivecards-site\\themes\\adaptivecards\\source\\css\\style.css\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n Versions.getAllDeclaredVersions = function () {\r\n var ctor = Versions;\r\n var properties = [];\r\n for (var propertyName in ctor) {\r\n if (propertyName.match(/^v[0-9_]*$/)) {\r\n // filter latest\r\n try {\r\n var propertyValue = ctor[propertyName];\r\n if (propertyValue instanceof Version) {\r\n properties.push(propertyValue);\r\n }\r\n }\r\n catch (_a) {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n }\r\n return properties.sort(function (v1, v2) { return v1.compareTo(v2); });\r\n };\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n Versions.v1_0 = new Version(1, 0);\r\n Versions.v1_1 = new Version(1, 1);\r\n Versions.v1_2 = new Version(1, 2);\r\n Versions.v1_3 = new Version(1, 3);\r\n Versions.v1_4 = new Version(1, 4);\r\n Versions.v1_5 = new Version(1, 5);\r\n Versions.v1_6 = new Version(1, 6);\r\n Versions.latest = Versions.v1_6;\r\n return Versions;\r\n}());\r\nexports.Versions = Versions;\r\nfunction isVersionLessOrEqual(version, targetVersion) {\r\n if (version instanceof Version) {\r\n if (targetVersion instanceof Version) {\r\n return targetVersion.compareTo(version) >= 0;\r\n }\r\n else {\r\n // Target version is *\r\n return true;\r\n }\r\n }\r\n else {\r\n // Version is *\r\n return true;\r\n }\r\n}\r\nexports.isVersionLessOrEqual = isVersionLessOrEqual;\r\nvar BaseSerializationContext = /** @class */ (function () {\r\n function BaseSerializationContext(targetVersion) {\r\n if (targetVersion === void 0) { targetVersion = Versions.latest; }\r\n this._validationEvents = [];\r\n this.targetVersion = targetVersion;\r\n }\r\n BaseSerializationContext.prototype.isTemplateString = function (value) {\r\n if (typeof value === \"string\") {\r\n return value.startsWith(\"${\");\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n BaseSerializationContext.prototype.tryDeleteValue = function (target, propertyName) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n };\r\n BaseSerializationContext.prototype.tryDeleteDefaultValue = function (target, propertyName) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || !this.isTemplateString(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeValue = function (target, propertyName, propertyValue, defaultValue, forceDeleteIfNullOrDefault) {\r\n if (defaultValue === void 0) { defaultValue = undefined; }\r\n if (forceDeleteIfNullOrDefault === void 0) { forceDeleteIfNullOrDefault = false; }\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) {\r\n delete target[propertyName];\r\n }\r\n }\r\n else if (propertyValue === defaultValue) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault || !this.isTemplateString(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeString = function (target, propertyName, propertyValue, defaultValue) {\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeBool = function (target, propertyName, propertyValue, defaultValue) {\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeNumber = function (target, propertyName, propertyValue, defaultValue) {\r\n if (propertyValue === null ||\r\n propertyValue === undefined ||\r\n isNaN(propertyValue)) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeEnum = function (enumType, target, propertyName, propertyValue, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = undefined; }\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = enumType[propertyValue];\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeArray = function (target, propertyName, propertyValue) {\r\n var items = [];\r\n if (propertyValue) {\r\n for (var _i = 0, propertyValue_1 = propertyValue; _i < propertyValue_1.length; _i++) {\r\n var item = propertyValue_1[_i];\r\n var serializedItem = undefined;\r\n if (item instanceof SerializableObject) {\r\n serializedItem = item.toJSON(this);\r\n }\r\n else if (item.toJSON) {\r\n serializedItem = item.toJSON();\r\n }\r\n else {\r\n serializedItem = item;\r\n }\r\n if (serializedItem !== undefined) {\r\n items.push(serializedItem);\r\n }\r\n }\r\n }\r\n if (items.length === 0) {\r\n if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n }\r\n else {\r\n this.serializeValue(target, propertyName, items);\r\n }\r\n };\r\n BaseSerializationContext.prototype.clearEvents = function () {\r\n this._validationEvents = [];\r\n };\r\n BaseSerializationContext.prototype.logEvent = function (source, phase, event, message) {\r\n this._validationEvents.push({\r\n source: source,\r\n phase: phase,\r\n event: event,\r\n message: message\r\n });\r\n };\r\n BaseSerializationContext.prototype.logParseEvent = function (source, event, message) {\r\n this.logEvent(source, Enums.ValidationPhase.Parse, event, message);\r\n };\r\n BaseSerializationContext.prototype.getEventAt = function (index) {\r\n return this._validationEvents[index];\r\n };\r\n Object.defineProperty(BaseSerializationContext.prototype, \"eventCount\", {\r\n get: function () {\r\n return this._validationEvents.length;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return BaseSerializationContext;\r\n}());\r\nexports.BaseSerializationContext = BaseSerializationContext;\r\nvar SimpleSerializationContext = /** @class */ (function (_super) {\r\n __extends(SimpleSerializationContext, _super);\r\n function SimpleSerializationContext() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return SimpleSerializationContext;\r\n}(BaseSerializationContext));\r\nvar PropertyDefinition = /** @class */ (function () {\r\n function PropertyDefinition(targetVersion, name, defaultValue, onGetInitialValue) {\r\n this.targetVersion = targetVersion;\r\n this.name = name;\r\n this.defaultValue = defaultValue;\r\n this.onGetInitialValue = onGetInitialValue;\r\n this.isSerializationEnabled = true;\r\n this.sequentialNumber = PropertyDefinition._sequentialNumber;\r\n PropertyDefinition._sequentialNumber++;\r\n }\r\n PropertyDefinition.prototype.getInternalName = function () {\r\n return this.name;\r\n };\r\n PropertyDefinition.prototype.parse = function (sender, source, context) {\r\n return source[this.name];\r\n };\r\n PropertyDefinition.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value, this.defaultValue);\r\n };\r\n PropertyDefinition._sequentialNumber = 0;\r\n return PropertyDefinition;\r\n}());\r\nexports.PropertyDefinition = PropertyDefinition;\r\nvar StringProperty = /** @class */ (function (_super) {\r\n __extends(StringProperty, _super);\r\n function StringProperty(targetVersion, name, treatEmptyAsUndefined, regEx, defaultValue, onGetInitialValue) {\r\n if (treatEmptyAsUndefined === void 0) { treatEmptyAsUndefined = true; }\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.treatEmptyAsUndefined = treatEmptyAsUndefined;\r\n _this.regEx = regEx;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n StringProperty.prototype.parse = function (sender, source, context) {\r\n var parsedValue = Utils.parseString(source[this.name], this.defaultValue);\r\n var isUndefined = parsedValue === undefined || (parsedValue === \"\" && this.treatEmptyAsUndefined);\r\n if (!isUndefined && this.regEx !== undefined) {\r\n var matches = this.regEx.exec(parsedValue);\r\n if (!matches) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(parsedValue, this.name));\r\n return undefined;\r\n }\r\n }\r\n return parsedValue;\r\n };\r\n StringProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeString(target, this.name, value === \"\" && this.treatEmptyAsUndefined ? undefined : value, this.defaultValue);\r\n };\r\n return StringProperty;\r\n}(PropertyDefinition));\r\nexports.StringProperty = StringProperty;\r\nvar BoolProperty = /** @class */ (function (_super) {\r\n __extends(BoolProperty, _super);\r\n function BoolProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n BoolProperty.prototype.parse = function (sender, source, context) {\r\n return Utils.parseBool(source[this.name], this.defaultValue);\r\n };\r\n BoolProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeBool(target, this.name, value, this.defaultValue);\r\n };\r\n return BoolProperty;\r\n}(PropertyDefinition));\r\nexports.BoolProperty = BoolProperty;\r\nvar NumProperty = /** @class */ (function (_super) {\r\n __extends(NumProperty, _super);\r\n function NumProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n NumProperty.prototype.parse = function (sender, source, context) {\r\n return Utils.parseNumber(source[this.name], this.defaultValue);\r\n };\r\n NumProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeNumber(target, this.name, value, this.defaultValue);\r\n };\r\n return NumProperty;\r\n}(PropertyDefinition));\r\nexports.NumProperty = NumProperty;\r\nvar PixelSizeProperty = /** @class */ (function (_super) {\r\n __extends(PixelSizeProperty, _super);\r\n function PixelSizeProperty() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n PixelSizeProperty.prototype.parse = function (sender, source, context) {\r\n var result = undefined;\r\n var value = source[this.name];\r\n if (typeof value === \"string\") {\r\n var isValid = false;\r\n try {\r\n var size = shared_1.SizeAndUnit.parse(value, true);\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n isValid = true;\r\n }\r\n }\r\n catch (_a) {\r\n // Do nothing. A parse error is emitted below\r\n }\r\n if (!isValid) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(source[this.name], this.name));\r\n }\r\n }\r\n return result;\r\n };\r\n PixelSizeProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\r\n };\r\n return PixelSizeProperty;\r\n}(PropertyDefinition));\r\nexports.PixelSizeProperty = PixelSizeProperty;\r\nvar StringArrayProperty = /** @class */ (function (_super) {\r\n __extends(StringArrayProperty, _super);\r\n function StringArrayProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n StringArrayProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined || !Array.isArray(sourceValue)) {\r\n return this.defaultValue;\r\n }\r\n var result = [];\r\n for (var _i = 0, sourceValue_1 = sourceValue; _i < sourceValue_1.length; _i++) {\r\n var value = sourceValue_1[_i];\r\n if (typeof value === \"string\") {\r\n result.push(value);\r\n }\r\n else {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, \"Invalid array value \\\"\".concat(JSON.stringify(value), \"\\\" of type \\\"\").concat(typeof value, \"\\\" ignored for \\\"\").concat(this.name, \"\\\".\"));\r\n }\r\n }\r\n return result;\r\n };\r\n StringArrayProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeArray(target, this.name, value);\r\n };\r\n return StringArrayProperty;\r\n}(PropertyDefinition));\r\nexports.StringArrayProperty = StringArrayProperty;\r\nvar ValueSetProperty = /** @class */ (function (_super) {\r\n __extends(ValueSetProperty, _super);\r\n function ValueSetProperty(targetVersion, name, values, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.values = values;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n ValueSetProperty.prototype.isValidValue = function (value, context) {\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (value.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n return targetVersion.compareTo(context.targetVersion) <= 0;\r\n }\r\n }\r\n return false;\r\n };\r\n ValueSetProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n if (typeof sourceValue === \"string\") {\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return versionedValue.value;\r\n }\r\n else {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\r\n return this.defaultValue;\r\n };\r\n ValueSetProperty.prototype.toJSON = function (sender, target, value, context) {\r\n var invalidValue = false;\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (versionedValue.value === value) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n break;\r\n }\r\n else {\r\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(value, this.name, targetVersion.toString(), context.targetVersion.toString()));\r\n }\r\n }\r\n }\r\n }\r\n if (!invalidValue) {\r\n context.serializeValue(target, this.name, value, this.defaultValue, true);\r\n }\r\n };\r\n return ValueSetProperty;\r\n}(PropertyDefinition));\r\nexports.ValueSetProperty = ValueSetProperty;\r\nvar EnumProperty = /** @class */ (function (_super) {\r\n __extends(EnumProperty, _super);\r\n function EnumProperty(targetVersion, name, enumType, defaultValue, values, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.enumType = enumType;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n _this._values = [];\r\n if (!values) {\r\n // eslint-disable-next-line guard-for-in\r\n for (var key in enumType) {\r\n var keyAsNumber = parseInt(key, 10);\r\n if (keyAsNumber >= 0) {\r\n _this._values.push({ value: keyAsNumber });\r\n }\r\n }\r\n }\r\n else {\r\n _this._values = values;\r\n }\r\n return _this;\r\n }\r\n EnumProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (typeof sourceValue !== \"string\") {\r\n return this.defaultValue;\r\n }\r\n var enumValue = Utils.getEnumValueByName(this.enumType, sourceValue);\r\n if (enumValue !== undefined) {\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (versionedValue.value === enumValue) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return enumValue;\r\n }\r\n else {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\r\n return this.defaultValue;\r\n };\r\n EnumProperty.prototype.toJSON = function (sender, target, value, context) {\r\n var invalidValue = false;\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (versionedValue.value === value) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n break;\r\n }\r\n else {\r\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(value, this.name));\r\n }\r\n }\r\n }\r\n }\r\n if (!invalidValue) {\r\n context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue);\r\n }\r\n };\r\n Object.defineProperty(EnumProperty.prototype, \"values\", {\r\n get: function () {\r\n return this._values;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return EnumProperty;\r\n}(PropertyDefinition));\r\nexports.EnumProperty = EnumProperty;\r\nvar SerializableObjectProperty = /** @class */ (function (_super) {\r\n __extends(SerializableObjectProperty, _super);\r\n function SerializableObjectProperty(targetVersion, name, objectType, nullable, defaultValue) {\r\n if (nullable === void 0) { nullable = false; }\r\n var _this = _super.call(this, targetVersion, name, defaultValue, function (sender) {\r\n return _this.nullable ? undefined : new _this.objectType();\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.objectType = objectType;\r\n _this.nullable = nullable;\r\n return _this;\r\n }\r\n SerializableObjectProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined) {\r\n return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue;\r\n }\r\n var result = new this.objectType();\r\n result.parse(sourceValue, context);\r\n return result;\r\n };\r\n SerializableObjectProperty.prototype.toJSON = function (sender, target, value, context) {\r\n var serializedValue = undefined;\r\n if (value !== undefined && !value.hasAllDefaultValues()) {\r\n serializedValue = value.toJSON(context);\r\n }\r\n if (typeof serializedValue === \"object\" && Object.keys(serializedValue).length === 0) {\r\n serializedValue = undefined;\r\n }\r\n context.serializeValue(target, this.name, serializedValue, this.defaultValue, true);\r\n };\r\n return SerializableObjectProperty;\r\n}(PropertyDefinition));\r\nexports.SerializableObjectProperty = SerializableObjectProperty;\r\nvar SerializableObjectCollectionProperty = /** @class */ (function (_super) {\r\n __extends(SerializableObjectCollectionProperty, _super);\r\n function SerializableObjectCollectionProperty(targetVersion, name, objectType, onItemAdded) {\r\n var _this = _super.call(this, targetVersion, name, undefined, function (sender) {\r\n return [];\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.objectType = objectType;\r\n _this.onItemAdded = onItemAdded;\r\n return _this;\r\n }\r\n SerializableObjectCollectionProperty.prototype.parse = function (sender, source, context) {\r\n var result = [];\r\n var sourceCollection = source[this.name];\r\n if (Array.isArray(sourceCollection)) {\r\n for (var _i = 0, sourceCollection_1 = sourceCollection; _i < sourceCollection_1.length; _i++) {\r\n var sourceItem = sourceCollection_1[_i];\r\n var item = new this.objectType();\r\n item.parse(sourceItem, context);\r\n result.push(item);\r\n if (this.onItemAdded) {\r\n this.onItemAdded(sender, item);\r\n }\r\n }\r\n }\r\n return result.length > 0\r\n ? result\r\n : this.onGetInitialValue\r\n ? this.onGetInitialValue(sender)\r\n : undefined;\r\n };\r\n SerializableObjectCollectionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeArray(target, this.name, value);\r\n };\r\n return SerializableObjectCollectionProperty;\r\n}(PropertyDefinition));\r\nexports.SerializableObjectCollectionProperty = SerializableObjectCollectionProperty;\r\nvar CustomProperty = /** @class */ (function (_super) {\r\n __extends(CustomProperty, _super);\r\n function CustomProperty(targetVersion, name, onParse, onToJSON, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.onParse = onParse;\r\n _this.onToJSON = onToJSON;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n if (!_this.onParse) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onParse handler.\");\r\n }\r\n if (!_this.onToJSON) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onToJSON handler.\");\r\n }\r\n return _this;\r\n }\r\n CustomProperty.prototype.parse = function (sender, source, context) {\r\n return this.onParse(sender, this, source, context);\r\n };\r\n CustomProperty.prototype.toJSON = function (sender, target, value, context) {\r\n this.onToJSON(sender, this, target, value, context);\r\n };\r\n return CustomProperty;\r\n}(PropertyDefinition));\r\nexports.CustomProperty = CustomProperty;\r\nvar SerializableObjectSchema = /** @class */ (function () {\r\n function SerializableObjectSchema() {\r\n this._properties = [];\r\n }\r\n SerializableObjectSchema.prototype.indexOf = function (prop) {\r\n for (var i = 0; i < this._properties.length; i++) {\r\n if (this._properties[i] === prop) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n SerializableObjectSchema.prototype.add = function () {\r\n var properties = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n properties[_i] = arguments[_i];\r\n }\r\n for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) {\r\n var prop = properties_1[_a];\r\n if (this.indexOf(prop) === -1) {\r\n this._properties.push(prop);\r\n }\r\n }\r\n };\r\n SerializableObjectSchema.prototype.remove = function () {\r\n var properties = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n properties[_i] = arguments[_i];\r\n }\r\n for (var _a = 0, properties_2 = properties; _a < properties_2.length; _a++) {\r\n var prop = properties_2[_a];\r\n while (true) {\r\n var index = this.indexOf(prop);\r\n if (index >= 0) {\r\n this._properties.splice(index, 1);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n SerializableObjectSchema.prototype.getItemAt = function (index) {\r\n return this._properties[index];\r\n };\r\n SerializableObjectSchema.prototype.getCount = function () {\r\n return this._properties.length;\r\n };\r\n return SerializableObjectSchema;\r\n}());\r\nexports.SerializableObjectSchema = SerializableObjectSchema;\r\n// This is a decorator function, used to map SerializableObject descendant class members to\r\n// schema properties\r\nfunction property(prop) {\r\n return function (target, propertyKey) {\r\n var descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};\r\n if (!descriptor.get && !descriptor.set) {\r\n descriptor.get = function () {\r\n return this.getValue(prop);\r\n };\r\n descriptor.set = function (value) {\r\n this.setValue(prop, value);\r\n };\r\n Object.defineProperty(target, propertyKey, descriptor);\r\n }\r\n };\r\n}\r\nexports.property = property;\r\nvar SerializableObject = /** @class */ (function () {\r\n function SerializableObject() {\r\n this._propertyBag = {};\r\n this._rawProperties = {};\r\n this.maxVersion = SerializableObject.defaultMaxVersion;\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n if (prop.onGetInitialValue) {\r\n this.setValue(prop, prop.onGetInitialValue(this));\r\n }\r\n }\r\n }\r\n SerializableObject.prototype.getDefaultSerializationContext = function () {\r\n return new SimpleSerializationContext();\r\n };\r\n SerializableObject.prototype.populateSchema = function (schema) {\r\n var ctor = this.constructor;\r\n var properties = [];\r\n // eslint-disable-next-line guard-for-in\r\n for (var propertyName in ctor) {\r\n try {\r\n var propertyValue = ctor[propertyName];\r\n if (propertyValue instanceof PropertyDefinition) {\r\n properties.push(propertyValue);\r\n }\r\n }\r\n catch (_a) {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n if (properties.length > 0) {\r\n var sortedProperties = properties.sort(function (p1, p2) {\r\n if (p1.sequentialNumber > p2.sequentialNumber) {\r\n return 1;\r\n }\r\n else if (p1.sequentialNumber < p2.sequentialNumber) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n schema.add.apply(schema, sortedProperties);\r\n }\r\n if (SerializableObject.onRegisterCustomProperties) {\r\n SerializableObject.onRegisterCustomProperties(this, schema);\r\n }\r\n };\r\n SerializableObject.prototype.getValue = function (prop) {\r\n return this._propertyBag.hasOwnProperty(prop.getInternalName())\r\n ? this._propertyBag[prop.getInternalName()]\r\n : prop.defaultValue;\r\n };\r\n SerializableObject.prototype.setValue = function (prop, value) {\r\n if (value === undefined || value === null) {\r\n delete this._propertyBag[prop.getInternalName()];\r\n }\r\n else {\r\n this._propertyBag[prop.getInternalName()] = value;\r\n }\r\n };\r\n SerializableObject.prototype.internalParse = function (source, context) {\r\n this._propertyBag = {};\r\n this._rawProperties = shared_1.GlobalSettings.enableFullJsonRoundTrip ? (source ? source : {}) : {};\r\n if (source) {\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n if (prop.isSerializationEnabled) {\r\n var propertyValue = prop.onGetInitialValue\r\n ? prop.onGetInitialValue(this)\r\n : undefined;\r\n if (source.hasOwnProperty(prop.name)) {\r\n if (prop.targetVersion.compareTo(context.targetVersion) <= 0) {\r\n propertyValue = prop.parse(this, source, context);\r\n }\r\n else {\r\n context.logParseEvent(this, Enums.ValidationEvent.UnsupportedProperty, strings_1.Strings.errors.propertyNotSupported(prop.name, prop.targetVersion.toString(), context.targetVersion.toString()));\r\n }\r\n }\r\n this.setValue(prop, propertyValue);\r\n }\r\n }\r\n }\r\n else {\r\n this.resetDefaultValues();\r\n }\r\n };\r\n SerializableObject.prototype.internalToJSON = function (target, context) {\r\n var s = this.getSchema();\r\n var serializedProperties = [];\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n // Avoid serializing the same property multiple times. This is necessary\r\n // because some property definitions map to the same underlying schema\r\n // property\r\n if (prop.isSerializationEnabled &&\r\n prop.targetVersion.compareTo(context.targetVersion) <= 0 &&\r\n serializedProperties.indexOf(prop.name) === -1) {\r\n prop.toJSON(this, target, this.getValue(prop), context);\r\n serializedProperties.push(prop.name);\r\n }\r\n }\r\n };\r\n SerializableObject.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n SerializableObject.prototype.parse = function (source, context) {\r\n this.internalParse(source, context ? context : new SimpleSerializationContext());\r\n };\r\n SerializableObject.prototype.toJSON = function (context) {\r\n var effectiveContext;\r\n if (context && context instanceof BaseSerializationContext) {\r\n effectiveContext = context;\r\n }\r\n else {\r\n effectiveContext = this.getDefaultSerializationContext();\r\n effectiveContext.toJSONOriginalParam = context;\r\n }\r\n if (this.shouldSerialize(effectiveContext)) {\r\n var result = void 0;\r\n if (shared_1.GlobalSettings.enableFullJsonRoundTrip &&\r\n this._rawProperties &&\r\n typeof this._rawProperties === \"object\") {\r\n result = this._rawProperties;\r\n }\r\n else {\r\n result = {};\r\n }\r\n this.internalToJSON(result, effectiveContext);\r\n return result;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n SerializableObject.prototype.hasDefaultValue = function (prop) {\r\n return this.getValue(prop) === prop.defaultValue;\r\n };\r\n SerializableObject.prototype.hasAllDefaultValues = function () {\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n if (!this.hasDefaultValue(prop)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n SerializableObject.prototype.resetDefaultValues = function () {\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n this.setValue(prop, prop.defaultValue);\r\n }\r\n };\r\n SerializableObject.prototype.setCustomProperty = function (name, value) {\r\n var shouldDeleteProperty = (typeof value === \"string\" && !value) || value === undefined || value === null;\r\n if (shouldDeleteProperty) {\r\n delete this._rawProperties[name];\r\n }\r\n else {\r\n this._rawProperties[name] = value;\r\n }\r\n };\r\n SerializableObject.prototype.getCustomProperty = function (name) {\r\n return this._rawProperties[name];\r\n };\r\n SerializableObject.prototype.getSchema = function () {\r\n var schema = SerializableObject._schemaCache[this.getSchemaKey()];\r\n if (!schema) {\r\n schema = new SerializableObjectSchema();\r\n this.populateSchema(schema);\r\n SerializableObject._schemaCache[this.getSchemaKey()] = schema;\r\n }\r\n return schema;\r\n };\r\n SerializableObject.defaultMaxVersion = Versions.latest;\r\n SerializableObject._schemaCache = {};\r\n return SerializableObject;\r\n}());\r\nexports.SerializableObject = SerializableObject;\r\n//# sourceMappingURL=serialization.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.UUID = exports.SizeAndUnit = exports.PaddingDefinition = exports.SpacingDefinition = exports.StringWithSubstitutions = exports.ContentTypes = exports.GlobalSettings = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar GlobalSettings = /** @class */ (function () {\r\n function GlobalSettings() {\r\n }\r\n GlobalSettings.useAdvancedTextBlockTruncation = true;\r\n GlobalSettings.useAdvancedCardBottomTruncation = false;\r\n GlobalSettings.useMarkdownInRadioButtonAndCheckbox = true;\r\n GlobalSettings.allowMarkForTextHighlighting = false;\r\n GlobalSettings.alwaysBleedSeparators = false;\r\n GlobalSettings.enableFullJsonRoundTrip = false;\r\n GlobalSettings.displayInputValidationErrors = true;\r\n GlobalSettings.allowPreProcessingPropertyValues = false;\r\n GlobalSettings.setTabIndexAtCardRoot = true;\r\n GlobalSettings.enableFallback = true;\r\n GlobalSettings.useWebkitLineClamp = true;\r\n GlobalSettings.allowMoreThanMaxActionsInOverflowMenu = false;\r\n GlobalSettings.removePaddingFromContainersWithBackgroundImage = false;\r\n GlobalSettings.resetInputsDirtyStateAfterActionExecution = true;\r\n GlobalSettings.applets = {\r\n logEnabled: true,\r\n logLevel: Enums.LogLevel.Error,\r\n maximumRetryAttempts: 3,\r\n defaultTimeBetweenRetryAttempts: 3000,\r\n authPromptWidth: 400,\r\n authPromptHeight: 600,\r\n refresh: {\r\n mode: Enums.RefreshMode.Manual,\r\n timeBetweenAutomaticRefreshes: 3000,\r\n maximumConsecutiveAutomaticRefreshes: 3,\r\n allowManualRefreshesAfterAutomaticRefreshes: true\r\n }\r\n };\r\n return GlobalSettings;\r\n}());\r\nexports.GlobalSettings = GlobalSettings;\r\nexports.ContentTypes = {\r\n applicationJson: \"application/json\",\r\n applicationXWwwFormUrlencoded: \"application/x-www-form-urlencoded\"\r\n};\r\nvar StringWithSubstitutions = /** @class */ (function () {\r\n function StringWithSubstitutions() {\r\n this._isProcessed = false;\r\n }\r\n StringWithSubstitutions.prototype.getReferencedInputs = function (inputs, referencedInputs) {\r\n if (!referencedInputs) {\r\n throw new Error(\"The referencedInputs parameter cannot be null.\");\r\n }\r\n if (this._original) {\r\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\r\n var input = inputs_1[_i];\r\n var matches = new RegExp(\"\\\\{{2}(\" + input.id + \").value\\\\}{2}\", \"gi\").exec(this._original);\r\n if (matches != null && input.id) {\r\n referencedInputs[input.id] = input;\r\n }\r\n }\r\n }\r\n };\r\n StringWithSubstitutions.prototype.substituteInputValues = function (inputs, contentType) {\r\n this._processed = this._original;\r\n if (this._original) {\r\n var regEx = /\\{{2}([a-z0-9_$@]+).value\\}{2}/gi;\r\n var matches = void 0;\r\n while ((matches = regEx.exec(this._original)) !== null && this._processed) {\r\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n if (key.toLowerCase() === matches[1].toLowerCase()) {\r\n var matchedInput = inputs[key];\r\n var valueForReplace = \"\";\r\n if (matchedInput.value) {\r\n valueForReplace = matchedInput.value;\r\n }\r\n if (contentType === exports.ContentTypes.applicationJson) {\r\n valueForReplace = JSON.stringify(valueForReplace);\r\n valueForReplace = valueForReplace.slice(1, -1);\r\n }\r\n else if (contentType === exports.ContentTypes.applicationXWwwFormUrlencoded) {\r\n valueForReplace = encodeURIComponent(valueForReplace);\r\n }\r\n this._processed = this._processed.replace(matches[0], valueForReplace);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n this._isProcessed = true;\r\n };\r\n StringWithSubstitutions.prototype.getOriginal = function () {\r\n return this._original;\r\n };\r\n StringWithSubstitutions.prototype.get = function () {\r\n if (!this._isProcessed) {\r\n return this._original;\r\n }\r\n else {\r\n return this._processed;\r\n }\r\n };\r\n StringWithSubstitutions.prototype.set = function (value) {\r\n this._original = value;\r\n this._isProcessed = false;\r\n };\r\n return StringWithSubstitutions;\r\n}());\r\nexports.StringWithSubstitutions = StringWithSubstitutions;\r\nvar SpacingDefinition = /** @class */ (function () {\r\n function SpacingDefinition(top, right, bottom, left) {\r\n if (top === void 0) { top = 0; }\r\n if (right === void 0) { right = 0; }\r\n if (bottom === void 0) { bottom = 0; }\r\n if (left === void 0) { left = 0; }\r\n this.left = 0;\r\n this.top = 0;\r\n this.right = 0;\r\n this.bottom = 0;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n return SpacingDefinition;\r\n}());\r\nexports.SpacingDefinition = SpacingDefinition;\r\nvar PaddingDefinition = /** @class */ (function () {\r\n function PaddingDefinition(top, right, bottom, left) {\r\n if (top === void 0) { top = Enums.Spacing.None; }\r\n if (right === void 0) { right = Enums.Spacing.None; }\r\n if (bottom === void 0) { bottom = Enums.Spacing.None; }\r\n if (left === void 0) { left = Enums.Spacing.None; }\r\n this.top = Enums.Spacing.None;\r\n this.right = Enums.Spacing.None;\r\n this.bottom = Enums.Spacing.None;\r\n this.left = Enums.Spacing.None;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n return PaddingDefinition;\r\n}());\r\nexports.PaddingDefinition = PaddingDefinition;\r\nvar SizeAndUnit = /** @class */ (function () {\r\n function SizeAndUnit(physicalSize, unit) {\r\n this.physicalSize = physicalSize;\r\n this.unit = unit;\r\n }\r\n SizeAndUnit.parse = function (input, requireUnitSpecifier) {\r\n if (requireUnitSpecifier === void 0) { requireUnitSpecifier = false; }\r\n var result = new SizeAndUnit(0, Enums.SizeUnit.Weight);\r\n if (typeof input === \"number\") {\r\n result.physicalSize = input;\r\n return result;\r\n }\r\n else if (typeof input === \"string\") {\r\n var regExp = /^([0-9]+)(px|\\*)?$/g;\r\n var matches = regExp.exec(input);\r\n var expectedMatchCount = requireUnitSpecifier ? 3 : 2;\r\n if (matches && matches.length >= expectedMatchCount) {\r\n result.physicalSize = parseInt(matches[1]);\r\n if (matches.length === 3) {\r\n if (matches[2] === \"px\") {\r\n result.unit = Enums.SizeUnit.Pixel;\r\n }\r\n }\r\n return result;\r\n }\r\n }\r\n throw new Error(\"Invalid size: \" + input);\r\n };\r\n return SizeAndUnit;\r\n}());\r\nexports.SizeAndUnit = SizeAndUnit;\r\n/**\r\n * Fast UUID generator, RFC4122 version 4 compliant.\r\n * @author Jeff Ward (jcward.com).\r\n * @license MIT license\r\n * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\r\n **/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\nvar UUID = /** @class */ (function () {\r\n function UUID() {\r\n }\r\n UUID.generate = function () {\r\n var d0 = (Math.random() * 0xffffffff) | 0;\r\n var d1 = (Math.random() * 0xffffffff) | 0;\r\n var d2 = (Math.random() * 0xffffffff) | 0;\r\n var d3 = (Math.random() * 0xffffffff) | 0;\r\n return (UUID.lut[d0 & 0xff] +\r\n UUID.lut[(d0 >> 8) & 0xff] +\r\n UUID.lut[(d0 >> 16) & 0xff] +\r\n UUID.lut[(d0 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[d1 & 0xff] +\r\n UUID.lut[(d1 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[((d1 >> 16) & 0x0f) | 0x40] +\r\n UUID.lut[(d1 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 & 0x3f) | 0x80] +\r\n UUID.lut[(d2 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 >> 16) & 0xff] +\r\n UUID.lut[(d2 >> 24) & 0xff] +\r\n UUID.lut[d3 & 0xff] +\r\n UUID.lut[(d3 >> 8) & 0xff] +\r\n UUID.lut[(d3 >> 16) & 0xff] +\r\n UUID.lut[(d3 >> 24) & 0xff]);\r\n };\r\n UUID.initialize = function () {\r\n for (var i = 0; i < 256; i++) {\r\n UUID.lut[i] = (i < 16 ? \"0\" : \"\") + i.toString(16);\r\n }\r\n };\r\n UUID.lut = [];\r\n return UUID;\r\n}());\r\nexports.UUID = UUID;\r\nUUID.initialize();\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\n//# sourceMappingURL=shared.js.map","\"use strict\";\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Strings = void 0;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar Strings = /** @class */ (function () {\r\n function Strings() {\r\n }\r\n Strings.errors = {\r\n unknownElementType: function (typeName) {\r\n return \"Unknown element type \\\"\".concat(typeName, \"\\\". Fallback will be used if present.\");\r\n },\r\n unknownActionType: function (typeName) {\r\n return \"Unknown action type \\\"\".concat(typeName, \"\\\". Fallback will be used if present.\");\r\n },\r\n elementTypeNotAllowed: function (typeName) {\r\n return \"Element type \\\"\".concat(typeName, \"\\\" is not allowed in this context.\");\r\n },\r\n actionTypeNotAllowed: function (typeName) {\r\n return \"Action type \\\"\".concat(typeName, \"\\\" is not allowed in this context.\");\r\n },\r\n invalidPropertyValue: function (value, propertyName) {\r\n return \"Invalid value \\\"\".concat(value, \"\\\" for property \\\"\").concat(propertyName, \"\\\".\");\r\n },\r\n showCardMustHaveCard: function () {\r\n return \"\\\"An Action.ShowCard must have its \\\"card\\\" property set to a valid AdaptiveCard object.\";\r\n },\r\n invalidColumnWidth: function (invalidWidth) {\r\n return \"Invalid column width \\\"\".concat(invalidWidth, \"\\\" - defaulting to \\\"auto\\\".\");\r\n },\r\n invalidCardVersion: function (defaultingToVersion) {\r\n return \"Invalid card version. Defaulting to \\\"\".concat(defaultingToVersion, \"\\\".\");\r\n },\r\n invalidVersionString: function (versionString) {\r\n return \"Invalid version string \\\"\".concat(versionString, \"\\\".\");\r\n },\r\n propertyValueNotSupported: function (value, propertyName, supportedInVersion, versionUsed) {\r\n return \"Value \\\"\".concat(value, \"\\\" for property \\\"\").concat(propertyName, \"\\\" is supported in version \").concat(supportedInVersion, \", but you are using version \").concat(versionUsed, \".\");\r\n },\r\n propertyNotSupported: function (propertyName, supportedInVersion, versionUsed) {\r\n return \"Property \\\"\".concat(propertyName, \"\\\" is supported in version \").concat(supportedInVersion, \", but you are using version \").concat(versionUsed, \".\");\r\n },\r\n indexOutOfRange: function (index) { return \"Index out of range (\".concat(index, \").\"); },\r\n elementCannotBeUsedAsInline: function () {\r\n return \"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.\";\r\n },\r\n inlineAlreadyParented: function () {\r\n return \"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.\";\r\n },\r\n interactivityNotAllowed: function () { return \"Interactivity is not allowed.\"; },\r\n inputsMustHaveUniqueId: function () { return \"All inputs must have a unique Id.\"; },\r\n choiceSetMustHaveAtLeastOneChoice: function () {\r\n return \"An Input.ChoiceSet must have at least one choice defined.\";\r\n },\r\n choiceSetChoicesMustHaveTitleAndValue: function () {\r\n return \"All choices in an Input.ChoiceSet must have their title and value properties set.\";\r\n },\r\n propertyMustBeSet: function (propertyName) { return \"Property \\\"\".concat(propertyName, \"\\\" must be set.\"); },\r\n actionHttpHeadersMustHaveNameAndValue: function () {\r\n return \"All headers of an Action.Http must have their name and value properties set.\";\r\n },\r\n tooManyActions: function (maximumActions) {\r\n return \"Maximum number of actions exceeded (\".concat(maximumActions, \").\");\r\n },\r\n tooLittleTimeDelay: function (minAutoplayDelay) {\r\n return \"Autoplay Delay is too short (\".concat(minAutoplayDelay, \").\");\r\n },\r\n tooManyCarouselPages: function (maxCarouselPages) {\r\n return \"Maximum number of Carousel pages exceeded (\".concat(maxCarouselPages, \").\");\r\n },\r\n invalidInitialPageIndex: function (initialPageIndex) {\r\n return \"InitialPage for carousel is invalid (\".concat(initialPageIndex, \").\");\r\n },\r\n columnAlreadyBelongsToAnotherSet: function () { return \"This column already belongs to another ColumnSet.\"; },\r\n invalidCardType: function () {\r\n return \"Invalid or missing card type. Make sure the card's type property is set to \\\"AdaptiveCard\\\".\";\r\n },\r\n unsupportedCardVersion: function (version, maxSupportedVersion) {\r\n return \"The specified card version (\".concat(version, \") is not supported or still in preview. The latest released card version is \").concat(maxSupportedVersion, \".\");\r\n },\r\n duplicateId: function (id) { return \"Duplicate Id \\\"\".concat(id, \"\\\".\"); },\r\n markdownProcessingNotEnabled: function () {\r\n return \"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown\";\r\n },\r\n processMarkdownEventRemoved: function () {\r\n return \"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.\";\r\n },\r\n elementAlreadyParented: function () { return \"The element already belongs to another container.\"; },\r\n actionAlreadyParented: function () { return \"The action already belongs to another element.\"; },\r\n elementTypeNotStandalone: function (typeName) {\r\n return \"Elements of type \".concat(typeName, \" cannot be used as standalone elements.\");\r\n },\r\n invalidInputLabelWidth: function () {\r\n return \"Invalid input label width. Defaulting to label width from host config.\";\r\n },\r\n };\r\n Strings.magicCodeInputCard = {\r\n tryAgain: function () { return \"That didn't work... let's try again.\"; },\r\n pleaseLogin: function () {\r\n return 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"';\r\n },\r\n enterMagicCode: function () { return \"Enter magic code\"; },\r\n pleaseEnterMagicCodeYouReceived: function () { return \"Please enter the magic code you received.\"; },\r\n submit: function () { return \"Submit\"; },\r\n cancel: function () { return \"Cancel\"; },\r\n somethingWentWrong: function () { return \"Something went wrong. This action can't be handled.\"; },\r\n authenticationFailed: function () { return \"Authentication failed.\"; }\r\n };\r\n Strings.runtime = {\r\n automaticRefreshPaused: function () { return \"Automatic refresh paused.\"; },\r\n clckToRestartAutomaticRefresh: function () { return \"Click to restart.\"; },\r\n refreshThisCard: function () { return \"Refresh this card\"; }\r\n };\r\n Strings.hints = {\r\n dontUseWeightedAndStrecthedColumnsInSameSet: function () {\r\n return \"It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space.\";\r\n }\r\n };\r\n Strings.defaults = {\r\n inlineActionTitle: function () { return \"Inline Action\"; },\r\n overflowButtonText: function () { return \"...\"; },\r\n overflowButtonTooltip: function () { return \"More options\"; },\r\n emptyElementText: function (elementType) { return \"Empty \".concat(elementType); },\r\n mediaPlayerAriaLabel: function () { return \"Media content\"; },\r\n mediaPlayerPlayMedia: function () { return \"Play media\"; },\r\n youTubeVideoPlayer: function () { return \"YouTube video player\"; },\r\n vimeoVideoPlayer: function () { return \"Vimeo video player\"; },\r\n dailymotionVideoPlayer: function () { return \"Dailymotion video player\"; },\r\n carouselNavigationPreviousTooltip: function () { return \"Previous carousel page\"; },\r\n carouselNavigationNextTooltip: function () { return \"Next carousel page\"; }\r\n };\r\n return Strings;\r\n}());\r\nexports.Strings = Strings;\r\n//# sourceMappingURL=strings.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Table = exports.TableRow = exports.TableCell = exports.StylableContainer = exports.TableColumnDefinition = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar card_elements_1 = require(\"./card-elements\");\r\nvar enums_1 = require(\"./enums\");\r\nvar registry_1 = require(\"./registry\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar shared_1 = require(\"./shared\");\r\nvar strings_1 = require(\"./strings\");\r\nvar utils_1 = require(\"./utils\");\r\nvar TableColumnDefinition = /** @class */ (function (_super) {\r\n __extends(TableColumnDefinition, _super);\r\n function TableColumnDefinition() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.width = new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight);\r\n return _this;\r\n }\r\n TableColumnDefinition.prototype.getSchemaKey = function () {\r\n return \"ColumnDefinition\";\r\n };\r\n TableColumnDefinition.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\r\n TableColumnDefinition.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\r\n TableColumnDefinition.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_5, \"width\", function (sender, prop, source, context) {\r\n var result = prop.defaultValue;\r\n var value = source[prop.name];\r\n var invalidWidth = false;\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new shared_1.SizeAndUnit(value, enums_1.SizeUnit.Weight);\r\n }\r\n else if (typeof value === \"string\") {\r\n try {\r\n result = shared_1.SizeAndUnit.parse(value);\r\n }\r\n catch (e) {\r\n invalidWidth = true;\r\n }\r\n }\r\n else {\r\n invalidWidth = true;\r\n }\r\n if (invalidWidth) {\r\n context.logParseEvent(sender, enums_1.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\r\n }\r\n return result;\r\n }, function (sender, property, target, value, context) {\r\n if (value.unit === enums_1.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n }\r\n else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n }, new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight));\r\n __decorate([\r\n (0, serialization_1.property)(TableColumnDefinition.horizontalCellContentAlignmentProperty)\r\n ], TableColumnDefinition.prototype, \"horizontalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TableColumnDefinition.verticalCellContentAlignmentProperty)\r\n ], TableColumnDefinition.prototype, \"verticalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TableColumnDefinition.widthProperty)\r\n ], TableColumnDefinition.prototype, \"width\", void 0);\r\n return TableColumnDefinition;\r\n}(serialization_1.SerializableObject));\r\nexports.TableColumnDefinition = TableColumnDefinition;\r\nvar StylableContainer = /** @class */ (function (_super) {\r\n __extends(StylableContainer, _super);\r\n function StylableContainer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._items = [];\r\n return _this;\r\n }\r\n StylableContainer.prototype.parseItem = function (source, context) {\r\n var _this = this;\r\n return context.parseCardObject(this, source, [], // Forbidden types not supported for elements for now\r\n !this.isDesignMode(), function (typeName) {\r\n return _this.createItemInstance(typeName);\r\n }, function (typeName, _errorType) {\r\n context.logParseEvent(undefined, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n });\r\n };\r\n StylableContainer.prototype.internalAddItem = function (item) {\r\n if (!item.parent) {\r\n this._items.push(item);\r\n item.setParent(this);\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\r\n }\r\n };\r\n StylableContainer.prototype.internalRemoveItem = function (item) {\r\n var itemIndex = this._items.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n return false;\r\n };\r\n StylableContainer.prototype.internalIndexOf = function (item) {\r\n return this._items.indexOf(item);\r\n };\r\n StylableContainer.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._items = [];\r\n var items = source[this.getCollectionPropertyName()];\r\n if (Array.isArray(items)) {\r\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\r\n var item = items_1[_i];\r\n var instance = this.parseItem(item, context);\r\n if (instance) {\r\n this._items.push(instance);\r\n }\r\n }\r\n }\r\n };\r\n StylableContainer.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n context.serializeArray(target, this.getCollectionPropertyName(), this._items);\r\n };\r\n StylableContainer.prototype.removeItem = function (item) {\r\n return this.internalRemoveItem(item);\r\n };\r\n StylableContainer.prototype.getItemCount = function () {\r\n return this._items.length;\r\n };\r\n StylableContainer.prototype.getItemAt = function (index) {\r\n return this._items[index];\r\n };\r\n StylableContainer.prototype.getFirstVisibleRenderedItem = function () {\r\n return this.getItemCount() > 0 ? this.getItemAt(0) : undefined;\r\n };\r\n StylableContainer.prototype.getLastVisibleRenderedItem = function () {\r\n return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : undefined;\r\n };\r\n return StylableContainer;\r\n}(card_elements_1.StylableCardElementContainer));\r\nexports.StylableContainer = StylableContainer;\r\nvar TableCell = /** @class */ (function (_super) {\r\n __extends(TableCell, _super);\r\n function TableCell() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._columnIndex = -1;\r\n _this._cellType = \"data\";\r\n return _this;\r\n }\r\n TableCell.prototype.getHasBorder = function () {\r\n return this.parentRow.parentTable.showGridLines;\r\n };\r\n TableCell.prototype.applyBorder = function () {\r\n if (this.renderedElement && this.getHasBorder()) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.parentRow.parentTable.gridStyle);\r\n if (styleDefinition.borderColor) {\r\n var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor);\r\n if (borderColor) {\r\n this.renderedElement.style.borderRight = \"1px solid \" + borderColor;\r\n this.renderedElement.style.borderBottom = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n };\r\n TableCell.prototype.getDefaultPadding = function () {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new shared_1.PaddingDefinition(enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small)\r\n : _super.prototype.getDefaultPadding.call(this);\r\n };\r\n TableCell.prototype.internalRender = function () {\r\n var cellElement = _super.prototype.internalRender.call(this);\r\n if (cellElement) {\r\n cellElement.setAttribute(\"role\", this.cellType === \"data\" ? \"cell\" : \"columnheader\");\r\n cellElement.style.minWidth = \"0\";\r\n if (this.cellType === \"header\") {\r\n cellElement.setAttribute(\"scope\", \"col\");\r\n }\r\n }\r\n return cellElement;\r\n };\r\n TableCell.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n TableCell.prototype.getJsonTypeName = function () {\r\n return \"TableCell\";\r\n };\r\n TableCell.prototype.getEffectiveTextStyleDefinition = function () {\r\n if (this.cellType === \"header\") {\r\n return this.hostConfig.textStyles.columnHeader;\r\n }\r\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\r\n };\r\n TableCell.prototype.getEffectiveHorizontalAlignment = function () {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n if (this.parentRow.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.horizontalCellContentAlignment;\r\n }\r\n if (this.columnIndex >= 0) {\r\n var horizontalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).horizontalCellContentAlignment;\r\n if (horizontalAlignment !== undefined) {\r\n return horizontalAlignment;\r\n }\r\n }\r\n if (this.parentRow.parentTable.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.horizontalCellContentAlignment;\r\n }\r\n return _super.prototype.getEffectiveHorizontalAlignment.call(this);\r\n };\r\n TableCell.prototype.getEffectiveVerticalContentAlignment = function () {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n if (this.parentRow.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.verticalCellContentAlignment;\r\n }\r\n if (this.columnIndex >= 0) {\r\n var verticalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).verticalCellContentAlignment;\r\n if (verticalAlignment !== undefined) {\r\n return verticalAlignment;\r\n }\r\n }\r\n if (this.parentRow.parentTable.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.verticalCellContentAlignment;\r\n }\r\n return _super.prototype.getEffectiveVerticalContentAlignment.call(this);\r\n };\r\n Object.defineProperty(TableCell.prototype, \"columnIndex\", {\r\n get: function () {\r\n return this._columnIndex;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableCell.prototype, \"cellType\", {\r\n get: function () {\r\n return this._cellType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableCell.prototype, \"parentRow\", {\r\n get: function () {\r\n return this.parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableCell.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return TableCell;\r\n}(card_elements_1.Container));\r\nexports.TableCell = TableCell;\r\nvar TableRow = /** @class */ (function (_super) {\r\n __extends(TableRow, _super);\r\n function TableRow() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n TableRow.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition(enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None);\r\n };\r\n TableRow.prototype.applyBackground = function () {\r\n if (this.renderedElement) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\r\n if (styleDefinition.backgroundColor) {\r\n var bgColor = (0, utils_1.stringToCssColor)(styleDefinition.backgroundColor);\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n };\r\n TableRow.prototype.getCollectionPropertyName = function () {\r\n return \"cells\";\r\n };\r\n TableRow.prototype.createItemInstance = function (typeName) {\r\n return !typeName || typeName === \"TableCell\" ? new TableCell() : undefined;\r\n };\r\n TableRow.prototype.internalRender = function () {\r\n var isFirstRow = this.getIsFirstRow();\r\n var cellSpacing = this.hostConfig.table.cellSpacing;\r\n var rowElement = document.createElement(\"div\");\r\n rowElement.setAttribute(\"role\", \"row\");\r\n rowElement.style.display = \"flex\";\r\n rowElement.style.flexDirection = \"row\";\r\n for (var i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) {\r\n var cell = this.getItemAt(i);\r\n // Cheating a bit in order to keep cellType read-only\r\n cell[\"_columnIndex\"] = i;\r\n cell[\"_cellType\"] =\r\n this.parentTable.firstRowAsHeaders && isFirstRow ? \"header\" : \"data\";\r\n var renderedCell = cell.render();\r\n if (renderedCell) {\r\n var column = this.parentTable.getColumnAt(i);\r\n if (column.computedWidth.unit === enums_1.SizeUnit.Pixel) {\r\n renderedCell.style.flex = \"0 0 \" + column.computedWidth.physicalSize + \"px\";\r\n }\r\n else {\r\n renderedCell.style.flex = \"1 1 \" + column.computedWidth.physicalSize + \"%\";\r\n }\r\n if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) {\r\n renderedCell.style.marginLeft = cellSpacing + \"px\";\r\n }\r\n rowElement.appendChild(renderedCell);\r\n }\r\n }\r\n return rowElement.children.length > 0 ? rowElement : undefined;\r\n };\r\n TableRow.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n TableRow.prototype.addCell = function (cell) {\r\n this.internalAddItem(cell);\r\n };\r\n TableRow.prototype.removeCellAt = function (columnIndex) {\r\n if (columnIndex >= 0 && columnIndex < this.getItemCount()) {\r\n return this.removeItem(this.getItemAt(columnIndex));\r\n }\r\n return false;\r\n };\r\n TableRow.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof TableCell ? this.internalIndexOf(cardElement) : -1;\r\n };\r\n TableRow.prototype.ensureHasEnoughCells = function (cellCount) {\r\n while (this.getItemCount() < cellCount) {\r\n this.addCell(new TableCell());\r\n }\r\n };\r\n TableRow.prototype.getJsonTypeName = function () {\r\n return \"TableRow\";\r\n };\r\n TableRow.prototype.getIsFirstRow = function () {\r\n return this.parentTable.getItemAt(0) === this;\r\n };\r\n Object.defineProperty(TableRow.prototype, \"parentTable\", {\r\n get: function () {\r\n return this.parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableRow.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n TableRow.styleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"style\");\r\n TableRow.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\r\n TableRow.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\r\n __decorate([\r\n (0, serialization_1.property)(TableRow.horizontalCellContentAlignmentProperty)\r\n ], TableRow.prototype, \"horizontalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TableRow.verticalCellContentAlignmentProperty)\r\n ], TableRow.prototype, \"verticalCellContentAlignment\", void 0);\r\n return TableRow;\r\n}(StylableContainer));\r\nexports.TableRow = TableRow;\r\nvar Table = /** @class */ (function (_super) {\r\n __extends(Table, _super);\r\n function Table() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._columns = [];\r\n _this.firstRowAsHeaders = true;\r\n _this.showGridLines = true;\r\n return _this;\r\n }\r\n Object.defineProperty(Table.prototype, \"gridStyle\", {\r\n get: function () {\r\n var style = this.getValue(Table.gridStyleProperty);\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n return undefined;\r\n },\r\n set: function (value) {\r\n this.setValue(Table.gridStyleProperty, value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#endregion\r\n Table.prototype.ensureRowsHaveEnoughCells = function () {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount());\r\n }\r\n };\r\n Table.prototype.removeCellsFromColumn = function (columnIndex) {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).removeCellAt(columnIndex);\r\n }\r\n };\r\n Table.prototype.getCollectionPropertyName = function () {\r\n return \"rows\";\r\n };\r\n Table.prototype.createItemInstance = function (typeName) {\r\n return !typeName || typeName === \"TableRow\" ? new TableRow() : undefined;\r\n };\r\n Table.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.ensureRowsHaveEnoughCells();\r\n };\r\n Table.prototype.internalRender = function () {\r\n if (this.getItemCount() > 0) {\r\n var totalWeights = 0;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.width.unit === enums_1.SizeUnit.Weight) {\r\n totalWeights += column.width.physicalSize;\r\n }\r\n }\r\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\r\n var column = _c[_b];\r\n if (column.width.unit === enums_1.SizeUnit.Pixel) {\r\n column.computedWidth = new shared_1.SizeAndUnit(column.width.physicalSize, enums_1.SizeUnit.Pixel);\r\n }\r\n else {\r\n column.computedWidth = new shared_1.SizeAndUnit((100 / totalWeights) * column.width.physicalSize, enums_1.SizeUnit.Weight);\r\n }\r\n }\r\n var tableElement = document.createElement(\"div\");\r\n tableElement.setAttribute(\"role\", \"table\");\r\n tableElement.style.display = \"flex\";\r\n tableElement.style.flexDirection = \"column\";\r\n if (this.showGridLines) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.gridStyle);\r\n if (styleDefinition.borderColor) {\r\n var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor);\r\n if (borderColor) {\r\n tableElement.style.borderTop = \"1px solid \" + borderColor;\r\n tableElement.style.borderLeft = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n var cellSpacing = this.hostConfig.table.cellSpacing;\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n var renderedRow = this.getItemAt(i).render();\r\n if (renderedRow) {\r\n if (i > 0 && !this.showGridLines && cellSpacing > 0) {\r\n var separatorRow = document.createElement(\"div\");\r\n separatorRow.setAttribute(\"aria-hidden\", \"true\");\r\n separatorRow.style.height = cellSpacing + \"px\";\r\n tableElement.appendChild(separatorRow);\r\n }\r\n tableElement.appendChild(renderedRow);\r\n }\r\n }\r\n return tableElement;\r\n }\r\n return undefined;\r\n };\r\n Table.prototype.addColumn = function (column) {\r\n this._columns.push(column);\r\n this.ensureRowsHaveEnoughCells();\r\n };\r\n Table.prototype.removeColumn = function (column) {\r\n var index = this._columns.indexOf(column);\r\n if (index >= 0) {\r\n this.removeCellsFromColumn(index);\r\n this._columns.splice(index, 1);\r\n }\r\n };\r\n Table.prototype.getColumnCount = function () {\r\n return this._columns.length;\r\n };\r\n Table.prototype.getColumnAt = function (index) {\r\n return this._columns[index];\r\n };\r\n Table.prototype.addRow = function (row) {\r\n this.internalAddItem(row);\r\n row.ensureHasEnoughCells(this.getColumnCount());\r\n };\r\n Table.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof TableRow ? this.internalIndexOf(cardElement) : -1;\r\n };\r\n Table.prototype.getJsonTypeName = function () {\r\n return \"Table\";\r\n };\r\n Table._columnsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_5, \"columns\", TableColumnDefinition);\r\n Table.firstRowAsHeadersProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"firstRowAsHeaders\", true);\r\n Table.showGridLinesProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"showGridLines\", true);\r\n Table.gridStyleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"gridStyle\");\r\n Table.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\r\n Table.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\r\n __decorate([\r\n (0, serialization_1.property)(Table._columnsProperty)\r\n ], Table.prototype, \"_columns\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.firstRowAsHeadersProperty)\r\n ], Table.prototype, \"firstRowAsHeaders\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.showGridLinesProperty)\r\n ], Table.prototype, \"showGridLines\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.gridStyleProperty)\r\n ], Table.prototype, \"gridStyle\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Table.horizontalCellContentAlignmentProperty)\r\n ], Table.prototype, \"horizontalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.verticalCellContentAlignmentProperty)\r\n ], Table.prototype, \"verticalCellContentAlignment\", void 0);\r\n return Table;\r\n}(StylableContainer));\r\nexports.Table = Table;\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Table\", Table, serialization_1.Versions.v1_5);\r\n//# sourceMappingURL=table.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.formatText = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar AbstractTextFormatter = /** @class */ (function () {\r\n function AbstractTextFormatter(regularExpression) {\r\n this._regularExpression = regularExpression;\r\n }\r\n AbstractTextFormatter.prototype.format = function (lang, input) {\r\n var matches;\r\n if (input) {\r\n var result = input;\r\n while ((matches = this._regularExpression.exec(input)) != null) {\r\n result = result.replace(matches[0], this.internalFormat(lang, matches));\r\n }\r\n return result;\r\n }\r\n else {\r\n return input;\r\n }\r\n };\r\n return AbstractTextFormatter;\r\n}());\r\nvar DateFormatter = /** @class */ (function (_super) {\r\n __extends(DateFormatter, _super);\r\n function DateFormatter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DateFormatter.prototype.internalFormat = function (lang, matches) {\r\n var date = new Date(Date.parse(matches[1]));\r\n var format = matches[2] !== undefined ? matches[2].toLowerCase() : \"compact\";\r\n if (format !== \"compact\") {\r\n return date.toLocaleDateString(lang, {\r\n day: \"numeric\",\r\n weekday: format,\r\n month: format,\r\n year: \"numeric\"\r\n });\r\n }\r\n else {\r\n return date.toLocaleDateString();\r\n }\r\n };\r\n return DateFormatter;\r\n}(AbstractTextFormatter));\r\nvar TimeFormatter = /** @class */ (function (_super) {\r\n __extends(TimeFormatter, _super);\r\n function TimeFormatter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeFormatter.prototype.internalFormat = function (lang, matches) {\r\n var date = new Date(Date.parse(matches[1]));\r\n return date.toLocaleTimeString(lang, { hour: \"numeric\", minute: \"2-digit\" });\r\n };\r\n return TimeFormatter;\r\n}(AbstractTextFormatter));\r\nfunction formatText(lang, text) {\r\n var formatters = [\r\n new DateFormatter(/\\{{2}DATE\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\\)\\}{2}/g),\r\n new TimeFormatter(/\\{{2}TIME\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))\\)\\}{2}/g)\r\n ];\r\n var result = text;\r\n for (var _i = 0, formatters_1 = formatters; _i < formatters_1.length; _i++) {\r\n var formatter = formatters_1[_i];\r\n result = formatter.format(lang, result);\r\n }\r\n return result;\r\n}\r\nexports.formatText = formatText;\r\n//# sourceMappingURL=text-formatters.js.map","\"use strict\";\r\nvar _a;\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.debounce = exports.addCancelSelectActionEventHandler = exports.clearElementChildren = exports.getScrollY = exports.getScrollX = exports.getFitStatus = exports.truncate = exports.truncateText = exports.stringToCssColor = exports.parseEnum = exports.getEnumValueByName = exports.parseBool = exports.parseNumber = exports.parseString = exports.appendChild = exports.generateUniqueId = exports.isMobileOS = exports.isInternetExplorer = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar Shared = require(\"./shared\");\r\nfunction isInternetExplorer() {\r\n // The documentMode property only exists in IE\r\n return window.document.documentMode !== undefined;\r\n}\r\nexports.isInternetExplorer = isInternetExplorer;\r\nfunction isMobileOS() {\r\n var userAgent = window.navigator.userAgent;\r\n return (!!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i));\r\n}\r\nexports.isMobileOS = isMobileOS;\r\n/**\r\n * Generate a UUID prepended with \"__ac-\"\r\n */\r\nfunction generateUniqueId() {\r\n return \"__ac-\" + Shared.UUID.generate();\r\n}\r\nexports.generateUniqueId = generateUniqueId;\r\nfunction appendChild(node, child) {\r\n if (child) {\r\n node.appendChild(child);\r\n }\r\n}\r\nexports.appendChild = appendChild;\r\nfunction parseString(obj, defaultValue) {\r\n return typeof obj === \"string\" ? obj : defaultValue;\r\n}\r\nexports.parseString = parseString;\r\nfunction parseNumber(obj, defaultValue) {\r\n return typeof obj === \"number\" ? obj : defaultValue;\r\n}\r\nexports.parseNumber = parseNumber;\r\nfunction parseBool(value, defaultValue) {\r\n if (typeof value === \"boolean\") {\r\n return value;\r\n }\r\n else if (typeof value === \"string\") {\r\n switch (value.toLowerCase()) {\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n default:\r\n return defaultValue;\r\n }\r\n }\r\n return defaultValue;\r\n}\r\nexports.parseBool = parseBool;\r\nfunction getEnumValueByName(enumType, name) {\r\n // eslint-disable-next-line guard-for-in\r\n for (var key in enumType) {\r\n var keyAsNumber = parseInt(key, 10);\r\n if (keyAsNumber >= 0) {\r\n var value = enumType[key];\r\n if (value && typeof value === \"string\" && value.toLowerCase() === name.toLowerCase()) {\r\n return keyAsNumber;\r\n }\r\n }\r\n }\r\n return undefined;\r\n}\r\nexports.getEnumValueByName = getEnumValueByName;\r\nfunction parseEnum(enumType, name, defaultValue) {\r\n if (!name) {\r\n return defaultValue;\r\n }\r\n var enumValue = getEnumValueByName(enumType, name);\r\n return enumValue !== undefined ? enumValue : defaultValue;\r\n}\r\nexports.parseEnum = parseEnum;\r\nfunction stringToCssColor(color) {\r\n if (color) {\r\n var regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi;\r\n var matches = regEx.exec(color);\r\n if (matches && matches[4]) {\r\n var a = parseInt(matches[1], 16) / 255;\r\n var r = parseInt(matches[2], 16);\r\n var g = parseInt(matches[3], 16);\r\n var b = parseInt(matches[4], 16);\r\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + a + \")\";\r\n }\r\n }\r\n return color;\r\n}\r\nexports.stringToCssColor = stringToCssColor;\r\nfunction truncateWorker(element, maxHeight, fullText, truncateAt, lineHeight) {\r\n var fits = function () {\r\n // Allow a one pixel overflow to account for rounding differences\r\n // between browsers\r\n return maxHeight - element.scrollHeight >= -1.0;\r\n };\r\n if (fits()) {\r\n return;\r\n }\r\n var breakableIndices = findBreakableIndices(fullText);\r\n var lo = 0;\r\n var hi = breakableIndices.length;\r\n var bestBreakIdx = 0;\r\n // Do a binary search for the longest string that fits\r\n while (lo < hi) {\r\n var mid = Math.floor((lo + hi) / 2);\r\n truncateAt(fullText, breakableIndices[mid]);\r\n if (fits()) {\r\n bestBreakIdx = breakableIndices[mid];\r\n lo = mid + 1;\r\n }\r\n else {\r\n hi = mid;\r\n }\r\n }\r\n truncateAt(fullText, bestBreakIdx);\r\n // If we have extra room, try to expand the string letter by letter\r\n // (covers the case where we have to break in the middle of a long word)\r\n if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1.0) {\r\n var idx = findNextCharacter(fullText, bestBreakIdx);\r\n while (idx < fullText.length) {\r\n truncateAt(fullText, idx);\r\n if (fits()) {\r\n bestBreakIdx = idx;\r\n idx = findNextCharacter(fullText, idx);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n truncateAt(fullText, bestBreakIdx);\r\n }\r\n}\r\nfunction truncateText(element, maxHeight, lineHeight) {\r\n truncateWorker(element, maxHeight, element.innerText, function (text, idx) {\r\n element.innerText = text.substring(0, idx) + \"...\";\r\n }, lineHeight);\r\n}\r\nexports.truncateText = truncateText;\r\n/**\r\n * {@link truncate} has been deprecated and is no longer in use internally. This policy passes\r\n * content through as it always has, which is _supposed_ to be dealing with text only (see {@link\r\n * TextBlock.truncateIfSupported}), but had a bug where it might actually pass through an element\r\n * for which innerHTML yielded actual HTML (since fixed).\r\n */\r\nvar ttDeprecatedPolicy = (typeof window === 'undefined') ? undefined : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy(\"adaptivecards#deprecatedExportedFunctionPolicy\", {\r\n createHTML: function (value) { return value; }\r\n});\r\n/** @deprecated Use {@link truncateText} instead. */\r\nfunction truncate(element, maxHeight, lineHeight) {\r\n truncateWorker(element, maxHeight, element.innerHTML, function (text, idx) {\r\n var _a;\r\n var truncatedString = text.substring(0, idx) + \"...\";\r\n var truncatedHTML = (_a = ttDeprecatedPolicy === null || ttDeprecatedPolicy === void 0 ? void 0 : ttDeprecatedPolicy.createHTML(truncatedString)) !== null && _a !== void 0 ? _a : truncatedString;\r\n element.innerHTML = truncatedHTML;\r\n }, lineHeight);\r\n}\r\nexports.truncate = truncate;\r\nfunction findBreakableIndices(html) {\r\n var results = [];\r\n var idx = findNextCharacter(html, -1);\r\n while (idx < html.length) {\r\n if (html[idx] === \" \") {\r\n results.push(idx);\r\n }\r\n idx = findNextCharacter(html, idx);\r\n }\r\n return results;\r\n}\r\nfunction findNextCharacter(html, currIdx) {\r\n currIdx += 1;\r\n // If we found the start of an HTML tag, keep advancing until we get\r\n // past it, so we don't end up truncating in the middle of the tag\r\n while (currIdx < html.length && html[currIdx] === \"<\") {\r\n while (currIdx < html.length && html[currIdx++] !== \">\") {\r\n continue;\r\n }\r\n }\r\n return currIdx;\r\n}\r\nfunction getFitStatus(element, containerEnd) {\r\n var start = element.offsetTop;\r\n var end = start + element.clientHeight;\r\n if (end <= containerEnd) {\r\n return Enums.ContainerFitStatus.FullyInContainer;\r\n }\r\n else if (start < containerEnd) {\r\n return Enums.ContainerFitStatus.Overflowing;\r\n }\r\n else {\r\n return Enums.ContainerFitStatus.FullyOutOfContainer;\r\n }\r\n}\r\nexports.getFitStatus = getFitStatus;\r\nfunction getScrollX() {\r\n return window.pageXOffset;\r\n}\r\nexports.getScrollX = getScrollX;\r\nfunction getScrollY() {\r\n return window.pageYOffset;\r\n}\r\nexports.getScrollY = getScrollY;\r\nfunction clearElementChildren(element) {\r\n while (element.firstChild) {\r\n element.removeChild(element.firstChild);\r\n }\r\n}\r\nexports.clearElementChildren = clearElementChildren;\r\nfunction addCancelSelectActionEventHandler(element) {\r\n element.onclick = function (e) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n };\r\n}\r\nexports.addCancelSelectActionEventHandler = addCancelSelectActionEventHandler;\r\nfunction debounce(fn, delay) {\r\n var timer;\r\n function debouncedFn() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n timer = setTimeout(function () {\r\n fn.apply(void 0, args);\r\n }, delay);\r\n }\r\n return debouncedFn;\r\n}\r\nexports.debounce = debounce;\r\n//# sourceMappingURL=utils.js.map","module.exports =\n{\n parallel : require('./parallel.js'),\n serial : require('./serial.js'),\n serialOrdered : require('./serialOrdered.js')\n};\n","// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n Object.keys(state.jobs).forEach(clean.bind(state));\n\n // reset leftover jobs\n state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n if (typeof this.jobs[key] == 'function')\n {\n this.jobs[key]();\n }\n}\n","var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n var isAsync = false;\n\n // check if async happened\n defer(function() { isAsync = true; });\n\n return function async_callback(err, result)\n {\n if (isAsync)\n {\n callback(err, result);\n }\n else\n {\n defer(function nextTick_callback()\n {\n callback(err, result);\n });\n }\n };\n}\n","module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n var nextTick = typeof setImmediate == 'function'\n ? setImmediate\n : (\n typeof process == 'object' && typeof process.nextTick == 'function'\n ? process.nextTick\n : null\n );\n\n if (nextTick)\n {\n nextTick(fn);\n }\n else\n {\n setTimeout(fn, 0);\n }\n}\n","var async = require('./async.js')\n , abort = require('./abort.js')\n ;\n\n// API\nmodule.exports = iterate;\n\n/**\n * Iterates over each job object\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {object} state - current job status\n * @param {function} callback - invoked when all elements processed\n */\nfunction iterate(list, iterator, state, callback)\n{\n // store current index\n var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;\n\n state.jobs[key] = runJob(iterator, key, list[key], function(error, output)\n {\n // don't repeat yourself\n // skip secondary callbacks\n if (!(key in state.jobs))\n {\n return;\n }\n\n // clean up jobs\n delete state.jobs[key];\n\n if (error)\n {\n // don't process rest of the results\n // stop still active jobs\n // and reset the list\n abort(state);\n }\n else\n {\n state.results[key] = output;\n }\n\n // return salvaged results\n callback(error, state.results);\n });\n}\n\n/**\n * Runs iterator over provided job element\n *\n * @param {function} iterator - iterator to invoke\n * @param {string|number} key - key/index of the element in the list of jobs\n * @param {mixed} item - job description\n * @param {function} callback - invoked after iterator is done with the job\n * @returns {function|mixed} - job abort function or something else\n */\nfunction runJob(iterator, key, item, callback)\n{\n var aborter;\n\n // allow shortcut if iterator expects only two arguments\n if (iterator.length == 2)\n {\n aborter = iterator(item, async(callback));\n }\n // otherwise go with full three arguments\n else\n {\n aborter = iterator(item, key, async(callback));\n }\n\n return aborter;\n}\n","// API\nmodule.exports = state;\n\n/**\n * Creates initial state object\n * for iteration over list\n *\n * @param {array|object} list - list to iterate over\n * @param {function|null} sortMethod - function to use for keys sort,\n * or `null` to keep them as is\n * @returns {object} - initial state object\n */\nfunction state(list, sortMethod)\n{\n var isNamedList = !Array.isArray(list)\n , initState =\n {\n index : 0,\n keyedList: isNamedList || sortMethod ? Object.keys(list) : null,\n jobs : {},\n results : isNamedList ? {} : [],\n size : isNamedList ? Object.keys(list).length : list.length\n }\n ;\n\n if (sortMethod)\n {\n // sort array keys based on it's values\n // sort object's keys just on own merit\n initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)\n {\n return sortMethod(list[a], list[b]);\n });\n }\n\n return initState;\n}\n","var abort = require('./abort.js')\n , async = require('./async.js')\n ;\n\n// API\nmodule.exports = terminator;\n\n/**\n * Terminates jobs in the attached state context\n *\n * @this AsyncKitState#\n * @param {function} callback - final callback to invoke after termination\n */\nfunction terminator(callback)\n{\n if (!Object.keys(this.jobs).length)\n {\n return;\n }\n\n // fast forward iteration index\n this.index = this.size;\n\n // abort jobs\n abort(this);\n\n // send back results we have so far\n async(callback)(null, this.results);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = parallel;\n\n/**\n * Runs iterator over provided array elements in parallel\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction parallel(list, iterator, callback)\n{\n var state = initState(list);\n\n while (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, function(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n // looks like it's the last one\n if (Object.keys(state.jobs).length === 0)\n {\n callback(null, state.results);\n return;\n }\n });\n\n state.index++;\n }\n\n return terminator.bind(state, callback);\n}\n","var serialOrdered = require('./serialOrdered.js');\n\n// Public API\nmodule.exports = serial;\n\n/**\n * Runs iterator over provided array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serial(list, iterator, callback)\n{\n return serialOrdered(list, iterator, null, callback);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = serialOrdered;\n// sorting helpers\nmodule.exports.ascending = ascending;\nmodule.exports.descending = descending;\n\n/**\n * Runs iterator over provided sorted array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} sortMethod - custom sort function\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serialOrdered(list, iterator, sortMethod, callback)\n{\n var state = initState(list, sortMethod);\n\n iterate(list, iterator, state, function iteratorHandler(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n state.index++;\n\n // are we there yet?\n if (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, iteratorHandler);\n return;\n }\n\n // done here\n callback(null, state.results);\n });\n\n return terminator.bind(state, callback);\n}\n\n/*\n * -- Sort methods\n */\n\n/**\n * sort helper to sort array elements in ascending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction ascending(a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * sort helper to sort array elements in descending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction descending(a, b)\n{\n return -1 * ascending(a, b);\n}\n","var register = require(\"./lib/register\");\nvar addHook = require(\"./lib/add\");\nvar removeHook = require(\"./lib/remove\");\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind;\nvar bindable = bind.bind(bind);\n\nfunction bindApi(hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(\n null,\n name ? [state, name] : [state]\n );\n hook.api = { remove: removeHookRef };\n hook.remove = removeHookRef;\n [\"before\", \"error\", \"after\", \"wrap\"].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind];\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);\n });\n}\n\nfunction HookSingular() {\n var singularHookName = \"h\";\n var singularHookState = {\n registry: {},\n };\n var singularHook = register.bind(null, singularHookState, singularHookName);\n bindApi(singularHook, singularHookState, singularHookName);\n return singularHook;\n}\n\nfunction HookCollection() {\n var state = {\n registry: {},\n };\n\n var hook = register.bind(null, state);\n bindApi(hook, state);\n\n return hook;\n}\n\nvar collectionHookDeprecationMessageDisplayed = false;\nfunction Hook() {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn(\n '[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4'\n );\n collectionHookDeprecationMessageDisplayed = true;\n }\n return HookCollection();\n}\n\nHook.Singular = HookSingular.bind();\nHook.Collection = HookCollection.bind();\n\nmodule.exports = Hook;\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook;\nmodule.exports.Singular = Hook.Singular;\nmodule.exports.Collection = Hook.Collection;\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\nvar isNode = typeof process !== \"undefined\" && process.versions != null && process.versions.node != null;\n\nvar isWebWorker = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) === \"object\" && self.constructor && self.constructor.name === \"DedicatedWorkerGlobalScope\";\n\n/**\n * @see https://github.com/jsdom/jsdom/releases/tag/12.0.0\n * @see https://github.com/jsdom/jsdom/issues/1537\n */\nvar isJsDom = typeof window !== \"undefined\" && window.name === \"nodejs\" || typeof navigator !== \"undefined\" && (navigator.userAgent.includes(\"Node.js\") || navigator.userAgent.includes(\"jsdom\"));\n\nvar isDeno = typeof Deno !== \"undefined\" && typeof Deno.version !== \"undefined\" && typeof Deno.version.deno !== \"undefined\";\n\nexports.isBrowser = isBrowser;\nexports.isWebWorker = isWebWorker;\nexports.isNode = isNode;\nexports.isJsDom = isJsDom;\nexports.isDeno = isDeno;","var util = require('util');\nvar Stream = require('stream').Stream;\nvar DelayedStream = require('delayed-stream');\n\nmodule.exports = CombinedStream;\nfunction CombinedStream() {\n this.writable = false;\n this.readable = true;\n this.dataSize = 0;\n this.maxDataSize = 2 * 1024 * 1024;\n this.pauseStreams = true;\n\n this._released = false;\n this._streams = [];\n this._currentStream = null;\n this._insideLoop = false;\n this._pendingNext = false;\n}\nutil.inherits(CombinedStream, Stream);\n\nCombinedStream.create = function(options) {\n var combinedStream = new this();\n\n options = options || {};\n for (var option in options) {\n combinedStream[option] = options[option];\n }\n\n return combinedStream;\n};\n\nCombinedStream.isStreamLike = function(stream) {\n return (typeof stream !== 'function')\n && (typeof stream !== 'string')\n && (typeof stream !== 'boolean')\n && (typeof stream !== 'number')\n && (!Buffer.isBuffer(stream));\n};\n\nCombinedStream.prototype.append = function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n\n if (isStreamLike) {\n if (!(stream instanceof DelayedStream)) {\n var newStream = DelayedStream.create(stream, {\n maxDataSize: Infinity,\n pauseStream: this.pauseStreams,\n });\n stream.on('data', this._checkDataSize.bind(this));\n stream = newStream;\n }\n\n this._handleErrors(stream);\n\n if (this.pauseStreams) {\n stream.pause();\n }\n }\n\n this._streams.push(stream);\n return this;\n};\n\nCombinedStream.prototype.pipe = function(dest, options) {\n Stream.prototype.pipe.call(this, dest, options);\n this.resume();\n return dest;\n};\n\nCombinedStream.prototype._getNext = function() {\n this._currentStream = null;\n\n if (this._insideLoop) {\n this._pendingNext = true;\n return; // defer call\n }\n\n this._insideLoop = true;\n try {\n do {\n this._pendingNext = false;\n this._realGetNext();\n } while (this._pendingNext);\n } finally {\n this._insideLoop = false;\n }\n};\n\nCombinedStream.prototype._realGetNext = function() {\n var stream = this._streams.shift();\n\n\n if (typeof stream == 'undefined') {\n this.end();\n return;\n }\n\n if (typeof stream !== 'function') {\n this._pipeNext(stream);\n return;\n }\n\n var getStream = stream;\n getStream(function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('data', this._checkDataSize.bind(this));\n this._handleErrors(stream);\n }\n\n this._pipeNext(stream);\n }.bind(this));\n};\n\nCombinedStream.prototype._pipeNext = function(stream) {\n this._currentStream = stream;\n\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('end', this._getNext.bind(this));\n stream.pipe(this, {end: false});\n return;\n }\n\n var value = stream;\n this.write(value);\n this._getNext();\n};\n\nCombinedStream.prototype._handleErrors = function(stream) {\n var self = this;\n stream.on('error', function(err) {\n self._emitError(err);\n });\n};\n\nCombinedStream.prototype.write = function(data) {\n this.emit('data', data);\n};\n\nCombinedStream.prototype.pause = function() {\n if (!this.pauseStreams) {\n return;\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();\n this.emit('pause');\n};\n\nCombinedStream.prototype.resume = function() {\n if (!this._released) {\n this._released = true;\n this.writable = true;\n this._getNext();\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();\n this.emit('resume');\n};\n\nCombinedStream.prototype.end = function() {\n this._reset();\n this.emit('end');\n};\n\nCombinedStream.prototype.destroy = function() {\n this._reset();\n this.emit('close');\n};\n\nCombinedStream.prototype._reset = function() {\n this.writable = false;\n this._streams = [];\n this._currentStream = null;\n};\n\nCombinedStream.prototype._checkDataSize = function() {\n this._updateDataSize();\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';\n this._emitError(new Error(message));\n};\n\nCombinedStream.prototype._updateDataSize = function() {\n this.dataSize = 0;\n\n var self = this;\n this._streams.forEach(function(stream) {\n if (!stream.dataSize) {\n return;\n }\n\n self.dataSize += stream.dataSize;\n });\n\n if (this._currentStream && this._currentStream.dataSize) {\n this.dataSize += this._currentStream.dataSize;\n }\n};\n\nCombinedStream.prototype._emitError = function(err) {\n this._reset();\n this.emit('error', err);\n};\n","const nodeFetch = require('node-fetch')\nconst realFetch = nodeFetch.default || nodeFetch\n\nconst fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = 'https:' + url\n }\n return realFetch.call(this, url, options)\n}\n\nfetch.ponyfill = true\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports.default = fetch\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","var Stream = require('stream').Stream;\nvar util = require('util');\n\nmodule.exports = DelayedStream;\nfunction DelayedStream() {\n this.source = null;\n this.dataSize = 0;\n this.maxDataSize = 1024 * 1024;\n this.pauseStream = true;\n\n this._maxDataSizeExceeded = false;\n this._released = false;\n this._bufferedEvents = [];\n}\nutil.inherits(DelayedStream, Stream);\n\nDelayedStream.create = function(source, options) {\n var delayedStream = new this();\n\n options = options || {};\n for (var option in options) {\n delayedStream[option] = options[option];\n }\n\n delayedStream.source = source;\n\n var realEmit = source.emit;\n source.emit = function() {\n delayedStream._handleEmit(arguments);\n return realEmit.apply(source, arguments);\n };\n\n source.on('error', function() {});\n if (delayedStream.pauseStream) {\n source.pause();\n }\n\n return delayedStream;\n};\n\nObject.defineProperty(DelayedStream.prototype, 'readable', {\n configurable: true,\n enumerable: true,\n get: function() {\n return this.source.readable;\n }\n});\n\nDelayedStream.prototype.setEncoding = function() {\n return this.source.setEncoding.apply(this.source, arguments);\n};\n\nDelayedStream.prototype.resume = function() {\n if (!this._released) {\n this.release();\n }\n\n this.source.resume();\n};\n\nDelayedStream.prototype.pause = function() {\n this.source.pause();\n};\n\nDelayedStream.prototype.release = function() {\n this._released = true;\n\n this._bufferedEvents.forEach(function(args) {\n this.emit.apply(this, args);\n }.bind(this));\n this._bufferedEvents = [];\n};\n\nDelayedStream.prototype.pipe = function() {\n var r = Stream.prototype.pipe.apply(this, arguments);\n this.resume();\n return r;\n};\n\nDelayedStream.prototype._handleEmit = function(args) {\n if (this._released) {\n this.emit.apply(this, args);\n return;\n }\n\n if (args[0] === 'data') {\n this.dataSize += args[1].length;\n this._checkIfMaxDataSizeExceeded();\n }\n\n this._bufferedEvents.push(args);\n};\n\nDelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {\n if (this._maxDataSizeExceeded) {\n return;\n }\n\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n this._maxDataSizeExceeded = true;\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'\n this.emit('error', new Error(message));\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","'use strict';\n\nvar iconvLite = require('iconv-lite');\n\n// Expose to the world\nmodule.exports.convert = convert;\n\n/**\n * Convert encoding of an UTF-8 string or a buffer\n *\n * @param {String|Buffer} str String to be converted\n * @param {String} to Encoding to be converted to\n * @param {String} [from='UTF-8'] Encoding to be converted from\n * @return {Buffer} Encoded string\n */\nfunction convert(str, to, from) {\n from = checkEncoding(from || 'UTF-8');\n to = checkEncoding(to || 'UTF-8');\n str = str || '';\n\n var result;\n\n if (from !== 'UTF-8' && typeof str === 'string') {\n str = Buffer.from(str, 'binary');\n }\n\n if (from === to) {\n if (typeof str === 'string') {\n result = Buffer.from(str);\n } else {\n result = str;\n }\n } else {\n try {\n result = convertIconvLite(str, to, from);\n } catch (E) {\n console.error(E);\n result = str;\n }\n }\n\n if (typeof result === 'string') {\n result = Buffer.from(result, 'utf-8');\n }\n\n return result;\n}\n\n/**\n * Convert encoding of astring with iconv-lite\n *\n * @param {String|Buffer} str String to be converted\n * @param {String} to Encoding to be converted to\n * @param {String} [from='UTF-8'] Encoding to be converted from\n * @return {Buffer} Encoded string\n */\nfunction convertIconvLite(str, to, from) {\n if (to === 'UTF-8') {\n return iconvLite.decode(str, from);\n } else if (from === 'UTF-8') {\n return iconvLite.encode(str, to);\n } else {\n return iconvLite.encode(iconvLite.decode(str, from), to);\n }\n}\n\n/**\n * Converts charset name if needed\n *\n * @param {String} name Character set\n * @return {String} Character set name\n */\nfunction checkEncoding(name) {\n return (name || '')\n .toString()\n .trim()\n .replace(/^latin[\\-_]?(\\d+)$/i, 'ISO-8859-$1')\n .replace(/^win(?:dows)?[\\-_]?(\\d+)$/i, 'WINDOWS-$1')\n .replace(/^utf[\\-_]?(\\d+)$/i, 'UTF-$1')\n .replace(/^ks_c_5601\\-1987$/i, 'CP949')\n .replace(/^us[\\-_]?ascii$/i, 'ASCII')\n .toUpperCase();\n}\n","var debug;\n\nmodule.exports = function () {\n if (!debug) {\n try {\n /* eslint global-require: off */\n debug = require(\"debug\")(\"follow-redirects\");\n }\n catch (error) { /* */ }\n if (typeof debug !== \"function\") {\n debug = function () { /* */ };\n }\n }\n debug.apply(null, arguments);\n};\n","var url = require(\"url\");\nvar URL = url.URL;\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar Writable = require(\"stream\").Writable;\nvar assert = require(\"assert\");\nvar debug = require(\"./debug\");\n\n// Whether to use the native URL object or the legacy url module\nvar useNativeURL = false;\ntry {\n assert(new URL());\n}\ncatch (error) {\n useNativeURL = error.code === \"ERR_INVALID_URL\";\n}\n\n// URL fields to preserve in copy operations\nvar preservedUrlFields = [\n \"auth\",\n \"host\",\n \"hostname\",\n \"href\",\n \"path\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"query\",\n \"search\",\n \"hash\",\n];\n\n// Create handlers that pass events from native requests\nvar events = [\"abort\", \"aborted\", \"connect\", \"error\", \"socket\", \"timeout\"];\nvar eventHandlers = Object.create(null);\nevents.forEach(function (event) {\n eventHandlers[event] = function (arg1, arg2, arg3) {\n this._redirectable.emit(event, arg1, arg2, arg3);\n };\n});\n\n// Error types with codes\nvar InvalidUrlError = createErrorType(\n \"ERR_INVALID_URL\",\n \"Invalid URL\",\n TypeError\n);\nvar RedirectionError = createErrorType(\n \"ERR_FR_REDIRECTION_FAILURE\",\n \"Redirected request failed\"\n);\nvar TooManyRedirectsError = createErrorType(\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"Maximum number of redirects exceeded\",\n RedirectionError\n);\nvar MaxBodyLengthExceededError = createErrorType(\n \"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n \"Request body larger than maxBodyLength limit\"\n);\nvar WriteAfterEndError = createErrorType(\n \"ERR_STREAM_WRITE_AFTER_END\",\n \"write after end\"\n);\n\n// istanbul ignore next\nvar destroy = Writable.prototype.destroy || noop;\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n this._sanitizeOptions(options);\n this._options = options;\n this._ended = false;\n this._ending = false;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0;\n this._requestBodyBuffers = [];\n\n // Attach a callback if passed\n if (responseCallback) {\n this.on(\"response\", responseCallback);\n }\n\n // React to responses of native requests\n var self = this;\n this._onNativeResponse = function (response) {\n try {\n self._processResponse(response);\n }\n catch (cause) {\n self.emit(\"error\", cause instanceof RedirectionError ?\n cause : new RedirectionError({ cause: cause }));\n }\n };\n\n // Perform the first request\n this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort = function () {\n destroyRequest(this._currentRequest);\n this._currentRequest.abort();\n this.emit(\"abort\");\n};\n\nRedirectableRequest.prototype.destroy = function (error) {\n destroyRequest(this._currentRequest, error);\n destroy.call(this, error);\n return this;\n};\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n // Writing is not allowed if end has been called\n if (this._ending) {\n throw new WriteAfterEndError();\n }\n\n // Validate input and shift parameters if necessary\n if (!isString(data) && !isBuffer(data)) {\n throw new TypeError(\"data should be a string, Buffer or Uint8Array\");\n }\n if (isFunction(encoding)) {\n callback = encoding;\n encoding = null;\n }\n\n // Ignore empty buffers, since writing them doesn't invoke the callback\n // https://github.com/nodejs/node/issues/22066\n if (data.length === 0) {\n if (callback) {\n callback();\n }\n return;\n }\n // Only write when we don't exceed the maximum body length\n if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n this._requestBodyLength += data.length;\n this._requestBodyBuffers.push({ data: data, encoding: encoding });\n this._currentRequest.write(data, encoding, callback);\n }\n // Error when we exceed the maximum body length\n else {\n this.emit(\"error\", new MaxBodyLengthExceededError());\n this.abort();\n }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n // Shift parameters if necessary\n if (isFunction(data)) {\n callback = data;\n data = encoding = null;\n }\n else if (isFunction(encoding)) {\n callback = encoding;\n encoding = null;\n }\n\n // Write data if needed and end\n if (!data) {\n this._ended = this._ending = true;\n this._currentRequest.end(null, null, callback);\n }\n else {\n var self = this;\n var currentRequest = this._currentRequest;\n this.write(data, encoding, function () {\n self._ended = true;\n currentRequest.end(null, null, callback);\n });\n this._ending = true;\n }\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n this._options.headers[name] = value;\n this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n delete this._options.headers[name];\n this._currentRequest.removeHeader(name);\n};\n\n// Global timeout for all underlying requests\nRedirectableRequest.prototype.setTimeout = function (msecs, callback) {\n var self = this;\n\n // Destroys the socket on timeout\n function destroyOnTimeout(socket) {\n socket.setTimeout(msecs);\n socket.removeListener(\"timeout\", socket.destroy);\n socket.addListener(\"timeout\", socket.destroy);\n }\n\n // Sets up a timer to trigger a timeout event\n function startTimer(socket) {\n if (self._timeout) {\n clearTimeout(self._timeout);\n }\n self._timeout = setTimeout(function () {\n self.emit(\"timeout\");\n clearTimer();\n }, msecs);\n destroyOnTimeout(socket);\n }\n\n // Stops a timeout from triggering\n function clearTimer() {\n // Clear the timeout\n if (self._timeout) {\n clearTimeout(self._timeout);\n self._timeout = null;\n }\n\n // Clean up all attached listeners\n self.removeListener(\"abort\", clearTimer);\n self.removeListener(\"error\", clearTimer);\n self.removeListener(\"response\", clearTimer);\n self.removeListener(\"close\", clearTimer);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!self.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }\n\n // Attach callback if passed\n if (callback) {\n this.on(\"timeout\", callback);\n }\n\n // Start the timer if or when the socket is opened\n if (this.socket) {\n startTimer(this.socket);\n }\n else {\n this._currentRequest.once(\"socket\", startTimer);\n }\n\n // Clean up on events\n this.on(\"socket\", destroyOnTimeout);\n this.on(\"abort\", clearTimer);\n this.on(\"error\", clearTimer);\n this.on(\"response\", clearTimer);\n this.on(\"close\", clearTimer);\n\n return this;\n};\n\n// Proxy all other public ClientRequest methods\n[\n \"flushHeaders\", \"getHeader\",\n \"setNoDelay\", \"setSocketKeepAlive\",\n].forEach(function (method) {\n RedirectableRequest.prototype[method] = function (a, b) {\n return this._currentRequest[method](a, b);\n };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n Object.defineProperty(RedirectableRequest.prototype, property, {\n get: function () { return this._currentRequest[property]; },\n });\n});\n\nRedirectableRequest.prototype._sanitizeOptions = function (options) {\n // Ensure headers are always present\n if (!options.headers) {\n options.headers = {};\n }\n\n // Since http.request treats host as an alias of hostname,\n // but the url module interprets host as hostname plus port,\n // eliminate the host property to avoid confusion.\n if (options.host) {\n // Use hostname if set, because it has precedence\n if (!options.hostname) {\n options.hostname = options.host;\n }\n delete options.host;\n }\n\n // Complete the URL object when necessary\n if (!options.pathname && options.path) {\n var searchPos = options.path.indexOf(\"?\");\n if (searchPos < 0) {\n options.pathname = options.path;\n }\n else {\n options.pathname = options.path.substring(0, searchPos);\n options.search = options.path.substring(searchPos);\n }\n }\n};\n\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n // Load the native protocol\n var protocol = this._options.protocol;\n var nativeProtocol = this._options.nativeProtocols[protocol];\n if (!nativeProtocol) {\n throw new TypeError(\"Unsupported protocol \" + protocol);\n }\n\n // If specified, use the agent corresponding to the protocol\n // (HTTP and HTTPS use different types of agents)\n if (this._options.agents) {\n var scheme = protocol.slice(0, -1);\n this._options.agent = this._options.agents[scheme];\n }\n\n // Create the native request and set up its event handlers\n var request = this._currentRequest =\n nativeProtocol.request(this._options, this._onNativeResponse);\n request._redirectable = this;\n for (var event of events) {\n request.on(event, eventHandlers[event]);\n }\n\n // RFC7230§5.3.1: When making a request directly to an origin server, […]\n // a client MUST send only the absolute path […] as the request-target.\n this._currentUrl = /^\\//.test(this._options.path) ?\n url.format(this._options) :\n // When making a request to a proxy, […]\n // a client MUST send the target URI in absolute-form […].\n this._options.path;\n\n // End a redirected request\n // (The first request must be ended explicitly with RedirectableRequest#end)\n if (this._isRedirect) {\n // Write the request entity and end\n var i = 0;\n var self = this;\n var buffers = this._requestBodyBuffers;\n (function writeNext(error) {\n // Only write if this request has not been redirected yet\n /* istanbul ignore else */\n if (request === self._currentRequest) {\n // Report any write errors\n /* istanbul ignore if */\n if (error) {\n self.emit(\"error\", error);\n }\n // Write the next buffer if there are still left\n else if (i < buffers.length) {\n var buffer = buffers[i++];\n /* istanbul ignore else */\n if (!request.finished) {\n request.write(buffer.data, buffer.encoding, writeNext);\n }\n }\n // End the request if `end` has been called on us\n else if (self._ended) {\n request.end();\n }\n }\n }());\n }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n // Store the redirected response\n var statusCode = response.statusCode;\n if (this._options.trackRedirects) {\n this._redirects.push({\n url: this._currentUrl,\n headers: response.headers,\n statusCode: statusCode,\n });\n }\n\n // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n // that further action needs to be taken by the user agent in order to\n // fulfill the request. If a Location header field is provided,\n // the user agent MAY automatically redirect its request to the URI\n // referenced by the Location field value,\n // even if the specific status code is not understood.\n\n // If the response is not a redirect; return it as-is\n var location = response.headers.location;\n if (!location || this._options.followRedirects === false ||\n statusCode < 300 || statusCode >= 400) {\n response.responseUrl = this._currentUrl;\n response.redirects = this._redirects;\n this.emit(\"response\", response);\n\n // Clean up\n this._requestBodyBuffers = [];\n return;\n }\n\n // The response is a redirect, so abort the current request\n destroyRequest(this._currentRequest);\n // Discard the remainder of the response to avoid waiting for data\n response.destroy();\n\n // RFC7231§6.4: A client SHOULD detect and intervene\n // in cyclical redirections (i.e., \"infinite\" redirection loops).\n if (++this._redirectCount > this._options.maxRedirects) {\n throw new TooManyRedirectsError();\n }\n\n // Store the request headers if applicable\n var requestHeaders;\n var beforeRedirect = this._options.beforeRedirect;\n if (beforeRedirect) {\n requestHeaders = Object.assign({\n // The Host header was set by nativeProtocol.request\n Host: response.req.getHeader(\"host\"),\n }, this._options.headers);\n }\n\n // RFC7231§6.4: Automatic redirection needs to done with\n // care for methods not known to be safe, […]\n // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change\n // the request method from POST to GET for the subsequent request.\n var method = this._options.method;\n if ((statusCode === 301 || statusCode === 302) && this._options.method === \"POST\" ||\n // RFC7231§6.4.4: The 303 (See Other) status code indicates that\n // the server is redirecting the user agent to a different resource […]\n // A user agent can perform a retrieval request targeting that URI\n // (a GET or HEAD request if using HTTP) […]\n (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {\n this._options.method = \"GET\";\n // Drop a possible entity and headers related to it\n this._requestBodyBuffers = [];\n removeMatchingHeaders(/^content-/i, this._options.headers);\n }\n\n // Drop the Host header, as the redirect might lead to a different host\n var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);\n\n // If the redirect is relative, carry over the host of the last request\n var currentUrlParts = parseUrl(this._currentUrl);\n var currentHost = currentHostHeader || currentUrlParts.host;\n var currentUrl = /^\\w+:/.test(location) ? this._currentUrl :\n url.format(Object.assign(currentUrlParts, { host: currentHost }));\n\n // Create the redirected request\n var redirectUrl = resolveUrl(location, currentUrl);\n debug(\"redirecting to\", redirectUrl.href);\n this._isRedirect = true;\n spreadUrlObject(redirectUrl, this._options);\n\n // Drop confidential headers when redirecting to a less secure protocol\n // or to a different domain that is not a superdomain\n if (redirectUrl.protocol !== currentUrlParts.protocol &&\n redirectUrl.protocol !== \"https:\" ||\n redirectUrl.host !== currentHost &&\n !isSubdomain(redirectUrl.host, currentHost)) {\n removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);\n }\n\n // Evaluate the beforeRedirect callback\n if (isFunction(beforeRedirect)) {\n var responseDetails = {\n headers: response.headers,\n statusCode: statusCode,\n };\n var requestDetails = {\n url: currentUrl,\n method: method,\n headers: requestHeaders,\n };\n beforeRedirect(this._options, responseDetails, requestDetails);\n this._sanitizeOptions(this._options);\n }\n\n // Perform the redirected request\n this._performRequest();\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n // Executes a request, following redirects\n function request(input, options, callback) {\n // Parse parameters, ensuring that input is an object\n if (isURL(input)) {\n input = spreadUrlObject(input);\n }\n else if (isString(input)) {\n input = spreadUrlObject(parseUrl(input));\n }\n else {\n callback = options;\n options = validateUrl(input);\n input = { protocol: protocol };\n }\n if (isFunction(options)) {\n callback = options;\n options = null;\n }\n\n // Set defaults\n options = Object.assign({\n maxRedirects: exports.maxRedirects,\n maxBodyLength: exports.maxBodyLength,\n }, input, options);\n options.nativeProtocols = nativeProtocols;\n if (!isString(options.host) && !isString(options.hostname)) {\n options.hostname = \"::1\";\n }\n\n assert.equal(options.protocol, protocol, \"protocol mismatch\");\n debug(\"options\", options);\n return new RedirectableRequest(options, callback);\n }\n\n // Executes a GET request, following redirects\n function get(input, options, callback) {\n var wrappedRequest = wrappedProtocol.request(input, options, callback);\n wrappedRequest.end();\n return wrappedRequest;\n }\n\n // Expose the properties on the wrapped protocol\n Object.defineProperties(wrappedProtocol, {\n request: { value: request, configurable: true, enumerable: true, writable: true },\n get: { value: get, configurable: true, enumerable: true, writable: true },\n });\n });\n return exports;\n}\n\nfunction noop() { /* empty */ }\n\nfunction parseUrl(input) {\n var parsed;\n /* istanbul ignore else */\n if (useNativeURL) {\n parsed = new URL(input);\n }\n else {\n // Ensure the URL is valid and absolute\n parsed = validateUrl(url.parse(input));\n if (!isString(parsed.protocol)) {\n throw new InvalidUrlError({ input });\n }\n }\n return parsed;\n}\n\nfunction resolveUrl(relative, base) {\n /* istanbul ignore next */\n return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));\n}\n\nfunction validateUrl(input) {\n if (/^\\[/.test(input.hostname) && !/^\\[[:0-9a-f]+\\]$/i.test(input.hostname)) {\n throw new InvalidUrlError({ input: input.href || input });\n }\n if (/^\\[/.test(input.host) && !/^\\[[:0-9a-f]+\\](:\\d+)?$/i.test(input.host)) {\n throw new InvalidUrlError({ input: input.href || input });\n }\n return input;\n}\n\nfunction spreadUrlObject(urlObject, target) {\n var spread = target || {};\n for (var key of preservedUrlFields) {\n spread[key] = urlObject[key];\n }\n\n // Fix IPv6 hostname\n if (spread.hostname.startsWith(\"[\")) {\n spread.hostname = spread.hostname.slice(1, -1);\n }\n // Ensure port is a number\n if (spread.port !== \"\") {\n spread.port = Number(spread.port);\n }\n // Concatenate path\n spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;\n\n return spread;\n}\n\nfunction removeMatchingHeaders(regex, headers) {\n var lastValue;\n for (var header in headers) {\n if (regex.test(header)) {\n lastValue = headers[header];\n delete headers[header];\n }\n }\n return (lastValue === null || typeof lastValue === \"undefined\") ?\n undefined : String(lastValue).trim();\n}\n\nfunction createErrorType(code, message, baseClass) {\n // Create constructor\n function CustomError(properties) {\n Error.captureStackTrace(this, this.constructor);\n Object.assign(this, properties || {});\n this.code = code;\n this.message = this.cause ? message + \": \" + this.cause.message : message;\n }\n\n // Attach constructor and set default properties\n CustomError.prototype = new (baseClass || Error)();\n Object.defineProperties(CustomError.prototype, {\n constructor: {\n value: CustomError,\n enumerable: false,\n },\n name: {\n value: \"Error [\" + code + \"]\",\n enumerable: false,\n },\n });\n return CustomError;\n}\n\nfunction destroyRequest(request, error) {\n for (var event of events) {\n request.removeListener(event, eventHandlers[event]);\n }\n request.on(\"error\", noop);\n request.destroy(error);\n}\n\nfunction isSubdomain(subdomain, domain) {\n assert(isString(subdomain) && isString(domain));\n var dot = subdomain.length - domain.length - 1;\n return dot > 0 && subdomain[dot] === \".\" && subdomain.endsWith(domain);\n}\n\nfunction isString(value) {\n return typeof value === \"string\" || value instanceof String;\n}\n\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\nfunction isBuffer(value) {\n return typeof value === \"object\" && (\"length\" in value);\n}\n\nfunction isURL(value) {\n return URL && value instanceof URL;\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n","var CombinedStream = require('combined-stream');\nvar util = require('util');\nvar path = require('path');\nvar http = require('http');\nvar https = require('https');\nvar parseUrl = require('url').parse;\nvar fs = require('fs');\nvar Stream = require('stream').Stream;\nvar mime = require('mime-types');\nvar asynckit = require('asynckit');\nvar populate = require('./populate.js');\n\n// Public API\nmodule.exports = FormData;\n\n// make it a Stream\nutil.inherits(FormData, CombinedStream);\n\n/**\n * Create readable \"multipart/form-data\" streams.\n * Can be used to submit forms\n * and file uploads to other web applications.\n *\n * @constructor\n * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream\n */\nfunction FormData(options) {\n if (!(this instanceof FormData)) {\n return new FormData(options);\n }\n\n this._overheadLength = 0;\n this._valueLength = 0;\n this._valuesToMeasure = [];\n\n CombinedStream.call(this);\n\n options = options || {};\n for (var option in options) {\n this[option] = options[option];\n }\n}\n\nFormData.LINE_BREAK = '\\r\\n';\nFormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\nFormData.prototype.append = function(field, value, options) {\n\n options = options || {};\n\n // allow filename as single option\n if (typeof options == 'string') {\n options = {filename: options};\n }\n\n var append = CombinedStream.prototype.append.bind(this);\n\n // all that streamy business can't handle numbers\n if (typeof value == 'number') {\n value = '' + value;\n }\n\n // https://github.com/felixge/node-form-data/issues/38\n if (util.isArray(value)) {\n // Please convert your array into string\n // the way web server expects it\n this._error(new Error('Arrays are not supported.'));\n return;\n }\n\n var header = this._multiPartHeader(field, value, options);\n var footer = this._multiPartFooter();\n\n append(header);\n append(value);\n append(footer);\n\n // pass along options.knownLength\n this._trackLength(header, value, options);\n};\n\nFormData.prototype._trackLength = function(header, value, options) {\n var valueLength = 0;\n\n // used w/ getLengthSync(), when length is known.\n // e.g. for streaming directly from a remote server,\n // w/ a known file a size, and not wanting to wait for\n // incoming file to finish to get its size.\n if (options.knownLength != null) {\n valueLength += +options.knownLength;\n } else if (Buffer.isBuffer(value)) {\n valueLength = value.length;\n } else if (typeof value === 'string') {\n valueLength = Buffer.byteLength(value);\n }\n\n this._valueLength += valueLength;\n\n // @check why add CRLF? does this account for custom/multiple CRLFs?\n this._overheadLength +=\n Buffer.byteLength(header) +\n FormData.LINE_BREAK.length;\n\n // empty or either doesn't have path or not an http response or not a stream\n if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {\n return;\n }\n\n // no need to bother with the length\n if (!options.knownLength) {\n this._valuesToMeasure.push(value);\n }\n};\n\nFormData.prototype._lengthRetriever = function(value, callback) {\n\n if (value.hasOwnProperty('fd')) {\n\n // take read range into a account\n // `end` = Infinity –> read file till the end\n //\n // TODO: Looks like there is bug in Node fs.createReadStream\n // it doesn't respect `end` options without `start` options\n // Fix it when node fixes it.\n // https://github.com/joyent/node/issues/7819\n if (value.end != undefined && value.end != Infinity && value.start != undefined) {\n\n // when end specified\n // no need to calculate range\n // inclusive, starts with 0\n callback(null, value.end + 1 - (value.start ? value.start : 0));\n\n // not that fast snoopy\n } else {\n // still need to fetch file size from fs\n fs.stat(value.path, function(err, stat) {\n\n var fileSize;\n\n if (err) {\n callback(err);\n return;\n }\n\n // update final size based on the range options\n fileSize = stat.size - (value.start ? value.start : 0);\n callback(null, fileSize);\n });\n }\n\n // or http response\n } else if (value.hasOwnProperty('httpVersion')) {\n callback(null, +value.headers['content-length']);\n\n // or request stream http://github.com/mikeal/request\n } else if (value.hasOwnProperty('httpModule')) {\n // wait till response come back\n value.on('response', function(response) {\n value.pause();\n callback(null, +response.headers['content-length']);\n });\n value.resume();\n\n // something else\n } else {\n callback('Unknown stream');\n }\n};\n\nFormData.prototype._multiPartHeader = function(field, value, options) {\n // custom header specified (as string)?\n // it becomes responsible for boundary\n // (e.g. to handle extra CRLFs on .NET servers)\n if (typeof options.header == 'string') {\n return options.header;\n }\n\n var contentDisposition = this._getContentDisposition(value, options);\n var contentType = this._getContentType(value, options);\n\n var contents = '';\n var headers = {\n // add custom disposition as third element or keep it two elements if not\n 'Content-Disposition': ['form-data', 'name=\"' + field + '\"'].concat(contentDisposition || []),\n // if no content type. allow it to be empty array\n 'Content-Type': [].concat(contentType || [])\n };\n\n // allow custom headers.\n if (typeof options.header == 'object') {\n populate(headers, options.header);\n }\n\n var header;\n for (var prop in headers) {\n if (!headers.hasOwnProperty(prop)) continue;\n header = headers[prop];\n\n // skip nullish headers.\n if (header == null) {\n continue;\n }\n\n // convert all headers to arrays.\n if (!Array.isArray(header)) {\n header = [header];\n }\n\n // add non-empty headers.\n if (header.length) {\n contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;\n }\n }\n\n return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;\n};\n\nFormData.prototype._getContentDisposition = function(value, options) {\n\n var filename\n , contentDisposition\n ;\n\n if (typeof options.filepath === 'string') {\n // custom filepath for relative paths\n filename = path.normalize(options.filepath).replace(/\\\\/g, '/');\n } else if (options.filename || value.name || value.path) {\n // custom filename take precedence\n // formidable and the browser add a name property\n // fs- and request- streams have path property\n filename = path.basename(options.filename || value.name || value.path);\n } else if (value.readable && value.hasOwnProperty('httpVersion')) {\n // or try http response\n filename = path.basename(value.client._httpMessage.path || '');\n }\n\n if (filename) {\n contentDisposition = 'filename=\"' + filename + '\"';\n }\n\n return contentDisposition;\n};\n\nFormData.prototype._getContentType = function(value, options) {\n\n // use custom content-type above all\n var contentType = options.contentType;\n\n // or try `name` from formidable, browser\n if (!contentType && value.name) {\n contentType = mime.lookup(value.name);\n }\n\n // or try `path` from fs-, request- streams\n if (!contentType && value.path) {\n contentType = mime.lookup(value.path);\n }\n\n // or if it's http-reponse\n if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {\n contentType = value.headers['content-type'];\n }\n\n // or guess it from the filepath or filename\n if (!contentType && (options.filepath || options.filename)) {\n contentType = mime.lookup(options.filepath || options.filename);\n }\n\n // fallback to the default content type if `value` is not simple value\n if (!contentType && typeof value == 'object') {\n contentType = FormData.DEFAULT_CONTENT_TYPE;\n }\n\n return contentType;\n};\n\nFormData.prototype._multiPartFooter = function() {\n return function(next) {\n var footer = FormData.LINE_BREAK;\n\n var lastPart = (this._streams.length === 0);\n if (lastPart) {\n footer += this._lastBoundary();\n }\n\n next(footer);\n }.bind(this);\n};\n\nFormData.prototype._lastBoundary = function() {\n return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;\n};\n\nFormData.prototype.getHeaders = function(userHeaders) {\n var header;\n var formHeaders = {\n 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()\n };\n\n for (header in userHeaders) {\n if (userHeaders.hasOwnProperty(header)) {\n formHeaders[header.toLowerCase()] = userHeaders[header];\n }\n }\n\n return formHeaders;\n};\n\nFormData.prototype.setBoundary = function(boundary) {\n this._boundary = boundary;\n};\n\nFormData.prototype.getBoundary = function() {\n if (!this._boundary) {\n this._generateBoundary();\n }\n\n return this._boundary;\n};\n\nFormData.prototype.getBuffer = function() {\n var dataBuffer = new Buffer.alloc( 0 );\n var boundary = this.getBoundary();\n\n // Create the form content. Add Line breaks to the end of data.\n for (var i = 0, len = this._streams.length; i < len; i++) {\n if (typeof this._streams[i] !== 'function') {\n\n // Add content to the buffer.\n if(Buffer.isBuffer(this._streams[i])) {\n dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);\n }else {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);\n }\n\n // Add break after content.\n if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );\n }\n }\n }\n\n // Add the footer and return the Buffer object.\n return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );\n};\n\nFormData.prototype._generateBoundary = function() {\n // This generates a 50 character boundary similar to those used by Firefox.\n // They are optimized for boyer-moore parsing.\n var boundary = '--------------------------';\n for (var i = 0; i < 24; i++) {\n boundary += Math.floor(Math.random() * 10).toString(16);\n }\n\n this._boundary = boundary;\n};\n\n// Note: getLengthSync DOESN'T calculate streams length\n// As workaround one can calculate file size manually\n// and add it as knownLength option\nFormData.prototype.getLengthSync = function() {\n var knownLength = this._overheadLength + this._valueLength;\n\n // Don't get confused, there are 3 \"internal\" streams for each keyval pair\n // so it basically checks if there is any value added to the form\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n // https://github.com/form-data/form-data/issues/40\n if (!this.hasKnownLength()) {\n // Some async length retrievers are present\n // therefore synchronous length calculation is false.\n // Please use getLength(callback) to get proper length\n this._error(new Error('Cannot calculate proper length in synchronous way.'));\n }\n\n return knownLength;\n};\n\n// Public API to check if length of added values is known\n// https://github.com/form-data/form-data/issues/196\n// https://github.com/form-data/form-data/issues/262\nFormData.prototype.hasKnownLength = function() {\n var hasKnownLength = true;\n\n if (this._valuesToMeasure.length) {\n hasKnownLength = false;\n }\n\n return hasKnownLength;\n};\n\nFormData.prototype.getLength = function(cb) {\n var knownLength = this._overheadLength + this._valueLength;\n\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n if (!this._valuesToMeasure.length) {\n process.nextTick(cb.bind(this, null, knownLength));\n return;\n }\n\n asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {\n if (err) {\n cb(err);\n return;\n }\n\n values.forEach(function(length) {\n knownLength += length;\n });\n\n cb(null, knownLength);\n });\n};\n\nFormData.prototype.submit = function(params, cb) {\n var request\n , options\n , defaults = {method: 'post'}\n ;\n\n // parse provided url if it's string\n // or treat it as options object\n if (typeof params == 'string') {\n\n params = parseUrl(params);\n options = populate({\n port: params.port,\n path: params.pathname,\n host: params.hostname,\n protocol: params.protocol\n }, defaults);\n\n // use custom params\n } else {\n\n options = populate(params, defaults);\n // if no port provided use default one\n if (!options.port) {\n options.port = options.protocol == 'https:' ? 443 : 80;\n }\n }\n\n // put that good code in getHeaders to some use\n options.headers = this.getHeaders(params.headers);\n\n // https if specified, fallback to http in any other case\n if (options.protocol == 'https:') {\n request = https.request(options);\n } else {\n request = http.request(options);\n }\n\n // get content length and fire away\n this.getLength(function(err, length) {\n if (err && err !== 'Unknown stream') {\n this._error(err);\n return;\n }\n\n // add content length\n if (length) {\n request.setHeader('Content-Length', length);\n }\n\n this.pipe(request);\n if (cb) {\n var onResponse;\n\n var callback = function (error, responce) {\n request.removeListener('error', callback);\n request.removeListener('response', onResponse);\n\n return cb.call(this, error, responce);\n };\n\n onResponse = callback.bind(this, null);\n\n request.on('error', callback);\n request.on('response', onResponse);\n }\n }.bind(this));\n\n return request;\n};\n\nFormData.prototype._error = function(err) {\n if (!this.error) {\n this.error = err;\n this.pause();\n this.emit('error', err);\n }\n};\n\nFormData.prototype.toString = function () {\n return '[object FormData]';\n};\n","// populates missing values\nmodule.exports = function(dst, src) {\n\n Object.keys(src).forEach(function(prop)\n {\n dst[prop] = dst[prop] || src[prop];\n });\n\n return dst;\n};\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.\n// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.\n// To save memory and loading time, we read table files only when requested.\n\nexports._dbcs = DBCSCodec;\n\nvar UNASSIGNED = -1,\n GB18030_CODE = -2,\n SEQ_START = -10,\n NODE_START = -1000,\n UNASSIGNED_NODE = new Array(0x100),\n DEF_CHAR = -1;\n\nfor (var i = 0; i < 0x100; i++)\n UNASSIGNED_NODE[i] = UNASSIGNED;\n\n\n// Class DBCSCodec reads and initializes mapping tables.\nfunction DBCSCodec(codecOptions, iconv) {\n this.encodingName = codecOptions.encodingName;\n if (!codecOptions)\n throw new Error(\"DBCS codec is called without the data.\")\n if (!codecOptions.table)\n throw new Error(\"Encoding '\" + this.encodingName + \"' has no data.\");\n\n // Load tables.\n var mappingTable = codecOptions.table();\n\n\n // Decode tables: MBCS -> Unicode.\n\n // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.\n // Trie root is decodeTables[0].\n // Values: >= 0 -> unicode character code. can be > 0xFFFF\n // == UNASSIGNED -> unknown/unassigned sequence.\n // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.\n // <= NODE_START -> index of the next node in our trie to process next byte.\n // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.\n this.decodeTables = [];\n this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.\n\n // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. \n this.decodeTableSeq = [];\n\n // Actual mapping tables consist of chunks. Use them to fill up decode tables.\n for (var i = 0; i < mappingTable.length; i++)\n this._addDecodeChunk(mappingTable[i]);\n\n // Load & create GB18030 tables when needed.\n if (typeof codecOptions.gb18030 === 'function') {\n this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.\n\n // Add GB18030 common decode nodes.\n var commonThirdByteNodeIdx = this.decodeTables.length;\n this.decodeTables.push(UNASSIGNED_NODE.slice(0));\n\n var commonFourthByteNodeIdx = this.decodeTables.length;\n this.decodeTables.push(UNASSIGNED_NODE.slice(0));\n\n // Fill out the tree\n var firstByteNode = this.decodeTables[0];\n for (var i = 0x81; i <= 0xFE; i++) {\n var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];\n for (var j = 0x30; j <= 0x39; j++) {\n if (secondByteNode[j] === UNASSIGNED) {\n secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;\n } else if (secondByteNode[j] > NODE_START) {\n throw new Error(\"gb18030 decode tables conflict at byte 2\");\n }\n\n var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]];\n for (var k = 0x81; k <= 0xFE; k++) {\n if (thirdByteNode[k] === UNASSIGNED) {\n thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx;\n } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) {\n continue;\n } else if (thirdByteNode[k] > NODE_START) {\n throw new Error(\"gb18030 decode tables conflict at byte 3\");\n }\n\n var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]];\n for (var l = 0x30; l <= 0x39; l++) {\n if (fourthByteNode[l] === UNASSIGNED)\n fourthByteNode[l] = GB18030_CODE;\n }\n }\n }\n }\n }\n\n this.defaultCharUnicode = iconv.defaultCharUnicode;\n\n \n // Encode tables: Unicode -> DBCS.\n\n // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.\n // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.\n // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).\n // == UNASSIGNED -> no conversion found. Output a default char.\n // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.\n this.encodeTable = [];\n \n // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of\n // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key\n // means end of sequence (needed when one sequence is a strict subsequence of another).\n // Objects are kept separately from encodeTable to increase performance.\n this.encodeTableSeq = [];\n\n // Some chars can be decoded, but need not be encoded.\n var skipEncodeChars = {};\n if (codecOptions.encodeSkipVals)\n for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {\n var val = codecOptions.encodeSkipVals[i];\n if (typeof val === 'number')\n skipEncodeChars[val] = true;\n else\n for (var j = val.from; j <= val.to; j++)\n skipEncodeChars[j] = true;\n }\n \n // Use decode trie to recursively fill out encode tables.\n this._fillEncodeTable(0, 0, skipEncodeChars);\n\n // Add more encoding pairs when needed.\n if (codecOptions.encodeAdd) {\n for (var uChar in codecOptions.encodeAdd)\n if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))\n this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);\n }\n\n this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];\n if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];\n if (this.defCharSB === UNASSIGNED) this.defCharSB = \"?\".charCodeAt(0);\n}\n\nDBCSCodec.prototype.encoder = DBCSEncoder;\nDBCSCodec.prototype.decoder = DBCSDecoder;\n\n// Decoder helpers\nDBCSCodec.prototype._getDecodeTrieNode = function(addr) {\n var bytes = [];\n for (; addr > 0; addr >>>= 8)\n bytes.push(addr & 0xFF);\n if (bytes.length == 0)\n bytes.push(0);\n\n var node = this.decodeTables[0];\n for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.\n var val = node[bytes[i]];\n\n if (val == UNASSIGNED) { // Create new node.\n node[bytes[i]] = NODE_START - this.decodeTables.length;\n this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));\n }\n else if (val <= NODE_START) { // Existing node.\n node = this.decodeTables[NODE_START - val];\n }\n else\n throw new Error(\"Overwrite byte in \" + this.encodingName + \", addr: \" + addr.toString(16));\n }\n return node;\n}\n\n\nDBCSCodec.prototype._addDecodeChunk = function(chunk) {\n // First element of chunk is the hex mbcs code where we start.\n var curAddr = parseInt(chunk[0], 16);\n\n // Choose the decoding node where we'll write our chars.\n var writeTable = this._getDecodeTrieNode(curAddr);\n curAddr = curAddr & 0xFF;\n\n // Write all other elements of the chunk to the table.\n for (var k = 1; k < chunk.length; k++) {\n var part = chunk[k];\n if (typeof part === \"string\") { // String, write as-is.\n for (var l = 0; l < part.length;) {\n var code = part.charCodeAt(l++);\n if (0xD800 <= code && code < 0xDC00) { // Decode surrogate\n var codeTrail = part.charCodeAt(l++);\n if (0xDC00 <= codeTrail && codeTrail < 0xE000)\n writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);\n else\n throw new Error(\"Incorrect surrogate pair in \" + this.encodingName + \" at chunk \" + chunk[0]);\n }\n else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)\n var len = 0xFFF - code + 2;\n var seq = [];\n for (var m = 0; m < len; m++)\n seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.\n\n writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;\n this.decodeTableSeq.push(seq);\n }\n else\n writeTable[curAddr++] = code; // Basic char\n }\n } \n else if (typeof part === \"number\") { // Integer, meaning increasing sequence starting with prev character.\n var charCode = writeTable[curAddr - 1] + 1;\n for (var l = 0; l < part; l++)\n writeTable[curAddr++] = charCode++;\n }\n else\n throw new Error(\"Incorrect type '\" + typeof part + \"' given in \" + this.encodingName + \" at chunk \" + chunk[0]);\n }\n if (curAddr > 0xFF)\n throw new Error(\"Incorrect chunk in \" + this.encodingName + \" at addr \" + chunk[0] + \": too long\" + curAddr);\n}\n\n// Encoder helpers\nDBCSCodec.prototype._getEncodeBucket = function(uCode) {\n var high = uCode >> 8; // This could be > 0xFF because of astral characters.\n if (this.encodeTable[high] === undefined)\n this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.\n return this.encodeTable[high];\n}\n\nDBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {\n var bucket = this._getEncodeBucket(uCode);\n var low = uCode & 0xFF;\n if (bucket[low] <= SEQ_START)\n this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.\n else if (bucket[low] == UNASSIGNED)\n bucket[low] = dbcsCode;\n}\n\nDBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {\n \n // Get the root of character tree according to first character of the sequence.\n var uCode = seq[0];\n var bucket = this._getEncodeBucket(uCode);\n var low = uCode & 0xFF;\n\n var node;\n if (bucket[low] <= SEQ_START) {\n // There's already a sequence with - use it.\n node = this.encodeTableSeq[SEQ_START-bucket[low]];\n }\n else {\n // There was no sequence object - allocate a new one.\n node = {};\n if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.\n bucket[low] = SEQ_START - this.encodeTableSeq.length;\n this.encodeTableSeq.push(node);\n }\n\n // Traverse the character tree, allocating new nodes as needed.\n for (var j = 1; j < seq.length-1; j++) {\n var oldVal = node[uCode];\n if (typeof oldVal === 'object')\n node = oldVal;\n else {\n node = node[uCode] = {}\n if (oldVal !== undefined)\n node[DEF_CHAR] = oldVal\n }\n }\n\n // Set the leaf to given dbcsCode.\n uCode = seq[seq.length-1];\n node[uCode] = dbcsCode;\n}\n\nDBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {\n var node = this.decodeTables[nodeIdx];\n var hasValues = false;\n var subNodeEmpty = {};\n for (var i = 0; i < 0x100; i++) {\n var uCode = node[i];\n var mbCode = prefix + i;\n if (skipEncodeChars[mbCode])\n continue;\n\n if (uCode >= 0) {\n this._setEncodeChar(uCode, mbCode);\n hasValues = true;\n } else if (uCode <= NODE_START) {\n var subNodeIdx = NODE_START - uCode;\n if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030).\n var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive.\n if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars))\n hasValues = true;\n else\n subNodeEmpty[subNodeIdx] = true;\n }\n } else if (uCode <= SEQ_START) {\n this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);\n hasValues = true;\n }\n }\n return hasValues;\n}\n\n\n\n// == Encoder ==================================================================\n\nfunction DBCSEncoder(options, codec) {\n // Encoder state\n this.leadSurrogate = -1;\n this.seqObj = undefined;\n \n // Static data\n this.encodeTable = codec.encodeTable;\n this.encodeTableSeq = codec.encodeTableSeq;\n this.defaultCharSingleByte = codec.defCharSB;\n this.gb18030 = codec.gb18030;\n}\n\nDBCSEncoder.prototype.write = function(str) {\n var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),\n leadSurrogate = this.leadSurrogate,\n seqObj = this.seqObj, nextChar = -1,\n i = 0, j = 0;\n\n while (true) {\n // 0. Get next character.\n if (nextChar === -1) {\n if (i == str.length) break;\n var uCode = str.charCodeAt(i++);\n }\n else {\n var uCode = nextChar;\n nextChar = -1; \n }\n\n // 1. Handle surrogates.\n if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.\n if (uCode < 0xDC00) { // We've got lead surrogate.\n if (leadSurrogate === -1) {\n leadSurrogate = uCode;\n continue;\n } else {\n leadSurrogate = uCode;\n // Double lead surrogate found.\n uCode = UNASSIGNED;\n }\n } else { // We've got trail surrogate.\n if (leadSurrogate !== -1) {\n uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);\n leadSurrogate = -1;\n } else {\n // Incomplete surrogate pair - only trail surrogate found.\n uCode = UNASSIGNED;\n }\n \n }\n }\n else if (leadSurrogate !== -1) {\n // Incomplete surrogate pair - only lead surrogate found.\n nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.\n leadSurrogate = -1;\n }\n\n // 2. Convert uCode character.\n var dbcsCode = UNASSIGNED;\n if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence\n var resCode = seqObj[uCode];\n if (typeof resCode === 'object') { // Sequence continues.\n seqObj = resCode;\n continue;\n\n } else if (typeof resCode == 'number') { // Sequence finished. Write it.\n dbcsCode = resCode;\n\n } else if (resCode == undefined) { // Current character is not part of the sequence.\n\n // Try default character for this sequence\n resCode = seqObj[DEF_CHAR];\n if (resCode !== undefined) {\n dbcsCode = resCode; // Found. Write it.\n nextChar = uCode; // Current character will be written too in the next iteration.\n\n } else {\n // TODO: What if we have no default? (resCode == undefined)\n // Then, we should write first char of the sequence as-is and try the rest recursively.\n // Didn't do it for now because no encoding has this situation yet.\n // Currently, just skip the sequence and write current char.\n }\n }\n seqObj = undefined;\n }\n else if (uCode >= 0) { // Regular character\n var subtable = this.encodeTable[uCode >> 8];\n if (subtable !== undefined)\n dbcsCode = subtable[uCode & 0xFF];\n \n if (dbcsCode <= SEQ_START) { // Sequence start\n seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];\n continue;\n }\n\n if (dbcsCode == UNASSIGNED && this.gb18030) {\n // Use GB18030 algorithm to find character(s) to write.\n var idx = findIdx(this.gb18030.uChars, uCode);\n if (idx != -1) {\n var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);\n newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;\n newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;\n newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;\n newBuf[j++] = 0x30 + dbcsCode;\n continue;\n }\n }\n }\n\n // 3. Write dbcsCode character.\n if (dbcsCode === UNASSIGNED)\n dbcsCode = this.defaultCharSingleByte;\n \n if (dbcsCode < 0x100) {\n newBuf[j++] = dbcsCode;\n }\n else if (dbcsCode < 0x10000) {\n newBuf[j++] = dbcsCode >> 8; // high byte\n newBuf[j++] = dbcsCode & 0xFF; // low byte\n }\n else if (dbcsCode < 0x1000000) {\n newBuf[j++] = dbcsCode >> 16;\n newBuf[j++] = (dbcsCode >> 8) & 0xFF;\n newBuf[j++] = dbcsCode & 0xFF;\n } else {\n newBuf[j++] = dbcsCode >>> 24;\n newBuf[j++] = (dbcsCode >>> 16) & 0xFF;\n newBuf[j++] = (dbcsCode >>> 8) & 0xFF;\n newBuf[j++] = dbcsCode & 0xFF;\n }\n }\n\n this.seqObj = seqObj;\n this.leadSurrogate = leadSurrogate;\n return newBuf.slice(0, j);\n}\n\nDBCSEncoder.prototype.end = function() {\n if (this.leadSurrogate === -1 && this.seqObj === undefined)\n return; // All clean. Most often case.\n\n var newBuf = Buffer.alloc(10), j = 0;\n\n if (this.seqObj) { // We're in the sequence.\n var dbcsCode = this.seqObj[DEF_CHAR];\n if (dbcsCode !== undefined) { // Write beginning of the sequence.\n if (dbcsCode < 0x100) {\n newBuf[j++] = dbcsCode;\n }\n else {\n newBuf[j++] = dbcsCode >> 8; // high byte\n newBuf[j++] = dbcsCode & 0xFF; // low byte\n }\n } else {\n // See todo above.\n }\n this.seqObj = undefined;\n }\n\n if (this.leadSurrogate !== -1) {\n // Incomplete surrogate pair - only lead surrogate found.\n newBuf[j++] = this.defaultCharSingleByte;\n this.leadSurrogate = -1;\n }\n \n return newBuf.slice(0, j);\n}\n\n// Export for testing\nDBCSEncoder.prototype.findIdx = findIdx;\n\n\n// == Decoder ==================================================================\n\nfunction DBCSDecoder(options, codec) {\n // Decoder state\n this.nodeIdx = 0;\n this.prevBytes = [];\n\n // Static data\n this.decodeTables = codec.decodeTables;\n this.decodeTableSeq = codec.decodeTableSeq;\n this.defaultCharUnicode = codec.defaultCharUnicode;\n this.gb18030 = codec.gb18030;\n}\n\nDBCSDecoder.prototype.write = function(buf) {\n var newBuf = Buffer.alloc(buf.length*2),\n nodeIdx = this.nodeIdx, \n prevBytes = this.prevBytes, prevOffset = this.prevBytes.length,\n seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence.\n uCode;\n\n for (var i = 0, j = 0; i < buf.length; i++) {\n var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset];\n\n // Lookup in current trie node.\n var uCode = this.decodeTables[nodeIdx][curByte];\n\n if (uCode >= 0) { \n // Normal character, just use it.\n }\n else if (uCode === UNASSIGNED) { // Unknown char.\n // TODO: Callback with seq.\n uCode = this.defaultCharUnicode.charCodeAt(0);\n i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again.\n }\n else if (uCode === GB18030_CODE) {\n if (i >= 3) {\n var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30);\n } else {\n var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + \n (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + \n (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + \n (curByte-0x30);\n }\n var idx = findIdx(this.gb18030.gbChars, ptr);\n uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];\n }\n else if (uCode <= NODE_START) { // Go to next trie node.\n nodeIdx = NODE_START - uCode;\n continue;\n }\n else if (uCode <= SEQ_START) { // Output a sequence of chars.\n var seq = this.decodeTableSeq[SEQ_START - uCode];\n for (var k = 0; k < seq.length - 1; k++) {\n uCode = seq[k];\n newBuf[j++] = uCode & 0xFF;\n newBuf[j++] = uCode >> 8;\n }\n uCode = seq[seq.length-1];\n }\n else\n throw new Error(\"iconv-lite internal error: invalid decoding table value \" + uCode + \" at \" + nodeIdx + \"/\" + curByte);\n\n // Write the character to buffer, handling higher planes using surrogate pair.\n if (uCode >= 0x10000) { \n uCode -= 0x10000;\n var uCodeLead = 0xD800 | (uCode >> 10);\n newBuf[j++] = uCodeLead & 0xFF;\n newBuf[j++] = uCodeLead >> 8;\n\n uCode = 0xDC00 | (uCode & 0x3FF);\n }\n newBuf[j++] = uCode & 0xFF;\n newBuf[j++] = uCode >> 8;\n\n // Reset trie node.\n nodeIdx = 0; seqStart = i+1;\n }\n\n this.nodeIdx = nodeIdx;\n this.prevBytes = (seqStart >= 0)\n ? Array.prototype.slice.call(buf, seqStart)\n : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf));\n\n return newBuf.slice(0, j).toString('ucs2');\n}\n\nDBCSDecoder.prototype.end = function() {\n var ret = '';\n\n // Try to parse all remaining chars.\n while (this.prevBytes.length > 0) {\n // Skip 1 character in the buffer.\n ret += this.defaultCharUnicode;\n var bytesArr = this.prevBytes.slice(1);\n\n // Parse remaining as usual.\n this.prevBytes = [];\n this.nodeIdx = 0;\n if (bytesArr.length > 0)\n ret += this.write(bytesArr);\n }\n\n this.prevBytes = [];\n this.nodeIdx = 0;\n return ret;\n}\n\n// Binary search for GB18030. Returns largest i such that table[i] <= val.\nfunction findIdx(table, val) {\n if (table[0] > val)\n return -1;\n\n var l = 0, r = table.length;\n while (l < r-1) { // always table[l] <= val < table[r]\n var mid = l + ((r-l+1) >> 1);\n if (table[mid] <= val)\n l = mid;\n else\n r = mid;\n }\n return l;\n}\n\n","\"use strict\";\n\n// Description of supported double byte encodings and aliases.\n// Tables are not require()-d until they are needed to speed up library load.\n// require()-s are direct to support Browserify.\n\nmodule.exports = {\n \n // == Japanese/ShiftJIS ====================================================\n // All japanese encodings are based on JIS X set of standards:\n // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.\n // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. \n // Has several variations in 1978, 1983, 1990 and 1997.\n // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.\n // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.\n // 2 planes, first is superset of 0208, second - revised 0212.\n // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)\n\n // Byte encodings are:\n // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte\n // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.\n // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.\n // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.\n // 0x00-0x7F - lower part of 0201\n // 0x8E, 0xA1-0xDF - upper part of 0201\n // (0xA1-0xFE)x2 - 0208 plane (94x94).\n // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).\n // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.\n // Used as-is in ISO2022 family.\n // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, \n // 0201-1976 Roman, 0208-1978, 0208-1983.\n // * ISO2022-JP-1: Adds esc seq for 0212-1990.\n // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.\n // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.\n // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.\n //\n // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.\n //\n // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html\n\n 'shiftjis': {\n type: '_dbcs',\n table: function() { return require('./tables/shiftjis.json') },\n encodeAdd: {'\\u00a5': 0x5C, '\\u203E': 0x7E},\n encodeSkipVals: [{from: 0xED40, to: 0xF940}],\n },\n 'csshiftjis': 'shiftjis',\n 'mskanji': 'shiftjis',\n 'sjis': 'shiftjis',\n 'windows31j': 'shiftjis',\n 'ms31j': 'shiftjis',\n 'xsjis': 'shiftjis',\n 'windows932': 'shiftjis',\n 'ms932': 'shiftjis',\n '932': 'shiftjis',\n 'cp932': 'shiftjis',\n\n 'eucjp': {\n type: '_dbcs',\n table: function() { return require('./tables/eucjp.json') },\n encodeAdd: {'\\u00a5': 0x5C, '\\u203E': 0x7E},\n },\n\n // TODO: KDDI extension to Shift_JIS\n // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.\n // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.\n\n\n // == Chinese/GBK ==========================================================\n // http://en.wikipedia.org/wiki/GBK\n // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder\n\n // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936\n 'gb2312': 'cp936',\n 'gb231280': 'cp936',\n 'gb23121980': 'cp936',\n 'csgb2312': 'cp936',\n 'csiso58gb231280': 'cp936',\n 'euccn': 'cp936',\n\n // Microsoft's CP936 is a subset and approximation of GBK.\n 'windows936': 'cp936',\n 'ms936': 'cp936',\n '936': 'cp936',\n 'cp936': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json') },\n },\n\n // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.\n 'gbk': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },\n },\n 'xgbk': 'gbk',\n 'isoir58': 'gbk',\n\n // GB18030 is an algorithmic extension of GBK.\n // Main source: https://www.w3.org/TR/encoding/#gbk-encoder\n // http://icu-project.org/docs/papers/gb18030.html\n // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml\n // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0\n 'gb18030': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },\n gb18030: function() { return require('./tables/gb18030-ranges.json') },\n encodeSkipVals: [0x80],\n encodeAdd: {'€': 0xA2E3},\n },\n\n 'chinese': 'gb18030',\n\n\n // == Korean ===============================================================\n // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.\n 'windows949': 'cp949',\n 'ms949': 'cp949',\n '949': 'cp949',\n 'cp949': {\n type: '_dbcs',\n table: function() { return require('./tables/cp949.json') },\n },\n\n 'cseuckr': 'cp949',\n 'csksc56011987': 'cp949',\n 'euckr': 'cp949',\n 'isoir149': 'cp949',\n 'korean': 'cp949',\n 'ksc56011987': 'cp949',\n 'ksc56011989': 'cp949',\n 'ksc5601': 'cp949',\n\n\n // == Big5/Taiwan/Hong Kong ================================================\n // There are lots of tables for Big5 and cp950. Please see the following links for history:\n // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html\n // Variations, in roughly number of defined chars:\n // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT\n // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/\n // * Big5-2003 (Taiwan standard) almost superset of cp950.\n // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.\n // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. \n // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.\n // Plus, it has 4 combining sequences.\n // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299\n // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.\n // Implementations are not consistent within browsers; sometimes labeled as just big5.\n // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.\n // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31\n // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.\n // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt\n // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt\n // \n // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder\n // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.\n\n 'windows950': 'cp950',\n 'ms950': 'cp950',\n '950': 'cp950',\n 'cp950': {\n type: '_dbcs',\n table: function() { return require('./tables/cp950.json') },\n },\n\n // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.\n 'big5': 'big5hkscs',\n 'big5hkscs': {\n type: '_dbcs',\n table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },\n encodeSkipVals: [\n // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of\n // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU.\n // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter.\n 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe,\n 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca,\n 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62,\n 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef,\n 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed,\n\n // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345\n 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce,\n ],\n },\n\n 'cnbig5': 'big5hkscs',\n 'csbig5': 'big5hkscs',\n 'xxbig5': 'big5hkscs',\n};\n","\"use strict\";\n\n// Update this array if you add/rename/remove files in this directory.\n// We support Browserify by skipping automatic module discovery and requiring modules directly.\nvar modules = [\n require(\"./internal\"),\n require(\"./utf32\"),\n require(\"./utf16\"),\n require(\"./utf7\"),\n require(\"./sbcs-codec\"),\n require(\"./sbcs-data\"),\n require(\"./sbcs-data-generated\"),\n require(\"./dbcs-codec\"),\n require(\"./dbcs-data\"),\n];\n\n// Put all encoding/alias/codec definitions to single object and export it.\nfor (var i = 0; i < modules.length; i++) {\n var module = modules[i];\n for (var enc in module)\n if (Object.prototype.hasOwnProperty.call(module, enc))\n exports[enc] = module[enc];\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Export Node.js internal encodings.\n\nmodule.exports = {\n // Encodings\n utf8: { type: \"_internal\", bomAware: true},\n cesu8: { type: \"_internal\", bomAware: true},\n unicode11utf8: \"utf8\",\n\n ucs2: { type: \"_internal\", bomAware: true},\n utf16le: \"ucs2\",\n\n binary: { type: \"_internal\" },\n base64: { type: \"_internal\" },\n hex: { type: \"_internal\" },\n\n // Codec.\n _internal: InternalCodec,\n};\n\n//------------------------------------------------------------------------------\n\nfunction InternalCodec(codecOptions, iconv) {\n this.enc = codecOptions.encodingName;\n this.bomAware = codecOptions.bomAware;\n\n if (this.enc === \"base64\")\n this.encoder = InternalEncoderBase64;\n else if (this.enc === \"cesu8\") {\n this.enc = \"utf8\"; // Use utf8 for decoding.\n this.encoder = InternalEncoderCesu8;\n\n // Add decoder for versions of Node not supporting CESU-8\n if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {\n this.decoder = InternalDecoderCesu8;\n this.defaultCharUnicode = iconv.defaultCharUnicode;\n }\n }\n}\n\nInternalCodec.prototype.encoder = InternalEncoder;\nInternalCodec.prototype.decoder = InternalDecoder;\n\n//------------------------------------------------------------------------------\n\n// We use node.js internal decoder. Its signature is the same as ours.\nvar StringDecoder = require('string_decoder').StringDecoder;\n\nif (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.\n StringDecoder.prototype.end = function() {};\n\n\nfunction InternalDecoder(options, codec) {\n this.decoder = new StringDecoder(codec.enc);\n}\n\nInternalDecoder.prototype.write = function(buf) {\n if (!Buffer.isBuffer(buf)) {\n buf = Buffer.from(buf);\n }\n\n return this.decoder.write(buf);\n}\n\nInternalDecoder.prototype.end = function() {\n return this.decoder.end();\n}\n\n\n//------------------------------------------------------------------------------\n// Encoder is mostly trivial\n\nfunction InternalEncoder(options, codec) {\n this.enc = codec.enc;\n}\n\nInternalEncoder.prototype.write = function(str) {\n return Buffer.from(str, this.enc);\n}\n\nInternalEncoder.prototype.end = function() {\n}\n\n\n//------------------------------------------------------------------------------\n// Except base64 encoder, which must keep its state.\n\nfunction InternalEncoderBase64(options, codec) {\n this.prevStr = '';\n}\n\nInternalEncoderBase64.prototype.write = function(str) {\n str = this.prevStr + str;\n var completeQuads = str.length - (str.length % 4);\n this.prevStr = str.slice(completeQuads);\n str = str.slice(0, completeQuads);\n\n return Buffer.from(str, \"base64\");\n}\n\nInternalEncoderBase64.prototype.end = function() {\n return Buffer.from(this.prevStr, \"base64\");\n}\n\n\n//------------------------------------------------------------------------------\n// CESU-8 encoder is also special.\n\nfunction InternalEncoderCesu8(options, codec) {\n}\n\nInternalEncoderCesu8.prototype.write = function(str) {\n var buf = Buffer.alloc(str.length * 3), bufIdx = 0;\n for (var i = 0; i < str.length; i++) {\n var charCode = str.charCodeAt(i);\n // Naive implementation, but it works because CESU-8 is especially easy\n // to convert from UTF-16 (which all JS strings are encoded in).\n if (charCode < 0x80)\n buf[bufIdx++] = charCode;\n else if (charCode < 0x800) {\n buf[bufIdx++] = 0xC0 + (charCode >>> 6);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n else { // charCode will always be < 0x10000 in javascript.\n buf[bufIdx++] = 0xE0 + (charCode >>> 12);\n buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n }\n return buf.slice(0, bufIdx);\n}\n\nInternalEncoderCesu8.prototype.end = function() {\n}\n\n//------------------------------------------------------------------------------\n// CESU-8 decoder is not implemented in Node v4.0+\n\nfunction InternalDecoderCesu8(options, codec) {\n this.acc = 0;\n this.contBytes = 0;\n this.accBytes = 0;\n this.defaultCharUnicode = codec.defaultCharUnicode;\n}\n\nInternalDecoderCesu8.prototype.write = function(buf) {\n var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, \n res = '';\n for (var i = 0; i < buf.length; i++) {\n var curByte = buf[i];\n if ((curByte & 0xC0) !== 0x80) { // Leading byte\n if (contBytes > 0) { // Previous code is invalid\n res += this.defaultCharUnicode;\n contBytes = 0;\n }\n\n if (curByte < 0x80) { // Single-byte code\n res += String.fromCharCode(curByte);\n } else if (curByte < 0xE0) { // Two-byte code\n acc = curByte & 0x1F;\n contBytes = 1; accBytes = 1;\n } else if (curByte < 0xF0) { // Three-byte code\n acc = curByte & 0x0F;\n contBytes = 2; accBytes = 1;\n } else { // Four or more are not supported for CESU-8.\n res += this.defaultCharUnicode;\n }\n } else { // Continuation byte\n if (contBytes > 0) { // We're waiting for it.\n acc = (acc << 6) | (curByte & 0x3f);\n contBytes--; accBytes++;\n if (contBytes === 0) {\n // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)\n if (accBytes === 2 && acc < 0x80 && acc > 0)\n res += this.defaultCharUnicode;\n else if (accBytes === 3 && acc < 0x800)\n res += this.defaultCharUnicode;\n else\n // Actually add character.\n res += String.fromCharCode(acc);\n }\n } else { // Unexpected continuation byte\n res += this.defaultCharUnicode;\n }\n }\n }\n this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;\n return res;\n}\n\nInternalDecoderCesu8.prototype.end = function() {\n var res = 0;\n if (this.contBytes > 0)\n res += this.defaultCharUnicode;\n return res;\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that\n// correspond to encoded bytes (if 128 - then lower half is ASCII). \n\nexports._sbcs = SBCSCodec;\nfunction SBCSCodec(codecOptions, iconv) {\n if (!codecOptions)\n throw new Error(\"SBCS codec is called without the data.\")\n \n // Prepare char buffer for decoding.\n if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))\n throw new Error(\"Encoding '\"+codecOptions.type+\"' has incorrect 'chars' (must be of len 128 or 256)\");\n \n if (codecOptions.chars.length === 128) {\n var asciiString = \"\";\n for (var i = 0; i < 128; i++)\n asciiString += String.fromCharCode(i);\n codecOptions.chars = asciiString + codecOptions.chars;\n }\n\n this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');\n \n // Encoding buffer.\n var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));\n\n for (var i = 0; i < codecOptions.chars.length; i++)\n encodeBuf[codecOptions.chars.charCodeAt(i)] = i;\n\n this.encodeBuf = encodeBuf;\n}\n\nSBCSCodec.prototype.encoder = SBCSEncoder;\nSBCSCodec.prototype.decoder = SBCSDecoder;\n\n\nfunction SBCSEncoder(options, codec) {\n this.encodeBuf = codec.encodeBuf;\n}\n\nSBCSEncoder.prototype.write = function(str) {\n var buf = Buffer.alloc(str.length);\n for (var i = 0; i < str.length; i++)\n buf[i] = this.encodeBuf[str.charCodeAt(i)];\n \n return buf;\n}\n\nSBCSEncoder.prototype.end = function() {\n}\n\n\nfunction SBCSDecoder(options, codec) {\n this.decodeBuf = codec.decodeBuf;\n}\n\nSBCSDecoder.prototype.write = function(buf) {\n // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.\n var decodeBuf = this.decodeBuf;\n var newBuf = Buffer.alloc(buf.length*2);\n var idx1 = 0, idx2 = 0;\n for (var i = 0; i < buf.length; i++) {\n idx1 = buf[i]*2; idx2 = i*2;\n newBuf[idx2] = decodeBuf[idx1];\n newBuf[idx2+1] = decodeBuf[idx1+1];\n }\n return newBuf.toString('ucs2');\n}\n\nSBCSDecoder.prototype.end = function() {\n}\n","\"use strict\";\n\n// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.\nmodule.exports = {\n \"437\": \"cp437\",\n \"737\": \"cp737\",\n \"775\": \"cp775\",\n \"850\": \"cp850\",\n \"852\": \"cp852\",\n \"855\": \"cp855\",\n \"856\": \"cp856\",\n \"857\": \"cp857\",\n \"858\": \"cp858\",\n \"860\": \"cp860\",\n \"861\": \"cp861\",\n \"862\": \"cp862\",\n \"863\": \"cp863\",\n \"864\": \"cp864\",\n \"865\": \"cp865\",\n \"866\": \"cp866\",\n \"869\": \"cp869\",\n \"874\": \"windows874\",\n \"922\": \"cp922\",\n \"1046\": \"cp1046\",\n \"1124\": \"cp1124\",\n \"1125\": \"cp1125\",\n \"1129\": \"cp1129\",\n \"1133\": \"cp1133\",\n \"1161\": \"cp1161\",\n \"1162\": \"cp1162\",\n \"1163\": \"cp1163\",\n \"1250\": \"windows1250\",\n \"1251\": \"windows1251\",\n \"1252\": \"windows1252\",\n \"1253\": \"windows1253\",\n \"1254\": \"windows1254\",\n \"1255\": \"windows1255\",\n \"1256\": \"windows1256\",\n \"1257\": \"windows1257\",\n \"1258\": \"windows1258\",\n \"28591\": \"iso88591\",\n \"28592\": \"iso88592\",\n \"28593\": \"iso88593\",\n \"28594\": \"iso88594\",\n \"28595\": \"iso88595\",\n \"28596\": \"iso88596\",\n \"28597\": \"iso88597\",\n \"28598\": \"iso88598\",\n \"28599\": \"iso88599\",\n \"28600\": \"iso885910\",\n \"28601\": \"iso885911\",\n \"28603\": \"iso885913\",\n \"28604\": \"iso885914\",\n \"28605\": \"iso885915\",\n \"28606\": \"iso885916\",\n \"windows874\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"win874\": \"windows874\",\n \"cp874\": \"windows874\",\n \"windows1250\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙\"\n },\n \"win1250\": \"windows1250\",\n \"cp1250\": \"windows1250\",\n \"windows1251\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"win1251\": \"windows1251\",\n \"cp1251\": \"windows1251\",\n \"windows1252\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"win1252\": \"windows1252\",\n \"cp1252\": \"windows1252\",\n \"windows1253\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�\"\n },\n \"win1253\": \"windows1253\",\n \"cp1253\": \"windows1253\",\n \"windows1254\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ\"\n },\n \"win1254\": \"windows1254\",\n \"cp1254\": \"windows1254\",\n \"windows1255\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�\"\n },\n \"win1255\": \"windows1255\",\n \"cp1255\": \"windows1255\",\n \"windows1256\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے\"\n },\n \"win1256\": \"windows1256\",\n \"cp1256\": \"windows1256\",\n \"windows1257\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙\"\n },\n \"win1257\": \"windows1257\",\n \"cp1257\": \"windows1257\",\n \"windows1258\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"win1258\": \"windows1258\",\n \"cp1258\": \"windows1258\",\n \"iso88591\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"cp28591\": \"iso88591\",\n \"iso88592\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙\"\n },\n \"cp28592\": \"iso88592\",\n \"iso88593\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙\"\n },\n \"cp28593\": \"iso88593\",\n \"iso88594\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙\"\n },\n \"cp28594\": \"iso88594\",\n \"iso88595\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ\"\n },\n \"cp28595\": \"iso88595\",\n \"iso88596\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������\"\n },\n \"cp28596\": \"iso88596\",\n \"iso88597\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�\"\n },\n \"cp28597\": \"iso88597\",\n \"iso88598\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�\"\n },\n \"cp28598\": \"iso88598\",\n \"iso88599\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ\"\n },\n \"cp28599\": \"iso88599\",\n \"iso885910\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ\"\n },\n \"cp28600\": \"iso885910\",\n \"iso885911\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"cp28601\": \"iso885911\",\n \"iso885913\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’\"\n },\n \"cp28603\": \"iso885913\",\n \"iso885914\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ\"\n },\n \"cp28604\": \"iso885914\",\n \"iso885915\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"cp28605\": \"iso885915\",\n \"iso885916\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ\"\n },\n \"cp28606\": \"iso885916\",\n \"cp437\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm437\": \"cp437\",\n \"csibm437\": \"cp437\",\n \"cp737\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ \"\n },\n \"ibm737\": \"cp737\",\n \"csibm737\": \"cp737\",\n \"cp775\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ \"\n },\n \"ibm775\": \"cp775\",\n \"csibm775\": \"cp775\",\n \"cp850\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm850\": \"cp850\",\n \"csibm850\": \"cp850\",\n \"cp852\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ \"\n },\n \"ibm852\": \"cp852\",\n \"csibm852\": \"cp852\",\n \"cp855\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ \"\n },\n \"ibm855\": \"cp855\",\n \"csibm855\": \"cp855\",\n \"cp856\": {\n \"type\": \"_sbcs\",\n \"chars\": \"אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm856\": \"cp856\",\n \"csibm856\": \"cp856\",\n \"cp857\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm857\": \"cp857\",\n \"csibm857\": \"cp857\",\n \"cp858\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm858\": \"cp858\",\n \"csibm858\": \"cp858\",\n \"cp860\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm860\": \"cp860\",\n \"csibm860\": \"cp860\",\n \"cp861\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm861\": \"cp861\",\n \"csibm861\": \"cp861\",\n \"cp862\": {\n \"type\": \"_sbcs\",\n \"chars\": \"אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm862\": \"cp862\",\n \"csibm862\": \"cp862\",\n \"cp863\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm863\": \"cp863\",\n \"csibm863\": \"cp863\",\n \"cp864\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\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 !\\\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�\"\n },\n \"ibm864\": \"cp864\",\n \"csibm864\": \"cp864\",\n \"cp865\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm865\": \"cp865\",\n \"csibm865\": \"cp865\",\n \"cp866\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ \"\n },\n \"ibm866\": \"cp866\",\n \"csibm866\": \"cp866\",\n \"cp869\": {\n \"type\": \"_sbcs\",\n \"chars\": \"������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ \"\n },\n \"ibm869\": \"cp869\",\n \"csibm869\": \"cp869\",\n \"cp922\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ\"\n },\n \"ibm922\": \"cp922\",\n \"csibm922\": \"cp922\",\n \"cp1046\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�\"\n },\n \"ibm1046\": \"cp1046\",\n \"csibm1046\": \"cp1046\",\n \"cp1124\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ\"\n },\n \"ibm1124\": \"cp1124\",\n \"csibm1124\": \"cp1124\",\n \"cp1125\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ \"\n },\n \"ibm1125\": \"cp1125\",\n \"csibm1125\": \"cp1125\",\n \"cp1129\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"ibm1129\": \"cp1129\",\n \"csibm1129\": \"cp1129\",\n \"cp1133\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�\"\n },\n \"ibm1133\": \"cp1133\",\n \"csibm1133\": \"cp1133\",\n \"cp1161\": {\n \"type\": \"_sbcs\",\n \"chars\": \"��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ \"\n },\n \"ibm1161\": \"cp1161\",\n \"csibm1161\": \"cp1161\",\n \"cp1162\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"ibm1162\": \"cp1162\",\n \"csibm1162\": \"cp1162\",\n \"cp1163\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"ibm1163\": \"cp1163\",\n \"csibm1163\": \"cp1163\",\n \"maccroatian\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ\"\n },\n \"maccyrillic\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤\"\n },\n \"macgreek\": {\n \"type\": \"_sbcs\",\n \"chars\": \"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�\"\n },\n \"maciceland\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macroman\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macromania\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macthai\": {\n \"type\": \"_sbcs\",\n \"chars\": \"«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����\"\n },\n \"macturkish\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macukraine\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤\"\n },\n \"koi8r\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8u\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8ru\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8t\": {\n \"type\": \"_sbcs\",\n \"chars\": \"қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"armscii8\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�\"\n },\n \"rk1048\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"tcvn\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000ÚỤ\\u0003ỪỬỮ\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010ỨỰỲỶỸÝỴ\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ\"\n },\n \"georgianacademy\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"georgianps\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"pt154\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"viscii\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000\\u0001Ẳ\\u0003\\u0004ẴẪ\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013Ỷ\\u0015\\u0016\\u0017\\u0018Ỹ\\u001a\\u001b\\u001c\\u001dỴ\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ\"\n },\n \"iso646cn\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\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 !\\\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"iso646jp\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\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 !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"hproman8\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�\"\n },\n \"macintosh\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"ascii\": {\n \"type\": \"_sbcs\",\n \"chars\": \"��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"tis620\": {\n \"type\": \"_sbcs\",\n \"chars\": \"���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n }\n}","\"use strict\";\n\n// Manually added data to be used by sbcs codec in addition to generated one.\n\nmodule.exports = {\n // Not supported by iconv, not sure why.\n \"10029\": \"maccenteuro\",\n \"maccenteuro\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ\"\n },\n\n \"808\": \"cp808\",\n \"ibm808\": \"cp808\",\n \"cp808\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ \"\n },\n\n \"mik\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n\n \"cp720\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\x80\\x81éâ\\x84à\\x86çêëèïî\\x8d\\x8e\\x8f\\x90\\u0651\\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\\u064b\\u064c\\u064d\\u064e\\u064f\\u0650≈°∙·√ⁿ²■\\u00a0\"\n },\n\n // Aliases of generated encodings.\n \"ascii8bit\": \"ascii\",\n \"usascii\": \"ascii\",\n \"ansix34\": \"ascii\",\n \"ansix341968\": \"ascii\",\n \"ansix341986\": \"ascii\",\n \"csascii\": \"ascii\",\n \"cp367\": \"ascii\",\n \"ibm367\": \"ascii\",\n \"isoir6\": \"ascii\",\n \"iso646us\": \"ascii\",\n \"iso646irv\": \"ascii\",\n \"us\": \"ascii\",\n\n \"latin1\": \"iso88591\",\n \"latin2\": \"iso88592\",\n \"latin3\": \"iso88593\",\n \"latin4\": \"iso88594\",\n \"latin5\": \"iso88599\",\n \"latin6\": \"iso885910\",\n \"latin7\": \"iso885913\",\n \"latin8\": \"iso885914\",\n \"latin9\": \"iso885915\",\n \"latin10\": \"iso885916\",\n\n \"csisolatin1\": \"iso88591\",\n \"csisolatin2\": \"iso88592\",\n \"csisolatin3\": \"iso88593\",\n \"csisolatin4\": \"iso88594\",\n \"csisolatincyrillic\": \"iso88595\",\n \"csisolatinarabic\": \"iso88596\",\n \"csisolatingreek\" : \"iso88597\",\n \"csisolatinhebrew\": \"iso88598\",\n \"csisolatin5\": \"iso88599\",\n \"csisolatin6\": \"iso885910\",\n\n \"l1\": \"iso88591\",\n \"l2\": \"iso88592\",\n \"l3\": \"iso88593\",\n \"l4\": \"iso88594\",\n \"l5\": \"iso88599\",\n \"l6\": \"iso885910\",\n \"l7\": \"iso885913\",\n \"l8\": \"iso885914\",\n \"l9\": \"iso885915\",\n \"l10\": \"iso885916\",\n\n \"isoir14\": \"iso646jp\",\n \"isoir57\": \"iso646cn\",\n \"isoir100\": \"iso88591\",\n \"isoir101\": \"iso88592\",\n \"isoir109\": \"iso88593\",\n \"isoir110\": \"iso88594\",\n \"isoir144\": \"iso88595\",\n \"isoir127\": \"iso88596\",\n \"isoir126\": \"iso88597\",\n \"isoir138\": \"iso88598\",\n \"isoir148\": \"iso88599\",\n \"isoir157\": \"iso885910\",\n \"isoir166\": \"tis620\",\n \"isoir179\": \"iso885913\",\n \"isoir199\": \"iso885914\",\n \"isoir203\": \"iso885915\",\n \"isoir226\": \"iso885916\",\n\n \"cp819\": \"iso88591\",\n \"ibm819\": \"iso88591\",\n\n \"cyrillic\": \"iso88595\",\n\n \"arabic\": \"iso88596\",\n \"arabic8\": \"iso88596\",\n \"ecma114\": \"iso88596\",\n \"asmo708\": \"iso88596\",\n\n \"greek\" : \"iso88597\",\n \"greek8\" : \"iso88597\",\n \"ecma118\" : \"iso88597\",\n \"elot928\" : \"iso88597\",\n\n \"hebrew\": \"iso88598\",\n \"hebrew8\": \"iso88598\",\n\n \"turkish\": \"iso88599\",\n \"turkish8\": \"iso88599\",\n\n \"thai\": \"iso885911\",\n \"thai8\": \"iso885911\",\n\n \"celtic\": \"iso885914\",\n \"celtic8\": \"iso885914\",\n \"isoceltic\": \"iso885914\",\n\n \"tis6200\": \"tis620\",\n \"tis62025291\": \"tis620\",\n \"tis62025330\": \"tis620\",\n\n \"10000\": \"macroman\",\n \"10006\": \"macgreek\",\n \"10007\": \"maccyrillic\",\n \"10079\": \"maciceland\",\n \"10081\": \"macturkish\",\n\n \"cspc8codepage437\": \"cp437\",\n \"cspc775baltic\": \"cp775\",\n \"cspc850multilingual\": \"cp850\",\n \"cspcp852\": \"cp852\",\n \"cspc862latinhebrew\": \"cp862\",\n \"cpgr\": \"cp869\",\n\n \"msee\": \"cp1250\",\n \"mscyrl\": \"cp1251\",\n \"msansi\": \"cp1252\",\n \"msgreek\": \"cp1253\",\n \"msturk\": \"cp1254\",\n \"mshebr\": \"cp1255\",\n \"msarab\": \"cp1256\",\n \"winbaltrim\": \"cp1257\",\n\n \"cp20866\": \"koi8r\",\n \"20866\": \"koi8r\",\n \"ibm878\": \"koi8r\",\n \"cskoi8r\": \"koi8r\",\n\n \"cp21866\": \"koi8u\",\n \"21866\": \"koi8u\",\n \"ibm1168\": \"koi8u\",\n\n \"strk10482002\": \"rk1048\",\n\n \"tcvn5712\": \"tcvn\",\n \"tcvn57121\": \"tcvn\",\n\n \"gb198880\": \"iso646cn\",\n \"cn\": \"iso646cn\",\n\n \"csiso14jisc6220ro\": \"iso646jp\",\n \"jisc62201969ro\": \"iso646jp\",\n \"jp\": \"iso646jp\",\n\n \"cshproman8\": \"hproman8\",\n \"r8\": \"hproman8\",\n \"roman8\": \"hproman8\",\n \"xroman8\": \"hproman8\",\n \"ibm1051\": \"hproman8\",\n\n \"mac\": \"macintosh\",\n \"csmacintosh\": \"macintosh\",\n};\n\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js\n\n// == UTF16-BE codec. ==========================================================\n\nexports.utf16be = Utf16BECodec;\nfunction Utf16BECodec() {\n}\n\nUtf16BECodec.prototype.encoder = Utf16BEEncoder;\nUtf16BECodec.prototype.decoder = Utf16BEDecoder;\nUtf16BECodec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nfunction Utf16BEEncoder() {\n}\n\nUtf16BEEncoder.prototype.write = function(str) {\n var buf = Buffer.from(str, 'ucs2');\n for (var i = 0; i < buf.length; i += 2) {\n var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;\n }\n return buf;\n}\n\nUtf16BEEncoder.prototype.end = function() {\n}\n\n\n// -- Decoding\n\nfunction Utf16BEDecoder() {\n this.overflowByte = -1;\n}\n\nUtf16BEDecoder.prototype.write = function(buf) {\n if (buf.length == 0)\n return '';\n\n var buf2 = Buffer.alloc(buf.length + 1),\n i = 0, j = 0;\n\n if (this.overflowByte !== -1) {\n buf2[0] = buf[0];\n buf2[1] = this.overflowByte;\n i = 1; j = 2;\n }\n\n for (; i < buf.length-1; i += 2, j+= 2) {\n buf2[j] = buf[i+1];\n buf2[j+1] = buf[i];\n }\n\n this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;\n\n return buf2.slice(0, j).toString('ucs2');\n}\n\nUtf16BEDecoder.prototype.end = function() {\n this.overflowByte = -1;\n}\n\n\n// == UTF-16 codec =============================================================\n// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.\n// Defaults to UTF-16LE, as it's prevalent and default in Node.\n// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le\n// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});\n\n// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).\n\nexports.utf16 = Utf16Codec;\nfunction Utf16Codec(codecOptions, iconv) {\n this.iconv = iconv;\n}\n\nUtf16Codec.prototype.encoder = Utf16Encoder;\nUtf16Codec.prototype.decoder = Utf16Decoder;\n\n\n// -- Encoding (pass-through)\n\nfunction Utf16Encoder(options, codec) {\n options = options || {};\n if (options.addBOM === undefined)\n options.addBOM = true;\n this.encoder = codec.iconv.getEncoder('utf-16le', options);\n}\n\nUtf16Encoder.prototype.write = function(str) {\n return this.encoder.write(str);\n}\n\nUtf16Encoder.prototype.end = function() {\n return this.encoder.end();\n}\n\n\n// -- Decoding\n\nfunction Utf16Decoder(options, codec) {\n this.decoder = null;\n this.initialBufs = [];\n this.initialBufsLen = 0;\n\n this.options = options || {};\n this.iconv = codec.iconv;\n}\n\nUtf16Decoder.prototype.write = function(buf) {\n if (!this.decoder) {\n // Codec is not chosen yet. Accumulate initial bytes.\n this.initialBufs.push(buf);\n this.initialBufsLen += buf.length;\n \n if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below)\n return '';\n\n // We have enough bytes -> detect endianness.\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n\n return this.decoder.write(buf);\n}\n\nUtf16Decoder.prototype.end = function() {\n if (!this.decoder) {\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n var trail = this.decoder.end();\n if (trail)\n resStr += trail;\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n return this.decoder.end();\n}\n\nfunction detectEncoding(bufs, defaultEncoding) {\n var b = [];\n var charsProcessed = 0;\n var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE.\n\n outer_loop:\n for (var i = 0; i < bufs.length; i++) {\n var buf = bufs[i];\n for (var j = 0; j < buf.length; j++) {\n b.push(buf[j]);\n if (b.length === 2) {\n if (charsProcessed === 0) {\n // Check BOM first.\n if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le';\n if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be';\n }\n\n if (b[0] === 0 && b[1] !== 0) asciiCharsBE++;\n if (b[0] !== 0 && b[1] === 0) asciiCharsLE++;\n\n b.length = 0;\n charsProcessed++;\n\n if (charsProcessed >= 100) {\n break outer_loop;\n }\n }\n }\n }\n\n // Make decisions.\n // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.\n // So, we count ASCII as if it was LE or BE, and decide from that.\n if (asciiCharsBE > asciiCharsLE) return 'utf-16be';\n if (asciiCharsBE < asciiCharsLE) return 'utf-16le';\n\n // Couldn't decide (likely all zeros or not enough data).\n return defaultEncoding || 'utf-16le';\n}\n\n\n","'use strict';\n\nvar Buffer = require('safer-buffer').Buffer;\n\n// == UTF32-LE/BE codec. ==========================================================\n\nexports._utf32 = Utf32Codec;\n\nfunction Utf32Codec(codecOptions, iconv) {\n this.iconv = iconv;\n this.bomAware = true;\n this.isLE = codecOptions.isLE;\n}\n\nexports.utf32le = { type: '_utf32', isLE: true };\nexports.utf32be = { type: '_utf32', isLE: false };\n\n// Aliases\nexports.ucs4le = 'utf32le';\nexports.ucs4be = 'utf32be';\n\nUtf32Codec.prototype.encoder = Utf32Encoder;\nUtf32Codec.prototype.decoder = Utf32Decoder;\n\n// -- Encoding\n\nfunction Utf32Encoder(options, codec) {\n this.isLE = codec.isLE;\n this.highSurrogate = 0;\n}\n\nUtf32Encoder.prototype.write = function(str) {\n var src = Buffer.from(str, 'ucs2');\n var dst = Buffer.alloc(src.length * 2);\n var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE;\n var offset = 0;\n\n for (var i = 0; i < src.length; i += 2) {\n var code = src.readUInt16LE(i);\n var isHighSurrogate = (0xD800 <= code && code < 0xDC00);\n var isLowSurrogate = (0xDC00 <= code && code < 0xE000);\n\n if (this.highSurrogate) {\n if (isHighSurrogate || !isLowSurrogate) {\n // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low\n // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character\n // (technically wrong, but expected by some applications, like Windows file names).\n write32.call(dst, this.highSurrogate, offset);\n offset += 4;\n }\n else {\n // Create 32-bit value from high and low surrogates;\n var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000;\n\n write32.call(dst, codepoint, offset);\n offset += 4;\n this.highSurrogate = 0;\n\n continue;\n }\n }\n\n if (isHighSurrogate)\n this.highSurrogate = code;\n else {\n // Even if the current character is a low surrogate, with no previous high surrogate, we'll\n // encode it as a semi-invalid stand-alone character for the same reasons expressed above for\n // unpaired high surrogates.\n write32.call(dst, code, offset);\n offset += 4;\n this.highSurrogate = 0;\n }\n }\n\n if (offset < dst.length)\n dst = dst.slice(0, offset);\n\n return dst;\n};\n\nUtf32Encoder.prototype.end = function() {\n // Treat any leftover high surrogate as a semi-valid independent character.\n if (!this.highSurrogate)\n return;\n\n var buf = Buffer.alloc(4);\n\n if (this.isLE)\n buf.writeUInt32LE(this.highSurrogate, 0);\n else\n buf.writeUInt32BE(this.highSurrogate, 0);\n\n this.highSurrogate = 0;\n\n return buf;\n};\n\n// -- Decoding\n\nfunction Utf32Decoder(options, codec) {\n this.isLE = codec.isLE;\n this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0);\n this.overflow = [];\n}\n\nUtf32Decoder.prototype.write = function(src) {\n if (src.length === 0)\n return '';\n\n var i = 0;\n var codepoint = 0;\n var dst = Buffer.alloc(src.length + 4);\n var offset = 0;\n var isLE = this.isLE;\n var overflow = this.overflow;\n var badChar = this.badChar;\n\n if (overflow.length > 0) {\n for (; i < src.length && overflow.length < 4; i++)\n overflow.push(src[i]);\n \n if (overflow.length === 4) {\n // NOTE: codepoint is a signed int32 and can be negative.\n // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).\n if (isLE) {\n codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24);\n } else {\n codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24);\n }\n overflow.length = 0;\n\n offset = _writeCodepoint(dst, offset, codepoint, badChar);\n }\n }\n\n // Main loop. Should be as optimized as possible.\n for (; i < src.length - 3; i += 4) {\n // NOTE: codepoint is a signed int32 and can be negative.\n if (isLE) {\n codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24);\n } else {\n codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24);\n }\n offset = _writeCodepoint(dst, offset, codepoint, badChar);\n }\n\n // Keep overflowing bytes.\n for (; i < src.length; i++) {\n overflow.push(src[i]);\n }\n\n return dst.slice(0, offset).toString('ucs2');\n};\n\nfunction _writeCodepoint(dst, offset, codepoint, badChar) {\n // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations.\n if (codepoint < 0 || codepoint > 0x10FFFF) {\n // Not a valid Unicode codepoint\n codepoint = badChar;\n } \n\n // Ephemeral Planes: Write high surrogate.\n if (codepoint >= 0x10000) {\n codepoint -= 0x10000;\n\n var high = 0xD800 | (codepoint >> 10);\n dst[offset++] = high & 0xff;\n dst[offset++] = high >> 8;\n\n // Low surrogate is written below.\n var codepoint = 0xDC00 | (codepoint & 0x3FF);\n }\n\n // Write BMP char or low surrogate.\n dst[offset++] = codepoint & 0xff;\n dst[offset++] = codepoint >> 8;\n\n return offset;\n};\n\nUtf32Decoder.prototype.end = function() {\n this.overflow.length = 0;\n};\n\n// == UTF-32 Auto codec =============================================================\n// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.\n// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32\n// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'});\n\n// Encoder prepends BOM (which can be overridden with (addBOM: false}).\n\nexports.utf32 = Utf32AutoCodec;\nexports.ucs4 = 'utf32';\n\nfunction Utf32AutoCodec(options, iconv) {\n this.iconv = iconv;\n}\n\nUtf32AutoCodec.prototype.encoder = Utf32AutoEncoder;\nUtf32AutoCodec.prototype.decoder = Utf32AutoDecoder;\n\n// -- Encoding\n\nfunction Utf32AutoEncoder(options, codec) {\n options = options || {};\n\n if (options.addBOM === undefined)\n options.addBOM = true;\n\n this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options);\n}\n\nUtf32AutoEncoder.prototype.write = function(str) {\n return this.encoder.write(str);\n};\n\nUtf32AutoEncoder.prototype.end = function() {\n return this.encoder.end();\n};\n\n// -- Decoding\n\nfunction Utf32AutoDecoder(options, codec) {\n this.decoder = null;\n this.initialBufs = [];\n this.initialBufsLen = 0;\n this.options = options || {};\n this.iconv = codec.iconv;\n}\n\nUtf32AutoDecoder.prototype.write = function(buf) {\n if (!this.decoder) { \n // Codec is not chosen yet. Accumulate initial bytes.\n this.initialBufs.push(buf);\n this.initialBufsLen += buf.length;\n\n if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below)\n return '';\n\n // We have enough bytes -> detect endianness.\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n\n return this.decoder.write(buf);\n};\n\nUtf32AutoDecoder.prototype.end = function() {\n if (!this.decoder) {\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n var trail = this.decoder.end();\n if (trail)\n resStr += trail;\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n\n return this.decoder.end();\n};\n\nfunction detectEncoding(bufs, defaultEncoding) {\n var b = [];\n var charsProcessed = 0;\n var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE.\n var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE.\n\n outer_loop:\n for (var i = 0; i < bufs.length; i++) {\n var buf = bufs[i];\n for (var j = 0; j < buf.length; j++) {\n b.push(buf[j]);\n if (b.length === 4) {\n if (charsProcessed === 0) {\n // Check BOM first.\n if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) {\n return 'utf-32le';\n }\n if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) {\n return 'utf-32be';\n }\n }\n\n if (b[0] !== 0 || b[1] > 0x10) invalidBE++;\n if (b[3] !== 0 || b[2] > 0x10) invalidLE++;\n\n if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++;\n if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++;\n\n b.length = 0;\n charsProcessed++;\n\n if (charsProcessed >= 100) {\n break outer_loop;\n }\n }\n }\n }\n\n // Make decisions.\n if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be';\n if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le';\n\n // Couldn't decide (likely all zeros or not enough data).\n return defaultEncoding || 'utf-32le';\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152\n// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3\n\nexports.utf7 = Utf7Codec;\nexports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7\nfunction Utf7Codec(codecOptions, iconv) {\n this.iconv = iconv;\n};\n\nUtf7Codec.prototype.encoder = Utf7Encoder;\nUtf7Codec.prototype.decoder = Utf7Decoder;\nUtf7Codec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nvar nonDirectChars = /[^A-Za-z0-9'\\(\\),-\\.\\/:\\? \\n\\r\\t]+/g;\n\nfunction Utf7Encoder(options, codec) {\n this.iconv = codec.iconv;\n}\n\nUtf7Encoder.prototype.write = function(str) {\n // Naive implementation.\n // Non-direct chars are encoded as \"+-\"; single \"+\" char is encoded as \"+-\".\n return Buffer.from(str.replace(nonDirectChars, function(chunk) {\n return \"+\" + (chunk === '+' ? '' : \n this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) \n + \"-\";\n }.bind(this)));\n}\n\nUtf7Encoder.prototype.end = function() {\n}\n\n\n// -- Decoding\n\nfunction Utf7Decoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = '';\n}\n\nvar base64Regex = /[A-Za-z0-9\\/+]/;\nvar base64Chars = [];\nfor (var i = 0; i < 256; i++)\n base64Chars[i] = base64Regex.test(String.fromCharCode(i));\n\nvar plusChar = '+'.charCodeAt(0), \n minusChar = '-'.charCodeAt(0),\n andChar = '&'.charCodeAt(0);\n\nUtf7Decoder.prototype.write = function(buf) {\n var res = \"\", lastI = 0,\n inBase64 = this.inBase64,\n base64Accum = this.base64Accum;\n\n // The decoder is more involved as we must handle chunks in stream.\n\n for (var i = 0; i < buf.length; i++) {\n if (!inBase64) { // We're in direct mode.\n // Write direct chars until '+'\n if (buf[i] == plusChar) {\n res += this.iconv.decode(buf.slice(lastI, i), \"ascii\"); // Write direct chars.\n lastI = i+1;\n inBase64 = true;\n }\n } else { // We decode base64.\n if (!base64Chars[buf[i]]) { // Base64 ended.\n if (i == lastI && buf[i] == minusChar) {// \"+-\" -> \"+\"\n res += \"+\";\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), \"ascii\");\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n if (buf[i] != minusChar) // Minus is absorbed after base64.\n i--;\n\n lastI = i+1;\n inBase64 = false;\n base64Accum = '';\n }\n }\n }\n\n if (!inBase64) {\n res += this.iconv.decode(buf.slice(lastI), \"ascii\"); // Write direct chars.\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), \"ascii\");\n\n var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.\n base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.\n b64str = b64str.slice(0, canBeDecoded);\n\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n this.inBase64 = inBase64;\n this.base64Accum = base64Accum;\n\n return res;\n}\n\nUtf7Decoder.prototype.end = function() {\n var res = \"\";\n if (this.inBase64 && this.base64Accum.length > 0)\n res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), \"utf16-be\");\n\n this.inBase64 = false;\n this.base64Accum = '';\n return res;\n}\n\n\n// UTF-7-IMAP codec.\n// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)\n// Differences:\n// * Base64 part is started by \"&\" instead of \"+\"\n// * Direct characters are 0x20-0x7E, except \"&\" (0x26)\n// * In Base64, \",\" is used instead of \"/\"\n// * Base64 must not be used to represent direct characters.\n// * No implicit shift back from Base64 (should always end with '-')\n// * String must end in non-shifted position.\n// * \"-&\" while in base64 is not allowed.\n\n\nexports.utf7imap = Utf7IMAPCodec;\nfunction Utf7IMAPCodec(codecOptions, iconv) {\n this.iconv = iconv;\n};\n\nUtf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;\nUtf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;\nUtf7IMAPCodec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nfunction Utf7IMAPEncoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = Buffer.alloc(6);\n this.base64AccumIdx = 0;\n}\n\nUtf7IMAPEncoder.prototype.write = function(str) {\n var inBase64 = this.inBase64,\n base64Accum = this.base64Accum,\n base64AccumIdx = this.base64AccumIdx,\n buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0;\n\n for (var i = 0; i < str.length; i++) {\n var uChar = str.charCodeAt(i);\n if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.\n if (inBase64) {\n if (base64AccumIdx > 0) {\n bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\\//g, ',').replace(/=+$/, ''), bufIdx);\n base64AccumIdx = 0;\n }\n\n buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.\n inBase64 = false;\n }\n\n if (!inBase64) {\n buf[bufIdx++] = uChar; // Write direct character\n\n if (uChar === andChar) // Ampersand -> '&-'\n buf[bufIdx++] = minusChar;\n }\n\n } else { // Non-direct character\n if (!inBase64) {\n buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.\n inBase64 = true;\n }\n if (inBase64) {\n base64Accum[base64AccumIdx++] = uChar >> 8;\n base64Accum[base64AccumIdx++] = uChar & 0xFF;\n\n if (base64AccumIdx == base64Accum.length) {\n bufIdx += buf.write(base64Accum.toString('base64').replace(/\\//g, ','), bufIdx);\n base64AccumIdx = 0;\n }\n }\n }\n }\n\n this.inBase64 = inBase64;\n this.base64AccumIdx = base64AccumIdx;\n\n return buf.slice(0, bufIdx);\n}\n\nUtf7IMAPEncoder.prototype.end = function() {\n var buf = Buffer.alloc(10), bufIdx = 0;\n if (this.inBase64) {\n if (this.base64AccumIdx > 0) {\n bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\\//g, ',').replace(/=+$/, ''), bufIdx);\n this.base64AccumIdx = 0;\n }\n\n buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.\n this.inBase64 = false;\n }\n\n return buf.slice(0, bufIdx);\n}\n\n\n// -- Decoding\n\nfunction Utf7IMAPDecoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = '';\n}\n\nvar base64IMAPChars = base64Chars.slice();\nbase64IMAPChars[','.charCodeAt(0)] = true;\n\nUtf7IMAPDecoder.prototype.write = function(buf) {\n var res = \"\", lastI = 0,\n inBase64 = this.inBase64,\n base64Accum = this.base64Accum;\n\n // The decoder is more involved as we must handle chunks in stream.\n // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).\n\n for (var i = 0; i < buf.length; i++) {\n if (!inBase64) { // We're in direct mode.\n // Write direct chars until '&'\n if (buf[i] == andChar) {\n res += this.iconv.decode(buf.slice(lastI, i), \"ascii\"); // Write direct chars.\n lastI = i+1;\n inBase64 = true;\n }\n } else { // We decode base64.\n if (!base64IMAPChars[buf[i]]) { // Base64 ended.\n if (i == lastI && buf[i] == minusChar) { // \"&-\" -> \"&\"\n res += \"&\";\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), \"ascii\").replace(/,/g, '/');\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n if (buf[i] != minusChar) // Minus may be absorbed after base64.\n i--;\n\n lastI = i+1;\n inBase64 = false;\n base64Accum = '';\n }\n }\n }\n\n if (!inBase64) {\n res += this.iconv.decode(buf.slice(lastI), \"ascii\"); // Write direct chars.\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), \"ascii\").replace(/,/g, '/');\n\n var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.\n base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.\n b64str = b64str.slice(0, canBeDecoded);\n\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n this.inBase64 = inBase64;\n this.base64Accum = base64Accum;\n\n return res;\n}\n\nUtf7IMAPDecoder.prototype.end = function() {\n var res = \"\";\n if (this.inBase64 && this.base64Accum.length > 0)\n res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), \"utf16-be\");\n\n this.inBase64 = false;\n this.base64Accum = '';\n return res;\n}\n\n\n","\"use strict\";\n\nvar BOMChar = '\\uFEFF';\n\nexports.PrependBOM = PrependBOMWrapper\nfunction PrependBOMWrapper(encoder, options) {\n this.encoder = encoder;\n this.addBOM = true;\n}\n\nPrependBOMWrapper.prototype.write = function(str) {\n if (this.addBOM) {\n str = BOMChar + str;\n this.addBOM = false;\n }\n\n return this.encoder.write(str);\n}\n\nPrependBOMWrapper.prototype.end = function() {\n return this.encoder.end();\n}\n\n\n//------------------------------------------------------------------------------\n\nexports.StripBOM = StripBOMWrapper;\nfunction StripBOMWrapper(decoder, options) {\n this.decoder = decoder;\n this.pass = false;\n this.options = options || {};\n}\n\nStripBOMWrapper.prototype.write = function(buf) {\n var res = this.decoder.write(buf);\n if (this.pass || !res)\n return res;\n\n if (res[0] === BOMChar) {\n res = res.slice(1);\n if (typeof this.options.stripBOM === 'function')\n this.options.stripBOM();\n }\n\n this.pass = true;\n return res;\n}\n\nStripBOMWrapper.prototype.end = function() {\n return this.decoder.end();\n}\n\n","\"use strict\";\n\nvar Buffer = require(\"safer-buffer\").Buffer;\n\nvar bomHandling = require(\"./bom-handling\"),\n iconv = module.exports;\n\n// All codecs and aliases are kept here, keyed by encoding name/alias.\n// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.\niconv.encodings = null;\n\n// Characters emitted in case of error.\niconv.defaultCharUnicode = '�';\niconv.defaultCharSingleByte = '?';\n\n// Public API.\niconv.encode = function encode(str, encoding, options) {\n str = \"\" + (str || \"\"); // Ensure string.\n\n var encoder = iconv.getEncoder(encoding, options);\n\n var res = encoder.write(str);\n var trail = encoder.end();\n \n return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;\n}\n\niconv.decode = function decode(buf, encoding, options) {\n if (typeof buf === 'string') {\n if (!iconv.skipDecodeWarning) {\n console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');\n iconv.skipDecodeWarning = true;\n }\n\n buf = Buffer.from(\"\" + (buf || \"\"), \"binary\"); // Ensure buffer.\n }\n\n var decoder = iconv.getDecoder(encoding, options);\n\n var res = decoder.write(buf);\n var trail = decoder.end();\n\n return trail ? (res + trail) : res;\n}\n\niconv.encodingExists = function encodingExists(enc) {\n try {\n iconv.getCodec(enc);\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// Legacy aliases to convert functions\niconv.toEncoding = iconv.encode;\niconv.fromEncoding = iconv.decode;\n\n// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.\niconv._codecDataCache = {};\niconv.getCodec = function getCodec(encoding) {\n if (!iconv.encodings)\n iconv.encodings = require(\"../encodings\"); // Lazy load all encoding definitions.\n \n // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.\n var enc = iconv._canonicalizeEncoding(encoding);\n\n // Traverse iconv.encodings to find actual codec.\n var codecOptions = {};\n while (true) {\n var codec = iconv._codecDataCache[enc];\n if (codec)\n return codec;\n\n var codecDef = iconv.encodings[enc];\n\n switch (typeof codecDef) {\n case \"string\": // Direct alias to other encoding.\n enc = codecDef;\n break;\n\n case \"object\": // Alias with options. Can be layered.\n for (var key in codecDef)\n codecOptions[key] = codecDef[key];\n\n if (!codecOptions.encodingName)\n codecOptions.encodingName = enc;\n \n enc = codecDef.type;\n break;\n\n case \"function\": // Codec itself.\n if (!codecOptions.encodingName)\n codecOptions.encodingName = enc;\n\n // The codec function must load all tables and return object with .encoder and .decoder methods.\n // It'll be called only once (for each different options object).\n codec = new codecDef(codecOptions, iconv);\n\n iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.\n return codec;\n\n default:\n throw new Error(\"Encoding not recognized: '\" + encoding + \"' (searched as: '\"+enc+\"')\");\n }\n }\n}\n\niconv._canonicalizeEncoding = function(encoding) {\n // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.\n return (''+encoding).toLowerCase().replace(/:\\d{4}$|[^0-9a-z]/g, \"\");\n}\n\niconv.getEncoder = function getEncoder(encoding, options) {\n var codec = iconv.getCodec(encoding),\n encoder = new codec.encoder(options, codec);\n\n if (codec.bomAware && options && options.addBOM)\n encoder = new bomHandling.PrependBOM(encoder, options);\n\n return encoder;\n}\n\niconv.getDecoder = function getDecoder(encoding, options) {\n var codec = iconv.getCodec(encoding),\n decoder = new codec.decoder(options, codec);\n\n if (codec.bomAware && !(options && options.stripBOM === false))\n decoder = new bomHandling.StripBOM(decoder, options);\n\n return decoder;\n}\n\n// Streaming API\n// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add\n// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default.\n// If you would like to enable it explicitly, please add the following code to your app:\n// > iconv.enableStreamingAPI(require('stream'));\niconv.enableStreamingAPI = function enableStreamingAPI(stream_module) {\n if (iconv.supportsStreams)\n return;\n\n // Dependency-inject stream module to create IconvLite stream classes.\n var streams = require(\"./streams\")(stream_module);\n\n // Not public API yet, but expose the stream classes.\n iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;\n iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;\n\n // Streaming API.\n iconv.encodeStream = function encodeStream(encoding, options) {\n return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);\n }\n\n iconv.decodeStream = function decodeStream(encoding, options) {\n return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);\n }\n\n iconv.supportsStreams = true;\n}\n\n// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments).\nvar stream_module;\ntry {\n stream_module = require(\"stream\");\n} catch (e) {}\n\nif (stream_module && stream_module.Transform) {\n iconv.enableStreamingAPI(stream_module);\n\n} else {\n // In rare cases where 'stream' module is not available by default, throw a helpful exception.\n iconv.encodeStream = iconv.decodeStream = function() {\n throw new Error(\"iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.\");\n };\n}\n\nif (\"Ā\" != \"\\u0100\") {\n console.error(\"iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.\");\n}\n","\"use strict\";\n\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), \n// we opt to dependency-inject it instead of creating a hard dependency.\nmodule.exports = function(stream_module) {\n var Transform = stream_module.Transform;\n\n // == Encoder stream =======================================================\n\n function IconvLiteEncoderStream(conv, options) {\n this.conv = conv;\n options = options || {};\n options.decodeStrings = false; // We accept only strings, so we don't need to decode them.\n Transform.call(this, options);\n }\n\n IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {\n constructor: { value: IconvLiteEncoderStream }\n });\n\n IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {\n if (typeof chunk != 'string')\n return done(new Error(\"Iconv encoding stream needs strings as its input.\"));\n try {\n var res = this.conv.write(chunk);\n if (res && res.length) this.push(res);\n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteEncoderStream.prototype._flush = function(done) {\n try {\n var res = this.conv.end();\n if (res && res.length) this.push(res);\n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteEncoderStream.prototype.collect = function(cb) {\n var chunks = [];\n this.on('error', cb);\n this.on('data', function(chunk) { chunks.push(chunk); });\n this.on('end', function() {\n cb(null, Buffer.concat(chunks));\n });\n return this;\n }\n\n\n // == Decoder stream =======================================================\n\n function IconvLiteDecoderStream(conv, options) {\n this.conv = conv;\n options = options || {};\n options.encoding = this.encoding = 'utf8'; // We output strings.\n Transform.call(this, options);\n }\n\n IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {\n constructor: { value: IconvLiteDecoderStream }\n });\n\n IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {\n if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array))\n return done(new Error(\"Iconv decoding stream needs buffers as its input.\"));\n try {\n var res = this.conv.write(chunk);\n if (res && res.length) this.push(res, this.encoding);\n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteDecoderStream.prototype._flush = function(done) {\n try {\n var res = this.conv.end();\n if (res && res.length) this.push(res, this.encoding); \n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteDecoderStream.prototype.collect = function(cb) {\n var res = '';\n this.on('error', cb);\n this.on('data', function(chunk) { res += chunk; });\n this.on('end', function() {\n cb(null, res);\n });\n return this;\n }\n\n return {\n IconvLiteEncoderStream: IconvLiteEncoderStream,\n IconvLiteDecoderStream: IconvLiteDecoderStream,\n };\n};\n","/*!\n * mime-db\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015-2022 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module exports.\n */\n\nmodule.exports = require('./db.json')\n","/*!\n * mime-types\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar db = require('mime-db')\nvar extname = require('path').extname\n\n/**\n * Module variables.\n * @private\n */\n\nvar EXTRACT_TYPE_REGEXP = /^\\s*([^;\\s]*)(?:;|\\s|$)/\nvar TEXT_TYPE_REGEXP = /^text\\//i\n\n/**\n * Module exports.\n * @public\n */\n\nexports.charset = charset\nexports.charsets = { lookup: charset }\nexports.contentType = contentType\nexports.extension = extension\nexports.extensions = Object.create(null)\nexports.lookup = lookup\nexports.types = Object.create(null)\n\n// Populate the extensions/types maps\npopulateMaps(exports.extensions, exports.types)\n\n/**\n * Get the default charset for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction charset (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n var mime = match && db[match[1].toLowerCase()]\n\n if (mime && mime.charset) {\n return mime.charset\n }\n\n // default text/* to utf-8\n if (match && TEXT_TYPE_REGEXP.test(match[1])) {\n return 'UTF-8'\n }\n\n return false\n}\n\n/**\n * Create a full Content-Type header given a MIME type or extension.\n *\n * @param {string} str\n * @return {boolean|string}\n */\n\nfunction contentType (str) {\n // TODO: should this even be in this module?\n if (!str || typeof str !== 'string') {\n return false\n }\n\n var mime = str.indexOf('/') === -1\n ? exports.lookup(str)\n : str\n\n if (!mime) {\n return false\n }\n\n // TODO: use content-type or other module\n if (mime.indexOf('charset') === -1) {\n var charset = exports.charset(mime)\n if (charset) mime += '; charset=' + charset.toLowerCase()\n }\n\n return mime\n}\n\n/**\n * Get the default extension for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction extension (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n\n // get extensions\n var exts = match && exports.extensions[match[1].toLowerCase()]\n\n if (!exts || !exts.length) {\n return false\n }\n\n return exts[0]\n}\n\n/**\n * Lookup the MIME type for a file path/extension.\n *\n * @param {string} path\n * @return {boolean|string}\n */\n\nfunction lookup (path) {\n if (!path || typeof path !== 'string') {\n return false\n }\n\n // get the extension (\"ext\" or \".ext\" or full path)\n var extension = extname('x.' + path)\n .toLowerCase()\n .substr(1)\n\n if (!extension) {\n return false\n }\n\n return exports.types[extension] || false\n}\n\n/**\n * Populate the extensions and types maps.\n * @private\n */\n\nfunction populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar Stream = _interopDefault(require('stream'));\nvar http = _interopDefault(require('http'));\nvar Url = _interopDefault(require('url'));\nvar whatwgUrl = _interopDefault(require('whatwg-url'));\nvar https = _interopDefault(require('https'));\nvar zlib = _interopDefault(require('zlib'));\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * isSameProtocol reports whether the two provided URLs use the same protocol.\n *\n * Both domains must already be in canonical form.\n * @param {string|URL} original\n * @param {string|URL} destination\n */\nconst isSameProtocol = function isSameProtocol(destination, original) {\n\tconst orig = new URL$1(original).protocol;\n\tconst dest = new URL$1(destination).protocol;\n\n\treturn orig === dest;\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\tdestroyStream(request.body, error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(req, function (err) {\n\t\t\tif (signal && signal.aborted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (parseInt(process.version.substring(1)) < 14) {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\treq.on('socket', function (s) {\n\t\t\t\ts.addListener('close', function (hadError) {\n\t\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\t\tconst hasDataListener = s.listenerCount('data') > 0;\n\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && hasDataListener && !hadError && !(signal && signal.aborted)) {\n\t\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.on('end', function () {\n\t\t\t\t\t// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tlet socket;\n\n\trequest.on('socket', function (s) {\n\t\tsocket = s;\n\t});\n\n\trequest.on('response', function (response) {\n\t\tconst headers = response.headers;\n\n\t\tif (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {\n\t\t\tresponse.once('close', function (hadError) {\n\t\t\t\t// tests for socket presence, as in some situations the\n\t\t\t\t// the 'socket' event is not triggered for the request\n\t\t\t\t// (happens in deno), avoids `TypeError`\n\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\tconst hasDataListener = socket && socket.listenerCount('data') > 0;\n\n\t\t\t\tif (hasDataListener && !hadError) {\n\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\terrorCallback(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction destroyStream(stream, err) {\n\tif (stream.destroy) {\n\t\tstream.destroy(err);\n\t} else {\n\t\t// node < 8\n\t\tstream.emit('error', err);\n\t\tstream.end();\n\t}\n}\n\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nmodule.exports = exports = fetch;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = exports;\nexports.Headers = Headers;\nexports.Request = Request;\nexports.Response = Response;\nexports.FetchError = FetchError;\nexports.AbortError = AbortError;\n","'use strict';\n\n/**\n * Converts tokens for a single address into an address object\n *\n * @param {Array} tokens Tokens object\n * @return {Object} Address object\n */\nfunction _handleAddress(tokens) {\n let token;\n let isGroup = false;\n let state = 'text';\n let address;\n let addresses = [];\n let data = {\n address: [],\n comment: [],\n group: [],\n text: []\n };\n let i;\n let len;\n\n // Filter out , (comments) and regular text\n for (i = 0, len = tokens.length; i < len; i++) {\n token = tokens[i];\n if (token.type === 'operator') {\n switch (token.value) {\n case '<':\n state = 'address';\n break;\n case '(':\n state = 'comment';\n break;\n case ':':\n state = 'group';\n isGroup = true;\n break;\n default:\n state = 'text';\n }\n } else if (token.value) {\n if (state === 'address') {\n // handle use case where unquoted name includes a \"<\"\n // Apple Mail truncates everything between an unexpected < and an address\n // and so will we\n token.value = token.value.replace(/^[^<]*<\\s*/, '');\n }\n data[state].push(token.value);\n }\n }\n\n // If there is no text but a comment, replace the two\n if (!data.text.length && data.comment.length) {\n data.text = data.comment;\n data.comment = [];\n }\n\n if (isGroup) {\n // http://tools.ietf.org/html/rfc2822#appendix-A.1.3\n data.text = data.text.join(' ');\n addresses.push({\n name: data.text || (address && address.name),\n group: data.group.length ? addressparser(data.group.join(',')) : []\n });\n } else {\n // If no address was found, try to detect one from regular text\n if (!data.address.length && data.text.length) {\n for (i = data.text.length - 1; i >= 0; i--) {\n if (data.text[i].match(/^[^@\\s]+@[^@\\s]+$/)) {\n data.address = data.text.splice(i, 1);\n break;\n }\n }\n\n let _regexHandler = function (address) {\n if (!data.address.length) {\n data.address = [address.trim()];\n return ' ';\n } else {\n return address;\n }\n };\n\n // still no address\n if (!data.address.length) {\n for (i = data.text.length - 1; i >= 0; i--) {\n // fixed the regex to parse email address correctly when email address has more than one @\n data.text[i] = data.text[i].replace(/\\s*\\b[^@\\s]+@[^\\s]+\\b\\s*/, _regexHandler).trim();\n if (data.address.length) {\n break;\n }\n }\n }\n }\n\n // If there's still is no text but a comment exixts, replace the two\n if (!data.text.length && data.comment.length) {\n data.text = data.comment;\n data.comment = [];\n }\n\n // Keep only the first address occurence, push others to regular text\n if (data.address.length > 1) {\n data.text = data.text.concat(data.address.splice(1));\n }\n\n // Join values with spaces\n data.text = data.text.join(' ');\n data.address = data.address.join(' ');\n\n if (!data.address && isGroup) {\n return [];\n } else {\n address = {\n address: data.address || data.text || '',\n name: data.text || data.address || ''\n };\n\n if (address.address === address.name) {\n if ((address.address || '').match(/@/)) {\n address.name = '';\n } else {\n address.address = '';\n }\n }\n\n addresses.push(address);\n }\n }\n\n return addresses;\n}\n\n/**\n * Creates a Tokenizer object for tokenizing address field strings\n *\n * @constructor\n * @param {String} str Address field string\n */\nclass Tokenizer {\n constructor(str) {\n this.str = (str || '').toString();\n this.operatorCurrent = '';\n this.operatorExpecting = '';\n this.node = null;\n this.escaped = false;\n\n this.list = [];\n /**\n * Operator tokens and which tokens are expected to end the sequence\n */\n this.operators = {\n '\"': '\"',\n '(': ')',\n '<': '>',\n ',': '',\n ':': ';',\n // Semicolons are not a legal delimiter per the RFC2822 grammar other\n // than for terminating a group, but they are also not valid for any\n // other use in this context. Given that some mail clients have\n // historically allowed the semicolon as a delimiter equivalent to the\n // comma in their UI, it makes sense to treat them the same as a comma\n // when used outside of a group.\n ';': ''\n };\n }\n\n /**\n * Tokenizes the original input string\n *\n * @return {Array} An array of operator|text tokens\n */\n tokenize() {\n let chr,\n list = [];\n for (let i = 0, len = this.str.length; i < len; i++) {\n chr = this.str.charAt(i);\n this.checkChar(chr);\n }\n\n this.list.forEach(node => {\n node.value = (node.value || '').toString().trim();\n if (node.value) {\n list.push(node);\n }\n });\n\n return list;\n }\n\n /**\n * Checks if a character is an operator or text and acts accordingly\n *\n * @param {String} chr Character from the address field\n */\n checkChar(chr) {\n if (this.escaped) {\n // ignore next condition blocks\n } else if (chr === this.operatorExpecting) {\n this.node = {\n type: 'operator',\n value: chr\n };\n this.list.push(this.node);\n this.node = null;\n this.operatorExpecting = '';\n this.escaped = false;\n return;\n } else if (!this.operatorExpecting && chr in this.operators) {\n this.node = {\n type: 'operator',\n value: chr\n };\n this.list.push(this.node);\n this.node = null;\n this.operatorExpecting = this.operators[chr];\n this.escaped = false;\n return;\n } else if (['\"', \"'\"].includes(this.operatorExpecting) && chr === '\\\\') {\n this.escaped = true;\n return;\n }\n\n if (!this.node) {\n this.node = {\n type: 'text',\n value: ''\n };\n this.list.push(this.node);\n }\n\n if (chr === '\\n') {\n // Convert newlines to spaces. Carriage return is ignored as \\r and \\n usually\n // go together anyway and there already is a WS for \\n. Lone \\r means something is fishy.\n chr = ' ';\n }\n\n if (chr.charCodeAt(0) >= 0x21 || [' ', '\\t'].includes(chr)) {\n // skip command bytes\n this.node.value += chr;\n }\n\n this.escaped = false;\n }\n}\n\n/**\n * Parses structured e-mail addresses from an address field\n *\n * Example:\n *\n * 'Name '\n *\n * will be converted to\n *\n * [{name: 'Name', address: 'address@domain'}]\n *\n * @param {String} str Address field\n * @return {Array} An array of address objects\n */\nfunction addressparser(str, options) {\n options = options || {};\n\n let tokenizer = new Tokenizer(str);\n let tokens = tokenizer.tokenize();\n\n let addresses = [];\n let address = [];\n let parsedAddresses = [];\n\n tokens.forEach(token => {\n if (token.type === 'operator' && (token.value === ',' || token.value === ';')) {\n if (address.length) {\n addresses.push(address);\n }\n address = [];\n } else {\n address.push(token);\n }\n });\n\n if (address.length) {\n addresses.push(address);\n }\n\n addresses.forEach(address => {\n address = _handleAddress(address);\n if (address.length) {\n parsedAddresses = parsedAddresses.concat(address);\n }\n });\n\n if (options.flatten) {\n let addresses = [];\n let walkAddressList = list => {\n list.forEach(address => {\n if (address.group) {\n return walkAddressList(address.group);\n } else {\n addresses.push(address);\n }\n });\n };\n walkAddressList(parsedAddresses);\n return addresses;\n }\n\n return parsedAddresses;\n}\n\n// expose to the world\nmodule.exports = addressparser;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\n/**\n * Encodes a Buffer into a base64 encoded string\n *\n * @param {Buffer} buffer Buffer to convert\n * @returns {String} base64 encoded string\n */\nfunction encode(buffer) {\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer, 'utf-8');\n }\n\n return buffer.toString('base64');\n}\n\n/**\n * Adds soft line breaks to a base64 string\n *\n * @param {String} str base64 encoded string that might need line wrapping\n * @param {Number} [lineLength=76] Maximum allowed length for a line\n * @returns {String} Soft-wrapped base64 encoded string\n */\nfunction wrap(str, lineLength) {\n str = (str || '').toString();\n lineLength = lineLength || 76;\n\n if (str.length <= lineLength) {\n return str;\n }\n\n let result = [];\n let pos = 0;\n let chunkLength = lineLength * 1024;\n while (pos < str.length) {\n let wrappedLines = str\n .substr(pos, chunkLength)\n .replace(new RegExp('.{' + lineLength + '}', 'g'), '$&\\r\\n')\n .trim();\n result.push(wrappedLines);\n pos += chunkLength;\n }\n\n return result.join('\\r\\n').trim();\n}\n\n/**\n * Creates a transform stream for encoding data to base64 encoding\n *\n * @constructor\n * @param {Object} options Stream options\n * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping\n */\nclass Encoder extends Transform {\n constructor(options) {\n super();\n // init Transform\n this.options = options || {};\n\n if (this.options.lineLength !== false) {\n this.options.lineLength = this.options.lineLength || 76;\n }\n\n this._curLine = '';\n this._remainingBytes = false;\n\n this.inputBytes = 0;\n this.outputBytes = 0;\n }\n\n _transform(chunk, encoding, done) {\n if (encoding !== 'buffer') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (!chunk || !chunk.length) {\n return setImmediate(done);\n }\n\n this.inputBytes += chunk.length;\n\n if (this._remainingBytes && this._remainingBytes.length) {\n chunk = Buffer.concat([this._remainingBytes, chunk], this._remainingBytes.length + chunk.length);\n this._remainingBytes = false;\n }\n\n if (chunk.length % 3) {\n this._remainingBytes = chunk.slice(chunk.length - (chunk.length % 3));\n chunk = chunk.slice(0, chunk.length - (chunk.length % 3));\n } else {\n this._remainingBytes = false;\n }\n\n let b64 = this._curLine + encode(chunk);\n\n if (this.options.lineLength) {\n b64 = wrap(b64, this.options.lineLength);\n\n // remove last line as it is still most probably incomplete\n let lastLF = b64.lastIndexOf('\\n');\n if (lastLF < 0) {\n this._curLine = b64;\n b64 = '';\n } else if (lastLF === b64.length - 1) {\n this._curLine = '';\n } else {\n this._curLine = b64.substr(lastLF + 1);\n b64 = b64.substr(0, lastLF + 1);\n }\n }\n\n if (b64) {\n this.outputBytes += b64.length;\n this.push(Buffer.from(b64, 'ascii'));\n }\n\n setImmediate(done);\n }\n\n _flush(done) {\n if (this._remainingBytes && this._remainingBytes.length) {\n this._curLine += encode(this._remainingBytes);\n }\n\n if (this._curLine) {\n this._curLine = wrap(this._curLine, this.options.lineLength);\n this.outputBytes += this._curLine.length;\n this.push(this._curLine, 'ascii');\n this._curLine = '';\n }\n done();\n }\n}\n\n// expose to the world\nmodule.exports = {\n encode,\n wrap,\n Encoder\n};\n","'use strict';\n\n// FIXME:\n// replace this Transform mess with a method that pipes input argument to output argument\n\nconst MessageParser = require('./message-parser');\nconst RelaxedBody = require('./relaxed-body');\nconst sign = require('./sign');\nconst PassThrough = require('stream').PassThrough;\nconst fs = require('fs');\nconst path = require('path');\nconst crypto = require('crypto');\n\nconst DKIM_ALGO = 'sha256';\nconst MAX_MESSAGE_SIZE = 128 * 1024; // buffer messages larger than this to disk\n\n/*\n// Usage:\n\nlet dkim = new DKIM({\n domainName: 'example.com',\n keySelector: 'key-selector',\n privateKey,\n cacheDir: '/tmp'\n});\ndkim.sign(input).pipe(process.stdout);\n\n// Where inputStream is a rfc822 message (either a stream, string or Buffer)\n// and outputStream is a DKIM signed rfc822 message\n*/\n\nclass DKIMSigner {\n constructor(options, keys, input, output) {\n this.options = options || {};\n this.keys = keys;\n\n this.cacheTreshold = Number(this.options.cacheTreshold) || MAX_MESSAGE_SIZE;\n this.hashAlgo = this.options.hashAlgo || DKIM_ALGO;\n\n this.cacheDir = this.options.cacheDir || false;\n\n this.chunks = [];\n this.chunklen = 0;\n this.readPos = 0;\n this.cachePath = this.cacheDir ? path.join(this.cacheDir, 'message.' + Date.now() + '-' + crypto.randomBytes(14).toString('hex')) : false;\n this.cache = false;\n\n this.headers = false;\n this.bodyHash = false;\n this.parser = false;\n this.relaxedBody = false;\n\n this.input = input;\n this.output = output;\n this.output.usingCache = false;\n\n this.hasErrored = false;\n\n this.input.on('error', err => {\n this.hasErrored = true;\n this.cleanup();\n output.emit('error', err);\n });\n }\n\n cleanup() {\n if (!this.cache || !this.cachePath) {\n return;\n }\n fs.unlink(this.cachePath, () => false);\n }\n\n createReadCache() {\n // pipe remainings to cache file\n this.cache = fs.createReadStream(this.cachePath);\n this.cache.once('error', err => {\n this.cleanup();\n this.output.emit('error', err);\n });\n this.cache.once('close', () => {\n this.cleanup();\n });\n this.cache.pipe(this.output);\n }\n\n sendNextChunk() {\n if (this.hasErrored) {\n return;\n }\n\n if (this.readPos >= this.chunks.length) {\n if (!this.cache) {\n return this.output.end();\n }\n return this.createReadCache();\n }\n let chunk = this.chunks[this.readPos++];\n if (this.output.write(chunk) === false) {\n return this.output.once('drain', () => {\n this.sendNextChunk();\n });\n }\n setImmediate(() => this.sendNextChunk());\n }\n\n sendSignedOutput() {\n let keyPos = 0;\n let signNextKey = () => {\n if (keyPos >= this.keys.length) {\n this.output.write(this.parser.rawHeaders);\n return setImmediate(() => this.sendNextChunk());\n }\n let key = this.keys[keyPos++];\n let dkimField = sign(this.headers, this.hashAlgo, this.bodyHash, {\n domainName: key.domainName,\n keySelector: key.keySelector,\n privateKey: key.privateKey,\n headerFieldNames: this.options.headerFieldNames,\n skipFields: this.options.skipFields\n });\n if (dkimField) {\n this.output.write(Buffer.from(dkimField + '\\r\\n'));\n }\n return setImmediate(signNextKey);\n };\n\n if (this.bodyHash && this.headers) {\n return signNextKey();\n }\n\n this.output.write(this.parser.rawHeaders);\n this.sendNextChunk();\n }\n\n createWriteCache() {\n this.output.usingCache = true;\n // pipe remainings to cache file\n this.cache = fs.createWriteStream(this.cachePath);\n this.cache.once('error', err => {\n this.cleanup();\n // drain input\n this.relaxedBody.unpipe(this.cache);\n this.relaxedBody.on('readable', () => {\n while (this.relaxedBody.read() !== null) {\n // do nothing\n }\n });\n this.hasErrored = true;\n // emit error\n this.output.emit('error', err);\n });\n this.cache.once('close', () => {\n this.sendSignedOutput();\n });\n this.relaxedBody.removeAllListeners('readable');\n this.relaxedBody.pipe(this.cache);\n }\n\n signStream() {\n this.parser = new MessageParser();\n this.relaxedBody = new RelaxedBody({\n hashAlgo: this.hashAlgo\n });\n\n this.parser.on('headers', value => {\n this.headers = value;\n });\n\n this.relaxedBody.on('hash', value => {\n this.bodyHash = value;\n });\n\n this.relaxedBody.on('readable', () => {\n let chunk;\n if (this.cache) {\n return;\n }\n while ((chunk = this.relaxedBody.read()) !== null) {\n this.chunks.push(chunk);\n this.chunklen += chunk.length;\n if (this.chunklen >= this.cacheTreshold && this.cachePath) {\n return this.createWriteCache();\n }\n }\n });\n\n this.relaxedBody.on('end', () => {\n if (this.cache) {\n return;\n }\n this.sendSignedOutput();\n });\n\n this.parser.pipe(this.relaxedBody);\n setImmediate(() => this.input.pipe(this.parser));\n }\n}\n\nclass DKIM {\n constructor(options) {\n this.options = options || {};\n this.keys = [].concat(\n this.options.keys || {\n domainName: options.domainName,\n keySelector: options.keySelector,\n privateKey: options.privateKey\n }\n );\n }\n\n sign(input, extraOptions) {\n let output = new PassThrough();\n let inputStream = input;\n let writeValue = false;\n\n if (Buffer.isBuffer(input)) {\n writeValue = input;\n inputStream = new PassThrough();\n } else if (typeof input === 'string') {\n writeValue = Buffer.from(input);\n inputStream = new PassThrough();\n }\n\n let options = this.options;\n if (extraOptions && Object.keys(extraOptions).length) {\n options = {};\n Object.keys(this.options || {}).forEach(key => {\n options[key] = this.options[key];\n });\n Object.keys(extraOptions || {}).forEach(key => {\n if (!(key in options)) {\n options[key] = extraOptions[key];\n }\n });\n }\n\n let signer = new DKIMSigner(options, this.keys, inputStream, output);\n setImmediate(() => {\n signer.signStream();\n if (writeValue) {\n setImmediate(() => {\n inputStream.end(writeValue);\n });\n }\n });\n\n return output;\n }\n}\n\nmodule.exports = DKIM;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\n/**\n * MessageParser instance is a transform stream that separates message headers\n * from the rest of the body. Headers are emitted with the 'headers' event. Message\n * body is passed on as the resulting stream.\n */\nclass MessageParser extends Transform {\n constructor(options) {\n super(options);\n this.lastBytes = Buffer.alloc(4);\n this.headersParsed = false;\n this.headerBytes = 0;\n this.headerChunks = [];\n this.rawHeaders = false;\n this.bodySize = 0;\n }\n\n /**\n * Keeps count of the last 4 bytes in order to detect line breaks on chunk boundaries\n *\n * @param {Buffer} data Next data chunk from the stream\n */\n updateLastBytes(data) {\n let lblen = this.lastBytes.length;\n let nblen = Math.min(data.length, lblen);\n\n // shift existing bytes\n for (let i = 0, len = lblen - nblen; i < len; i++) {\n this.lastBytes[i] = this.lastBytes[i + nblen];\n }\n\n // add new bytes\n for (let i = 1; i <= nblen; i++) {\n this.lastBytes[lblen - i] = data[data.length - i];\n }\n }\n\n /**\n * Finds and removes message headers from the remaining body. We want to keep\n * headers separated until final delivery to be able to modify these\n *\n * @param {Buffer} data Next chunk of data\n * @return {Boolean} Returns true if headers are already found or false otherwise\n */\n checkHeaders(data) {\n if (this.headersParsed) {\n return true;\n }\n\n let lblen = this.lastBytes.length;\n let headerPos = 0;\n this.curLinePos = 0;\n for (let i = 0, len = this.lastBytes.length + data.length; i < len; i++) {\n let chr;\n if (i < lblen) {\n chr = this.lastBytes[i];\n } else {\n chr = data[i - lblen];\n }\n if (chr === 0x0a && i) {\n let pr1 = i - 1 < lblen ? this.lastBytes[i - 1] : data[i - 1 - lblen];\n let pr2 = i > 1 ? (i - 2 < lblen ? this.lastBytes[i - 2] : data[i - 2 - lblen]) : false;\n if (pr1 === 0x0a) {\n this.headersParsed = true;\n headerPos = i - lblen + 1;\n this.headerBytes += headerPos;\n break;\n } else if (pr1 === 0x0d && pr2 === 0x0a) {\n this.headersParsed = true;\n headerPos = i - lblen + 1;\n this.headerBytes += headerPos;\n break;\n }\n }\n }\n\n if (this.headersParsed) {\n this.headerChunks.push(data.slice(0, headerPos));\n this.rawHeaders = Buffer.concat(this.headerChunks, this.headerBytes);\n this.headerChunks = null;\n this.emit('headers', this.parseHeaders());\n if (data.length - 1 > headerPos) {\n let chunk = data.slice(headerPos);\n this.bodySize += chunk.length;\n // this would be the first chunk of data sent downstream\n setImmediate(() => this.push(chunk));\n }\n return false;\n } else {\n this.headerBytes += data.length;\n this.headerChunks.push(data);\n }\n\n // store last 4 bytes to catch header break\n this.updateLastBytes(data);\n\n return false;\n }\n\n _transform(chunk, encoding, callback) {\n if (!chunk || !chunk.length) {\n return callback();\n }\n\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n let headersFound;\n\n try {\n headersFound = this.checkHeaders(chunk);\n } catch (E) {\n return callback(E);\n }\n\n if (headersFound) {\n this.bodySize += chunk.length;\n this.push(chunk);\n }\n\n setImmediate(callback);\n }\n\n _flush(callback) {\n if (this.headerChunks) {\n let chunk = Buffer.concat(this.headerChunks, this.headerBytes);\n this.bodySize += chunk.length;\n this.push(chunk);\n this.headerChunks = null;\n }\n callback();\n }\n\n parseHeaders() {\n let lines = (this.rawHeaders || '').toString().split(/\\r?\\n/);\n for (let i = lines.length - 1; i > 0; i--) {\n if (/^\\s/.test(lines[i])) {\n lines[i - 1] += '\\n' + lines[i];\n lines.splice(i, 1);\n }\n }\n return lines\n .filter(line => line.trim())\n .map(line => ({\n key: line.substr(0, line.indexOf(':')).trim().toLowerCase(),\n line\n }));\n }\n}\n\nmodule.exports = MessageParser;\n","'use strict';\n\n// streams through a message body and calculates relaxed body hash\n\nconst Transform = require('stream').Transform;\nconst crypto = require('crypto');\n\nclass RelaxedBody extends Transform {\n constructor(options) {\n super();\n options = options || {};\n this.chunkBuffer = [];\n this.chunkBufferLen = 0;\n this.bodyHash = crypto.createHash(options.hashAlgo || 'sha1');\n this.remainder = '';\n this.byteLength = 0;\n\n this.debug = options.debug;\n this._debugBody = options.debug ? [] : false;\n }\n\n updateHash(chunk) {\n let bodyStr;\n\n // find next remainder\n let nextRemainder = '';\n\n // This crux finds and removes the spaces from the last line and the newline characters after the last non-empty line\n // If we get another chunk that does not match this description then we can restore the previously processed data\n let state = 'file';\n for (let i = chunk.length - 1; i >= 0; i--) {\n let c = chunk[i];\n\n if (state === 'file' && (c === 0x0a || c === 0x0d)) {\n // do nothing, found \\n or \\r at the end of chunk, stil end of file\n } else if (state === 'file' && (c === 0x09 || c === 0x20)) {\n // switch to line ending mode, this is the last non-empty line\n state = 'line';\n } else if (state === 'line' && (c === 0x09 || c === 0x20)) {\n // do nothing, found ' ' or \\t at the end of line, keep processing the last non-empty line\n } else if (state === 'file' || state === 'line') {\n // non line/file ending character found, switch to body mode\n state = 'body';\n if (i === chunk.length - 1) {\n // final char is not part of line end or file end, so do nothing\n break;\n }\n }\n\n if (i === 0) {\n // reached to the beginning of the chunk, check if it is still about the ending\n // and if the remainder also matches\n if (\n (state === 'file' && (!this.remainder || /[\\r\\n]$/.test(this.remainder))) ||\n (state === 'line' && (!this.remainder || /[ \\t]$/.test(this.remainder)))\n ) {\n // keep everything\n this.remainder += chunk.toString('binary');\n return;\n } else if (state === 'line' || state === 'file') {\n // process existing remainder as normal line but store the current chunk\n nextRemainder = chunk.toString('binary');\n chunk = false;\n break;\n }\n }\n\n if (state !== 'body') {\n continue;\n }\n\n // reached first non ending byte\n nextRemainder = chunk.slice(i + 1).toString('binary');\n chunk = chunk.slice(0, i + 1);\n break;\n }\n\n let needsFixing = !!this.remainder;\n if (chunk && !needsFixing) {\n // check if we even need to change anything\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (i && chunk[i] === 0x0a && chunk[i - 1] !== 0x0d) {\n // missing \\r before \\n\n needsFixing = true;\n break;\n } else if (i && chunk[i] === 0x0d && chunk[i - 1] === 0x20) {\n // trailing WSP found\n needsFixing = true;\n break;\n } else if (i && chunk[i] === 0x20 && chunk[i - 1] === 0x20) {\n // multiple spaces found, needs to be replaced with just one\n needsFixing = true;\n break;\n } else if (chunk[i] === 0x09) {\n // TAB found, needs to be replaced with a space\n needsFixing = true;\n break;\n }\n }\n }\n\n if (needsFixing) {\n bodyStr = this.remainder + (chunk ? chunk.toString('binary') : '');\n this.remainder = nextRemainder;\n bodyStr = bodyStr\n .replace(/\\r?\\n/g, '\\n') // use js line endings\n .replace(/[ \\t]*$/gm, '') // remove line endings, rtrim\n .replace(/[ \\t]+/gm, ' ') // single spaces\n .replace(/\\n/g, '\\r\\n'); // restore rfc822 line endings\n chunk = Buffer.from(bodyStr, 'binary');\n } else if (nextRemainder) {\n this.remainder = nextRemainder;\n }\n\n if (this.debug) {\n this._debugBody.push(chunk);\n }\n this.bodyHash.update(chunk);\n }\n\n _transform(chunk, encoding, callback) {\n if (!chunk || !chunk.length) {\n return callback();\n }\n\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n this.updateHash(chunk);\n\n this.byteLength += chunk.length;\n this.push(chunk);\n callback();\n }\n\n _flush(callback) {\n // generate final hash and emit it\n if (/[\\r\\n]$/.test(this.remainder) && this.byteLength > 2) {\n // add terminating line end\n this.bodyHash.update(Buffer.from('\\r\\n'));\n }\n if (!this.byteLength) {\n // emit empty line buffer to keep the stream flowing\n this.push(Buffer.from('\\r\\n'));\n // this.bodyHash.update(Buffer.from('\\r\\n'));\n }\n\n this.emit('hash', this.bodyHash.digest('base64'), this.debug ? Buffer.concat(this._debugBody) : false);\n callback();\n }\n}\n\nmodule.exports = RelaxedBody;\n","'use strict';\n\nconst punycode = require('../punycode');\nconst mimeFuncs = require('../mime-funcs');\nconst crypto = require('crypto');\n\n/**\n * Returns DKIM signature header line\n *\n * @param {Object} headers Parsed headers object from MessageParser\n * @param {String} bodyHash Base64 encoded hash of the message\n * @param {Object} options DKIM options\n * @param {String} options.domainName Domain name to be signed for\n * @param {String} options.keySelector DKIM key selector to use\n * @param {String} options.privateKey DKIM private key to use\n * @return {String} Complete header line\n */\n\nmodule.exports = (headers, hashAlgo, bodyHash, options) => {\n options = options || {};\n\n // all listed fields from RFC4871 #5.5\n let defaultFieldNames =\n 'From:Sender:Reply-To:Subject:Date:Message-ID:To:' +\n 'Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:' +\n 'Content-Description:Resent-Date:Resent-From:Resent-Sender:' +\n 'Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:' +\n 'List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:' +\n 'List-Owner:List-Archive';\n\n let fieldNames = options.headerFieldNames || defaultFieldNames;\n\n let canonicalizedHeaderData = relaxedHeaders(headers, fieldNames, options.skipFields);\n let dkimHeader = generateDKIMHeader(options.domainName, options.keySelector, canonicalizedHeaderData.fieldNames, hashAlgo, bodyHash);\n\n let signer, signature;\n\n canonicalizedHeaderData.headers += 'dkim-signature:' + relaxedHeaderLine(dkimHeader);\n\n signer = crypto.createSign(('rsa-' + hashAlgo).toUpperCase());\n signer.update(canonicalizedHeaderData.headers);\n try {\n signature = signer.sign(options.privateKey, 'base64');\n } catch (E) {\n return false;\n }\n\n return dkimHeader + signature.replace(/(^.{73}|.{75}(?!\\r?\\n|\\r))/g, '$&\\r\\n ').trim();\n};\n\nmodule.exports.relaxedHeaders = relaxedHeaders;\n\nfunction generateDKIMHeader(domainName, keySelector, fieldNames, hashAlgo, bodyHash) {\n let dkim = [\n 'v=1',\n 'a=rsa-' + hashAlgo,\n 'c=relaxed/relaxed',\n 'd=' + punycode.toASCII(domainName),\n 'q=dns/txt',\n 's=' + keySelector,\n 'bh=' + bodyHash,\n 'h=' + fieldNames\n ].join('; ');\n\n return mimeFuncs.foldLines('DKIM-Signature: ' + dkim, 76) + ';\\r\\n b=';\n}\n\nfunction relaxedHeaders(headers, fieldNames, skipFields) {\n let includedFields = new Set();\n let skip = new Set();\n let headerFields = new Map();\n\n (skipFields || '')\n .toLowerCase()\n .split(':')\n .forEach(field => {\n skip.add(field.trim());\n });\n\n (fieldNames || '')\n .toLowerCase()\n .split(':')\n .filter(field => !skip.has(field.trim()))\n .forEach(field => {\n includedFields.add(field.trim());\n });\n\n for (let i = headers.length - 1; i >= 0; i--) {\n let line = headers[i];\n // only include the first value from bottom to top\n if (includedFields.has(line.key) && !headerFields.has(line.key)) {\n headerFields.set(line.key, relaxedHeaderLine(line.line));\n }\n }\n\n let headersList = [];\n let fields = [];\n includedFields.forEach(field => {\n if (headerFields.has(field)) {\n fields.push(field);\n headersList.push(field + ':' + headerFields.get(field));\n }\n });\n\n return {\n headers: headersList.join('\\r\\n') + '\\r\\n',\n fieldNames: fields.join(':')\n };\n}\n\nfunction relaxedHeaderLine(line) {\n return line\n .substr(line.indexOf(':') + 1)\n .replace(/\\r?\\n/g, '')\n .replace(/\\s+/g, ' ')\n .trim();\n}\n","'use strict';\n\n// module to handle cookies\n\nconst urllib = require('url');\n\nconst SESSION_TIMEOUT = 1800; // 30 min\n\n/**\n * Creates a biskviit cookie jar for managing cookie values in memory\n *\n * @constructor\n * @param {Object} [options] Optional options object\n */\nclass Cookies {\n constructor(options) {\n this.options = options || {};\n this.cookies = [];\n }\n\n /**\n * Stores a cookie string to the cookie storage\n *\n * @param {String} cookieStr Value from the 'Set-Cookie:' header\n * @param {String} url Current URL\n */\n set(cookieStr, url) {\n let urlparts = urllib.parse(url || '');\n let cookie = this.parse(cookieStr);\n let domain;\n\n if (cookie.domain) {\n domain = cookie.domain.replace(/^\\./, '');\n\n // do not allow cross origin cookies\n if (\n // can't be valid if the requested domain is shorter than current hostname\n urlparts.hostname.length < domain.length ||\n // prefix domains with dot to be sure that partial matches are not used\n ('.' + urlparts.hostname).substr(-domain.length + 1) !== '.' + domain\n ) {\n cookie.domain = urlparts.hostname;\n }\n } else {\n cookie.domain = urlparts.hostname;\n }\n\n if (!cookie.path) {\n cookie.path = this.getPath(urlparts.pathname);\n }\n\n // if no expire date, then use sessionTimeout value\n if (!cookie.expires) {\n cookie.expires = new Date(Date.now() + (Number(this.options.sessionTimeout || SESSION_TIMEOUT) || SESSION_TIMEOUT) * 1000);\n }\n\n return this.add(cookie);\n }\n\n /**\n * Returns cookie string for the 'Cookie:' header.\n *\n * @param {String} url URL to check for\n * @returns {String} Cookie header or empty string if no matches were found\n */\n get(url) {\n return this.list(url)\n .map(cookie => cookie.name + '=' + cookie.value)\n .join('; ');\n }\n\n /**\n * Lists all valied cookie objects for the specified URL\n *\n * @param {String} url URL to check for\n * @returns {Array} An array of cookie objects\n */\n list(url) {\n let result = [];\n let i;\n let cookie;\n\n for (i = this.cookies.length - 1; i >= 0; i--) {\n cookie = this.cookies[i];\n\n if (this.isExpired(cookie)) {\n this.cookies.splice(i, i);\n continue;\n }\n\n if (this.match(cookie, url)) {\n result.unshift(cookie);\n }\n }\n\n return result;\n }\n\n /**\n * Parses cookie string from the 'Set-Cookie:' header\n *\n * @param {String} cookieStr String from the 'Set-Cookie:' header\n * @returns {Object} Cookie object\n */\n parse(cookieStr) {\n let cookie = {};\n\n (cookieStr || '')\n .toString()\n .split(';')\n .forEach(cookiePart => {\n let valueParts = cookiePart.split('=');\n let key = valueParts.shift().trim().toLowerCase();\n let value = valueParts.join('=').trim();\n let domain;\n\n if (!key) {\n // skip empty parts\n return;\n }\n\n switch (key) {\n case 'expires':\n value = new Date(value);\n // ignore date if can not parse it\n if (value.toString() !== 'Invalid Date') {\n cookie.expires = value;\n }\n break;\n\n case 'path':\n cookie.path = value;\n break;\n\n case 'domain':\n domain = value.toLowerCase();\n if (domain.length && domain.charAt(0) !== '.') {\n domain = '.' + domain; // ensure preceeding dot for user set domains\n }\n cookie.domain = domain;\n break;\n\n case 'max-age':\n cookie.expires = new Date(Date.now() + (Number(value) || 0) * 1000);\n break;\n\n case 'secure':\n cookie.secure = true;\n break;\n\n case 'httponly':\n cookie.httponly = true;\n break;\n\n default:\n if (!cookie.name) {\n cookie.name = key;\n cookie.value = value;\n }\n }\n });\n\n return cookie;\n }\n\n /**\n * Checks if a cookie object is valid for a specified URL\n *\n * @param {Object} cookie Cookie object\n * @param {String} url URL to check for\n * @returns {Boolean} true if cookie is valid for specifiec URL\n */\n match(cookie, url) {\n let urlparts = urllib.parse(url || '');\n\n // check if hostname matches\n // .foo.com also matches subdomains, foo.com does not\n if (\n urlparts.hostname !== cookie.domain &&\n (cookie.domain.charAt(0) !== '.' || ('.' + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)\n ) {\n return false;\n }\n\n // check if path matches\n let path = this.getPath(urlparts.pathname);\n if (path.substr(0, cookie.path.length) !== cookie.path) {\n return false;\n }\n\n // check secure argument\n if (cookie.secure && urlparts.protocol !== 'https:') {\n return false;\n }\n\n return true;\n }\n\n /**\n * Adds (or updates/removes if needed) a cookie object to the cookie storage\n *\n * @param {Object} cookie Cookie value to be stored\n */\n add(cookie) {\n let i;\n let len;\n\n // nothing to do here\n if (!cookie || !cookie.name) {\n return false;\n }\n\n // overwrite if has same params\n for (i = 0, len = this.cookies.length; i < len; i++) {\n if (this.compare(this.cookies[i], cookie)) {\n // check if the cookie needs to be removed instead\n if (this.isExpired(cookie)) {\n this.cookies.splice(i, 1); // remove expired/unset cookie\n return false;\n }\n\n this.cookies[i] = cookie;\n return true;\n }\n }\n\n // add as new if not already expired\n if (!this.isExpired(cookie)) {\n this.cookies.push(cookie);\n }\n\n return true;\n }\n\n /**\n * Checks if two cookie objects are the same\n *\n * @param {Object} a Cookie to check against\n * @param {Object} b Cookie to check against\n * @returns {Boolean} True, if the cookies are the same\n */\n compare(a, b) {\n return a.name === b.name && a.path === b.path && a.domain === b.domain && a.secure === b.secure && a.httponly === a.httponly;\n }\n\n /**\n * Checks if a cookie is expired\n *\n * @param {Object} cookie Cookie object to check against\n * @returns {Boolean} True, if the cookie is expired\n */\n isExpired(cookie) {\n return (cookie.expires && cookie.expires < new Date()) || !cookie.value;\n }\n\n /**\n * Returns normalized cookie path for an URL path argument\n *\n * @param {String} pathname\n * @returns {String} Normalized path\n */\n getPath(pathname) {\n let path = (pathname || '/').split('/');\n path.pop(); // remove filename part\n path = path.join('/').trim();\n\n // ensure path prefix /\n if (path.charAt(0) !== '/') {\n path = '/' + path;\n }\n\n // ensure path suffix /\n if (path.substr(-1) !== '/') {\n path += '/';\n }\n\n return path;\n }\n}\n\nmodule.exports = Cookies;\n","'use strict';\n\nconst http = require('http');\nconst https = require('https');\nconst urllib = require('url');\nconst zlib = require('zlib');\nconst PassThrough = require('stream').PassThrough;\nconst Cookies = require('./cookies');\nconst packageData = require('../../package.json');\nconst net = require('net');\n\nconst MAX_REDIRECTS = 5;\n\nmodule.exports = function (url, options) {\n return nmfetch(url, options);\n};\n\nmodule.exports.Cookies = Cookies;\n\nfunction nmfetch(url, options) {\n options = options || {};\n\n options.fetchRes = options.fetchRes || new PassThrough();\n options.cookies = options.cookies || new Cookies();\n options.redirects = options.redirects || 0;\n options.maxRedirects = isNaN(options.maxRedirects) ? MAX_REDIRECTS : options.maxRedirects;\n\n if (options.cookie) {\n [].concat(options.cookie || []).forEach(cookie => {\n options.cookies.set(cookie, url);\n });\n options.cookie = false;\n }\n\n let fetchRes = options.fetchRes;\n let parsed = urllib.parse(url);\n let method = (options.method || '').toString().trim().toUpperCase() || 'GET';\n let finished = false;\n let cookies;\n let body;\n\n let handler = parsed.protocol === 'https:' ? https : http;\n\n let headers = {\n 'accept-encoding': 'gzip,deflate',\n 'user-agent': 'nodemailer/' + packageData.version\n };\n\n Object.keys(options.headers || {}).forEach(key => {\n headers[key.toLowerCase().trim()] = options.headers[key];\n });\n\n if (options.userAgent) {\n headers['user-agent'] = options.userAgent;\n }\n\n if (parsed.auth) {\n headers.Authorization = 'Basic ' + Buffer.from(parsed.auth).toString('base64');\n }\n\n if ((cookies = options.cookies.get(url))) {\n headers.cookie = cookies;\n }\n\n if (options.body) {\n if (options.contentType !== false) {\n headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';\n }\n\n if (typeof options.body.pipe === 'function') {\n // it's a stream\n headers['Transfer-Encoding'] = 'chunked';\n body = options.body;\n body.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n } else {\n if (options.body instanceof Buffer) {\n body = options.body;\n } else if (typeof options.body === 'object') {\n try {\n // encodeURIComponent can fail on invalid input (partial emoji etc.)\n body = Buffer.from(\n Object.keys(options.body)\n .map(key => {\n let value = options.body[key].toString().trim();\n return encodeURIComponent(key) + '=' + encodeURIComponent(value);\n })\n .join('&')\n );\n } catch (E) {\n if (finished) {\n return;\n }\n finished = true;\n E.type = 'FETCH';\n E.sourceUrl = url;\n fetchRes.emit('error', E);\n return;\n }\n } else {\n body = Buffer.from(options.body.toString().trim());\n }\n\n headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';\n headers['Content-Length'] = body.length;\n }\n // if method is not provided, use POST instead of GET\n method = (options.method || '').toString().trim().toUpperCase() || 'POST';\n }\n\n let req;\n let reqOptions = {\n method,\n host: parsed.hostname,\n path: parsed.path,\n port: parsed.port ? parsed.port : parsed.protocol === 'https:' ? 443 : 80,\n headers,\n rejectUnauthorized: false,\n agent: false\n };\n\n if (options.tls) {\n Object.keys(options.tls).forEach(key => {\n reqOptions[key] = options.tls[key];\n });\n }\n\n if (parsed.protocol === 'https:' && parsed.hostname && parsed.hostname !== reqOptions.host && !net.isIP(parsed.hostname) && !reqOptions.servername) {\n reqOptions.servername = parsed.hostname;\n }\n\n try {\n req = handler.request(reqOptions);\n } catch (E) {\n finished = true;\n setImmediate(() => {\n E.type = 'FETCH';\n E.sourceUrl = url;\n fetchRes.emit('error', E);\n });\n return fetchRes;\n }\n\n if (options.timeout) {\n req.setTimeout(options.timeout, () => {\n if (finished) {\n return;\n }\n finished = true;\n req.abort();\n let err = new Error('Request Timeout');\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n }\n\n req.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n\n req.on('response', res => {\n let inflate;\n\n if (finished) {\n return;\n }\n\n switch (res.headers['content-encoding']) {\n case 'gzip':\n case 'deflate':\n inflate = zlib.createUnzip();\n break;\n }\n\n if (res.headers['set-cookie']) {\n [].concat(res.headers['set-cookie'] || []).forEach(cookie => {\n options.cookies.set(cookie, url);\n });\n }\n\n if ([301, 302, 303, 307, 308].includes(res.statusCode) && res.headers.location) {\n // redirect\n options.redirects++;\n if (options.redirects > options.maxRedirects) {\n finished = true;\n let err = new Error('Maximum redirect count exceeded');\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n return;\n }\n // redirect does not include POST body\n options.method = 'GET';\n options.body = false;\n return nmfetch(urllib.resolve(url, res.headers.location), options);\n }\n\n fetchRes.statusCode = res.statusCode;\n fetchRes.headers = res.headers;\n\n if (res.statusCode >= 300 && !options.allowErrorResponse) {\n finished = true;\n let err = new Error('Invalid status code ' + res.statusCode);\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n return;\n }\n\n res.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n });\n\n if (inflate) {\n res.pipe(inflate).pipe(fetchRes);\n inflate.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n });\n } else {\n res.pipe(fetchRes);\n }\n });\n\n setImmediate(() => {\n if (body) {\n try {\n if (typeof body.pipe === 'function') {\n return body.pipe(req);\n } else {\n req.write(body);\n }\n } catch (err) {\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n return;\n }\n }\n req.end();\n });\n\n return fetchRes;\n}\n","'use strict';\n\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\n\n/**\n * Generates a Transport object to generate JSON output\n *\n * @constructor\n * @param {Object} optional config parameter\n */\nclass JSONTransport {\n constructor(options) {\n options = options || {};\n\n this.options = options || {};\n\n this.name = 'JSONTransport';\n this.version = packageData.version;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'json-transport'\n });\n }\n\n /**\n *

Compiles a mailcomposer message and forwards it to handler that sends it.

\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, done) {\n // Sendmail strips this header line by itself\n mail.message.keepBcc = true;\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Composing JSON structure of %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n setImmediate(() => {\n mail.normalize((err, data) => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed building JSON structure for %s. %s',\n messageId,\n err.message\n );\n return done(err);\n }\n\n delete data.envelope;\n delete data.normalizedHeaders;\n\n return done(null, {\n envelope,\n messageId,\n message: this.options.skipEncoding ? data : JSON.stringify(data)\n });\n });\n });\n }\n}\n\nmodule.exports = JSONTransport;\n","/* eslint no-undefined: 0 */\n\n'use strict';\n\nconst MimeNode = require('../mime-node');\nconst mimeFuncs = require('../mime-funcs');\nconst parseDataURI = require('../shared').parseDataURI;\n\n/**\n * Creates the object for composing a MimeNode instance out from the mail options\n *\n * @constructor\n * @param {Object} mail Mail options\n */\nclass MailComposer {\n constructor(mail) {\n this.mail = mail || {};\n this.message = false;\n }\n\n /**\n * Builds MimeNode instance\n */\n compile() {\n this._alternatives = this.getAlternatives();\n this._htmlNode = this._alternatives.filter(alternative => /^text\\/html\\b/i.test(alternative.contentType)).pop();\n this._attachments = this.getAttachments(!!this._htmlNode);\n\n this._useRelated = !!(this._htmlNode && this._attachments.related.length);\n this._useAlternative = this._alternatives.length > 1;\n this._useMixed = this._attachments.attached.length > 1 || (this._alternatives.length && this._attachments.attached.length === 1);\n\n // Compose MIME tree\n if (this.mail.raw) {\n this.message = new MimeNode('message/rfc822', { newline: this.mail.newline }).setRaw(this.mail.raw);\n } else if (this._useMixed) {\n this.message = this._createMixed();\n } else if (this._useAlternative) {\n this.message = this._createAlternative();\n } else if (this._useRelated) {\n this.message = this._createRelated();\n } else {\n this.message = this._createContentNode(\n false,\n []\n .concat(this._alternatives || [])\n .concat(this._attachments.attached || [])\n .shift() || {\n contentType: 'text/plain',\n content: ''\n }\n );\n }\n\n // Add custom headers\n if (this.mail.headers) {\n this.message.addHeader(this.mail.headers);\n }\n\n // Add headers to the root node, always overrides custom headers\n ['from', 'sender', 'to', 'cc', 'bcc', 'reply-to', 'in-reply-to', 'references', 'subject', 'message-id', 'date'].forEach(header => {\n let key = header.replace(/-(\\w)/g, (o, c) => c.toUpperCase());\n if (this.mail[key]) {\n this.message.setHeader(header, this.mail[key]);\n }\n });\n\n // Sets custom envelope\n if (this.mail.envelope) {\n this.message.setEnvelope(this.mail.envelope);\n }\n\n // ensure Message-Id value\n this.message.messageId();\n\n return this.message;\n }\n\n /**\n * List all attachments. Resulting attachment objects can be used as input for MimeNode nodes\n *\n * @param {Boolean} findRelated If true separate related attachments from attached ones\n * @returns {Object} An object of arrays (`related` and `attached`)\n */\n getAttachments(findRelated) {\n let icalEvent, eventObject;\n let attachments = [].concat(this.mail.attachments || []).map((attachment, i) => {\n let data;\n let isMessageNode = /^message\\//i.test(attachment.contentType);\n\n if (/^data:/i.test(attachment.path || attachment.href)) {\n attachment = this._processDataUrl(attachment);\n }\n\n let contentType = attachment.contentType || mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');\n let isImage = /^image\\//i.test(contentType);\n let contentDisposition = attachment.contentDisposition || (isMessageNode || (isImage && attachment.cid) ? 'inline' : 'attachment');\n\n data = {\n contentType,\n contentDisposition,\n contentTransferEncoding: 'contentTransferEncoding' in attachment ? attachment.contentTransferEncoding : 'base64'\n };\n\n if (attachment.filename) {\n data.filename = attachment.filename;\n } else if (!isMessageNode && attachment.filename !== false) {\n data.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);\n if (data.filename.indexOf('.') < 0) {\n data.filename += '.' + mimeFuncs.detectExtension(data.contentType);\n }\n }\n\n if (/^https?:\\/\\//i.test(attachment.path)) {\n attachment.href = attachment.path;\n attachment.path = undefined;\n }\n\n if (attachment.cid) {\n data.cid = attachment.cid;\n }\n\n if (attachment.raw) {\n data.raw = attachment.raw;\n } else if (attachment.path) {\n data.content = {\n path: attachment.path\n };\n } else if (attachment.href) {\n data.content = {\n href: attachment.href,\n httpHeaders: attachment.httpHeaders\n };\n } else {\n data.content = attachment.content || '';\n }\n\n if (attachment.encoding) {\n data.encoding = attachment.encoding;\n }\n\n if (attachment.headers) {\n data.headers = attachment.headers;\n }\n\n return data;\n });\n\n if (this.mail.icalEvent) {\n if (\n typeof this.mail.icalEvent === 'object' &&\n (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)\n ) {\n icalEvent = this.mail.icalEvent;\n } else {\n icalEvent = {\n content: this.mail.icalEvent\n };\n }\n\n eventObject = {};\n Object.keys(icalEvent).forEach(key => {\n eventObject[key] = icalEvent[key];\n });\n\n eventObject.contentType = 'application/ics';\n if (!eventObject.headers) {\n eventObject.headers = {};\n }\n eventObject.filename = eventObject.filename || 'invite.ics';\n eventObject.headers['Content-Disposition'] = 'attachment';\n eventObject.headers['Content-Transfer-Encoding'] = 'base64';\n }\n\n if (!findRelated) {\n return {\n attached: attachments.concat(eventObject || []),\n related: []\n };\n } else {\n return {\n attached: attachments.filter(attachment => !attachment.cid).concat(eventObject || []),\n related: attachments.filter(attachment => !!attachment.cid)\n };\n }\n }\n\n /**\n * List alternatives. Resulting objects can be used as input for MimeNode nodes\n *\n * @returns {Array} An array of alternative elements. Includes the `text` and `html` values as well\n */\n getAlternatives() {\n let alternatives = [],\n text,\n html,\n watchHtml,\n amp,\n icalEvent,\n eventObject;\n\n if (this.mail.text) {\n if (typeof this.mail.text === 'object' && (this.mail.text.content || this.mail.text.path || this.mail.text.href || this.mail.text.raw)) {\n text = this.mail.text;\n } else {\n text = {\n content: this.mail.text\n };\n }\n text.contentType = 'text/plain; charset=utf-8';\n }\n\n if (this.mail.watchHtml) {\n if (\n typeof this.mail.watchHtml === 'object' &&\n (this.mail.watchHtml.content || this.mail.watchHtml.path || this.mail.watchHtml.href || this.mail.watchHtml.raw)\n ) {\n watchHtml = this.mail.watchHtml;\n } else {\n watchHtml = {\n content: this.mail.watchHtml\n };\n }\n watchHtml.contentType = 'text/watch-html; charset=utf-8';\n }\n\n if (this.mail.amp) {\n if (typeof this.mail.amp === 'object' && (this.mail.amp.content || this.mail.amp.path || this.mail.amp.href || this.mail.amp.raw)) {\n amp = this.mail.amp;\n } else {\n amp = {\n content: this.mail.amp\n };\n }\n amp.contentType = 'text/x-amp-html; charset=utf-8';\n }\n\n // NB! when including attachments with a calendar alternative you might end up in a blank screen on some clients\n if (this.mail.icalEvent) {\n if (\n typeof this.mail.icalEvent === 'object' &&\n (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)\n ) {\n icalEvent = this.mail.icalEvent;\n } else {\n icalEvent = {\n content: this.mail.icalEvent\n };\n }\n\n eventObject = {};\n Object.keys(icalEvent).forEach(key => {\n eventObject[key] = icalEvent[key];\n });\n\n if (eventObject.content && typeof eventObject.content === 'object') {\n // we are going to have the same attachment twice, so mark this to be\n // resolved just once\n eventObject.content._resolve = true;\n }\n\n eventObject.filename = false;\n eventObject.contentType = 'text/calendar; charset=utf-8; method=' + (eventObject.method || 'PUBLISH').toString().trim().toUpperCase();\n if (!eventObject.headers) {\n eventObject.headers = {};\n }\n }\n\n if (this.mail.html) {\n if (typeof this.mail.html === 'object' && (this.mail.html.content || this.mail.html.path || this.mail.html.href || this.mail.html.raw)) {\n html = this.mail.html;\n } else {\n html = {\n content: this.mail.html\n };\n }\n html.contentType = 'text/html; charset=utf-8';\n }\n\n []\n .concat(text || [])\n .concat(watchHtml || [])\n .concat(amp || [])\n .concat(html || [])\n .concat(eventObject || [])\n .concat(this.mail.alternatives || [])\n .forEach(alternative => {\n let data;\n\n if (/^data:/i.test(alternative.path || alternative.href)) {\n alternative = this._processDataUrl(alternative);\n }\n\n data = {\n contentType: alternative.contentType || mimeFuncs.detectMimeType(alternative.filename || alternative.path || alternative.href || 'txt'),\n contentTransferEncoding: alternative.contentTransferEncoding\n };\n\n if (alternative.filename) {\n data.filename = alternative.filename;\n }\n\n if (/^https?:\\/\\//i.test(alternative.path)) {\n alternative.href = alternative.path;\n alternative.path = undefined;\n }\n\n if (alternative.raw) {\n data.raw = alternative.raw;\n } else if (alternative.path) {\n data.content = {\n path: alternative.path\n };\n } else if (alternative.href) {\n data.content = {\n href: alternative.href\n };\n } else {\n data.content = alternative.content || '';\n }\n\n if (alternative.encoding) {\n data.encoding = alternative.encoding;\n }\n\n if (alternative.headers) {\n data.headers = alternative.headers;\n }\n\n alternatives.push(data);\n });\n\n return alternatives;\n }\n\n /**\n * Builds multipart/mixed node. It should always contain different type of elements on the same level\n * eg. text + attachments\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @returns {Object} MimeNode node element\n */\n _createMixed(parentNode) {\n let node;\n\n if (!parentNode) {\n node = new MimeNode('multipart/mixed', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild('multipart/mixed', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n if (this._useAlternative) {\n this._createAlternative(node);\n } else if (this._useRelated) {\n this._createRelated(node);\n }\n\n []\n .concat((!this._useAlternative && this._alternatives) || [])\n .concat(this._attachments.attached || [])\n .forEach(element => {\n // if the element is a html node from related subpart then ignore it\n if (!this._useRelated || element !== this._htmlNode) {\n this._createContentNode(node, element);\n }\n });\n\n return node;\n }\n\n /**\n * Builds multipart/alternative node. It should always contain same type of elements on the same level\n * eg. text + html view of the same data\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @returns {Object} MimeNode node element\n */\n _createAlternative(parentNode) {\n let node;\n\n if (!parentNode) {\n node = new MimeNode('multipart/alternative', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild('multipart/alternative', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n this._alternatives.forEach(alternative => {\n if (this._useRelated && this._htmlNode === alternative) {\n this._createRelated(node);\n } else {\n this._createContentNode(node, alternative);\n }\n });\n\n return node;\n }\n\n /**\n * Builds multipart/related node. It should always contain html node with related attachments\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @returns {Object} MimeNode node element\n */\n _createRelated(parentNode) {\n let node;\n\n if (!parentNode) {\n node = new MimeNode('multipart/related; type=\"text/html\"', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild('multipart/related; type=\"text/html\"', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n this._createContentNode(node, this._htmlNode);\n\n this._attachments.related.forEach(alternative => this._createContentNode(node, alternative));\n\n return node;\n }\n\n /**\n * Creates a regular node with contents\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @param {Object} element Node data\n * @returns {Object} MimeNode node element\n */\n _createContentNode(parentNode, element) {\n element = element || {};\n element.content = element.content || '';\n\n let node;\n let encoding = (element.encoding || 'utf8')\n .toString()\n .toLowerCase()\n .replace(/[-_\\s]/g, '');\n\n if (!parentNode) {\n node = new MimeNode(element.contentType, {\n filename: element.filename,\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild(element.contentType, {\n filename: element.filename,\n textEncoding: this.mail.textEncoding,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n // add custom headers\n if (element.headers) {\n node.addHeader(element.headers);\n }\n\n if (element.cid) {\n node.setHeader('Content-Id', '<' + element.cid.replace(/[<>]/g, '') + '>');\n }\n\n if (element.contentTransferEncoding) {\n node.setHeader('Content-Transfer-Encoding', element.contentTransferEncoding);\n } else if (this.mail.encoding && /^text\\//i.test(element.contentType)) {\n node.setHeader('Content-Transfer-Encoding', this.mail.encoding);\n }\n\n if (!/^text\\//i.test(element.contentType) || element.contentDisposition) {\n node.setHeader(\n 'Content-Disposition',\n element.contentDisposition || (element.cid && /^image\\//i.test(element.contentType) ? 'inline' : 'attachment')\n );\n }\n\n if (typeof element.content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {\n element.content = Buffer.from(element.content, encoding);\n }\n\n // prefer pregenerated raw content\n if (element.raw) {\n node.setRaw(element.raw);\n } else {\n node.setContent(element.content);\n }\n\n return node;\n }\n\n /**\n * Parses data uri and converts it to a Buffer\n *\n * @param {Object} element Content element\n * @return {Object} Parsed element\n */\n _processDataUrl(element) {\n let parsedDataUri;\n if ((element.path || element.href).match(/^data:/)) {\n parsedDataUri = parseDataURI(element.path || element.href);\n }\n\n if (!parsedDataUri) {\n return element;\n }\n\n element.content = parsedDataUri.data;\n element.contentType = element.contentType || parsedDataUri.contentType;\n\n if ('path' in element) {\n element.path = false;\n }\n\n if ('href' in element) {\n element.href = false;\n }\n\n return element;\n }\n}\n\nmodule.exports = MailComposer;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst shared = require('../shared');\nconst mimeTypes = require('../mime-funcs/mime-types');\nconst MailComposer = require('../mail-composer');\nconst DKIM = require('../dkim');\nconst httpProxyClient = require('../smtp-connection/http-proxy-client');\nconst util = require('util');\nconst urllib = require('url');\nconst packageData = require('../../package.json');\nconst MailMessage = require('./mail-message');\nconst net = require('net');\nconst dns = require('dns');\nconst crypto = require('crypto');\n\n/**\n * Creates an object for exposing the Mail API\n *\n * @constructor\n * @param {Object} transporter Transport object instance to pass the mails to\n */\nclass Mail extends EventEmitter {\n constructor(transporter, options, defaults) {\n super();\n\n this.options = options || {};\n this._defaults = defaults || {};\n\n this._defaultPlugins = {\n compile: [(...args) => this._convertDataImages(...args)],\n stream: []\n };\n\n this._userPlugins = {\n compile: [],\n stream: []\n };\n\n this.meta = new Map();\n\n this.dkim = this.options.dkim ? new DKIM(this.options.dkim) : false;\n\n this.transporter = transporter;\n this.transporter.mailer = this;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'mail'\n });\n\n this.logger.debug(\n {\n tnx: 'create'\n },\n 'Creating transport: %s',\n this.getVersionString()\n );\n\n // setup emit handlers for the transporter\n if (typeof this.transporter.on === 'function') {\n // deprecated log interface\n this.transporter.on('log', log => {\n this.logger.debug(\n {\n tnx: 'transport'\n },\n '%s: %s',\n log.type,\n log.message\n );\n });\n\n // transporter errors\n this.transporter.on('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'transport'\n },\n 'Transport Error: %s',\n err.message\n );\n this.emit('error', err);\n });\n\n // indicates if the sender has became idle\n this.transporter.on('idle', (...args) => {\n this.emit('idle', ...args);\n });\n }\n\n /**\n * Optional methods passed to the underlying transport object\n */\n ['close', 'isIdle', 'verify'].forEach(method => {\n this[method] = (...args) => {\n if (typeof this.transporter[method] === 'function') {\n if (method === 'verify' && typeof this.getSocket === 'function') {\n this.transporter.getSocket = this.getSocket;\n this.getSocket = false;\n }\n return this.transporter[method](...args);\n } else {\n this.logger.warn(\n {\n tnx: 'transport',\n methodName: method\n },\n 'Non existing method %s called for transport',\n method\n );\n return false;\n }\n };\n });\n\n // setup proxy handling\n if (this.options.proxy && typeof this.options.proxy === 'string') {\n this.setupProxy(this.options.proxy);\n }\n }\n\n use(step, plugin) {\n step = (step || '').toString();\n if (!this._userPlugins.hasOwnProperty(step)) {\n this._userPlugins[step] = [plugin];\n } else {\n this._userPlugins[step].push(plugin);\n }\n\n return this;\n }\n\n /**\n * Sends an email using the preselected transport object\n *\n * @param {Object} data E-data description\n * @param {Function?} callback Callback to run once the sending succeeded or failed\n */\n sendMail(data, callback = null) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n if (typeof this.getSocket === 'function') {\n this.transporter.getSocket = this.getSocket;\n this.getSocket = false;\n }\n\n let mail = new MailMessage(this, data);\n\n this.logger.debug(\n {\n tnx: 'transport',\n name: this.transporter.name,\n version: this.transporter.version,\n action: 'send'\n },\n 'Sending mail using %s/%s',\n this.transporter.name,\n this.transporter.version\n );\n\n this._processPlugins('compile', mail, err => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'plugin',\n action: 'compile'\n },\n 'PluginCompile Error: %s',\n err.message\n );\n return callback(err);\n }\n\n mail.message = new MailComposer(mail.data).compile();\n\n mail.setMailerHeader();\n mail.setPriorityHeaders();\n mail.setListHeaders();\n\n this._processPlugins('stream', mail, err => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'plugin',\n action: 'stream'\n },\n 'PluginStream Error: %s',\n err.message\n );\n return callback(err);\n }\n\n if (mail.data.dkim || this.dkim) {\n mail.message.processFunc(input => {\n let dkim = mail.data.dkim ? new DKIM(mail.data.dkim) : this.dkim;\n this.logger.debug(\n {\n tnx: 'DKIM',\n messageId: mail.message.messageId(),\n dkimDomains: dkim.keys.map(key => key.keySelector + '.' + key.domainName).join(', ')\n },\n 'Signing outgoing message with %s keys',\n dkim.keys.length\n );\n return dkim.sign(input, mail.data._dkim);\n });\n }\n\n this.transporter.send(mail, (...args) => {\n if (args[0]) {\n this.logger.error(\n {\n err: args[0],\n tnx: 'transport',\n action: 'send'\n },\n 'Send Error: %s',\n args[0].message\n );\n }\n callback(...args);\n });\n });\n });\n\n return promise;\n }\n\n getVersionString() {\n return util.format('%s (%s; +%s; %s/%s)', packageData.name, packageData.version, packageData.homepage, this.transporter.name, this.transporter.version);\n }\n\n _processPlugins(step, mail, callback) {\n step = (step || '').toString();\n\n if (!this._userPlugins.hasOwnProperty(step)) {\n return callback();\n }\n\n let userPlugins = this._userPlugins[step] || [];\n let defaultPlugins = this._defaultPlugins[step] || [];\n\n if (userPlugins.length) {\n this.logger.debug(\n {\n tnx: 'transaction',\n pluginCount: userPlugins.length,\n step\n },\n 'Using %s plugins for %s',\n userPlugins.length,\n step\n );\n }\n\n if (userPlugins.length + defaultPlugins.length === 0) {\n return callback();\n }\n\n let pos = 0;\n let block = 'default';\n let processPlugins = () => {\n let curplugins = block === 'default' ? defaultPlugins : userPlugins;\n if (pos >= curplugins.length) {\n if (block === 'default' && userPlugins.length) {\n block = 'user';\n pos = 0;\n curplugins = userPlugins;\n } else {\n return callback();\n }\n }\n let plugin = curplugins[pos++];\n plugin(mail, err => {\n if (err) {\n return callback(err);\n }\n processPlugins();\n });\n };\n\n processPlugins();\n }\n\n /**\n * Sets up proxy handler for a Nodemailer object\n *\n * @param {String} proxyUrl Proxy configuration url\n */\n setupProxy(proxyUrl) {\n let proxy = urllib.parse(proxyUrl);\n\n // setup socket handler for the mailer object\n this.getSocket = (options, callback) => {\n let protocol = proxy.protocol.replace(/:$/, '').toLowerCase();\n\n if (this.meta.has('proxy_handler_' + protocol)) {\n return this.meta.get('proxy_handler_' + protocol)(proxy, options, callback);\n }\n\n switch (protocol) {\n // Connect using a HTTP CONNECT method\n case 'http':\n case 'https':\n httpProxyClient(proxy.href, options.port, options.host, (err, socket) => {\n if (err) {\n return callback(err);\n }\n return callback(null, {\n connection: socket\n });\n });\n return;\n case 'socks':\n case 'socks5':\n case 'socks4':\n case 'socks4a': {\n if (!this.meta.has('proxy_socks_module')) {\n return callback(new Error('Socks module not loaded'));\n }\n let connect = ipaddress => {\n let proxyV2 = !!this.meta.get('proxy_socks_module').SocksClient;\n let socksClient = proxyV2 ? this.meta.get('proxy_socks_module').SocksClient : this.meta.get('proxy_socks_module');\n let proxyType = Number(proxy.protocol.replace(/\\D/g, '')) || 5;\n let connectionOpts = {\n proxy: {\n ipaddress,\n port: Number(proxy.port),\n type: proxyType\n },\n [proxyV2 ? 'destination' : 'target']: {\n host: options.host,\n port: options.port\n },\n command: 'connect'\n };\n\n if (proxy.auth) {\n let username = decodeURIComponent(proxy.auth.split(':').shift());\n let password = decodeURIComponent(proxy.auth.split(':').pop());\n if (proxyV2) {\n connectionOpts.proxy.userId = username;\n connectionOpts.proxy.password = password;\n } else if (proxyType === 4) {\n connectionOpts.userid = username;\n } else {\n connectionOpts.authentication = {\n username,\n password\n };\n }\n }\n\n socksClient.createConnection(connectionOpts, (err, info) => {\n if (err) {\n return callback(err);\n }\n return callback(null, {\n connection: info.socket || info\n });\n });\n };\n\n if (net.isIP(proxy.hostname)) {\n return connect(proxy.hostname);\n }\n\n return dns.resolve(proxy.hostname, (err, address) => {\n if (err) {\n return callback(err);\n }\n connect(Array.isArray(address) ? address[0] : address);\n });\n }\n }\n callback(new Error('Unknown proxy configuration'));\n };\n }\n\n _convertDataImages(mail, callback) {\n if ((!this.options.attachDataUrls && !mail.data.attachDataUrls) || !mail.data.html) {\n return callback();\n }\n mail.resolveContent(mail.data, 'html', (err, html) => {\n if (err) {\n return callback(err);\n }\n let cidCounter = 0;\n html = (html || '')\n .toString()\n .replace(/(]{0,1024} src\\s{0,20}=[\\s\"']{0,20})(data:([^;]+);[^\"'>\\s]+)/gi, (match, prefix, dataUri, mimeType) => {\n let cid = crypto.randomBytes(10).toString('hex') + '@localhost';\n if (!mail.data.attachments) {\n mail.data.attachments = [];\n }\n if (!Array.isArray(mail.data.attachments)) {\n mail.data.attachments = [].concat(mail.data.attachments || []);\n }\n mail.data.attachments.push({\n path: dataUri,\n cid,\n filename: 'image-' + ++cidCounter + '.' + mimeTypes.detectExtension(mimeType)\n });\n return prefix + 'cid:' + cid;\n });\n mail.data.html = html;\n callback();\n });\n }\n\n set(key, value) {\n return this.meta.set(key, value);\n }\n\n get(key) {\n return this.meta.get(key);\n }\n}\n\nmodule.exports = Mail;\n","'use strict';\n\nconst shared = require('../shared');\nconst MimeNode = require('../mime-node');\nconst mimeFuncs = require('../mime-funcs');\n\nclass MailMessage {\n constructor(mailer, data) {\n this.mailer = mailer;\n this.data = {};\n this.message = null;\n\n data = data || {};\n let options = mailer.options || {};\n let defaults = mailer._defaults || {};\n\n Object.keys(data).forEach(key => {\n this.data[key] = data[key];\n });\n\n this.data.headers = this.data.headers || {};\n\n // apply defaults\n Object.keys(defaults).forEach(key => {\n if (!(key in this.data)) {\n this.data[key] = defaults[key];\n } else if (key === 'headers') {\n // headers is a special case. Allow setting individual default headers\n Object.keys(defaults.headers).forEach(key => {\n if (!(key in this.data.headers)) {\n this.data.headers[key] = defaults.headers[key];\n }\n });\n }\n });\n\n // force specific keys from transporter options\n ['disableFileAccess', 'disableUrlAccess', 'normalizeHeaderKey'].forEach(key => {\n if (key in options) {\n this.data[key] = options[key];\n }\n });\n }\n\n resolveContent(...args) {\n return shared.resolveContent(...args);\n }\n\n resolveAll(callback) {\n let keys = [\n [this.data, 'html'],\n [this.data, 'text'],\n [this.data, 'watchHtml'],\n [this.data, 'amp'],\n [this.data, 'icalEvent']\n ];\n\n if (this.data.alternatives && this.data.alternatives.length) {\n this.data.alternatives.forEach((alternative, i) => {\n keys.push([this.data.alternatives, i]);\n });\n }\n\n if (this.data.attachments && this.data.attachments.length) {\n this.data.attachments.forEach((attachment, i) => {\n if (!attachment.filename) {\n attachment.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);\n if (attachment.filename.indexOf('.') < 0) {\n attachment.filename += '.' + mimeFuncs.detectExtension(attachment.contentType);\n }\n }\n\n if (!attachment.contentType) {\n attachment.contentType = mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');\n }\n\n keys.push([this.data.attachments, i]);\n });\n }\n\n let mimeNode = new MimeNode();\n\n let addressKeys = ['from', 'to', 'cc', 'bcc', 'sender', 'replyTo'];\n\n addressKeys.forEach(address => {\n let value;\n if (this.message) {\n value = [].concat(mimeNode._parseAddresses(this.message.getHeader(address === 'replyTo' ? 'reply-to' : address)) || []);\n } else if (this.data[address]) {\n value = [].concat(mimeNode._parseAddresses(this.data[address]) || []);\n }\n if (value && value.length) {\n this.data[address] = value;\n } else if (address in this.data) {\n this.data[address] = null;\n }\n });\n\n let singleKeys = ['from', 'sender'];\n singleKeys.forEach(address => {\n if (this.data[address]) {\n this.data[address] = this.data[address].shift();\n }\n });\n\n let pos = 0;\n let resolveNext = () => {\n if (pos >= keys.length) {\n return callback(null, this.data);\n }\n let args = keys[pos++];\n if (!args[0] || !args[0][args[1]]) {\n return resolveNext();\n }\n shared.resolveContent(...args, (err, value) => {\n if (err) {\n return callback(err);\n }\n\n let node = {\n content: value\n };\n if (args[0][args[1]] && typeof args[0][args[1]] === 'object' && !Buffer.isBuffer(args[0][args[1]])) {\n Object.keys(args[0][args[1]]).forEach(key => {\n if (!(key in node) && !['content', 'path', 'href', 'raw'].includes(key)) {\n node[key] = args[0][args[1]][key];\n }\n });\n }\n\n args[0][args[1]] = node;\n resolveNext();\n });\n };\n\n setImmediate(() => resolveNext());\n }\n\n normalize(callback) {\n let envelope = this.data.envelope || this.message.getEnvelope();\n let messageId = this.message.messageId();\n\n this.resolveAll((err, data) => {\n if (err) {\n return callback(err);\n }\n\n data.envelope = envelope;\n data.messageId = messageId;\n\n ['html', 'text', 'watchHtml', 'amp'].forEach(key => {\n if (data[key] && data[key].content) {\n if (typeof data[key].content === 'string') {\n data[key] = data[key].content;\n } else if (Buffer.isBuffer(data[key].content)) {\n data[key] = data[key].content.toString();\n }\n }\n });\n\n if (data.icalEvent && Buffer.isBuffer(data.icalEvent.content)) {\n data.icalEvent.content = data.icalEvent.content.toString('base64');\n data.icalEvent.encoding = 'base64';\n }\n\n if (data.alternatives && data.alternatives.length) {\n data.alternatives.forEach(alternative => {\n if (alternative && alternative.content && Buffer.isBuffer(alternative.content)) {\n alternative.content = alternative.content.toString('base64');\n alternative.encoding = 'base64';\n }\n });\n }\n\n if (data.attachments && data.attachments.length) {\n data.attachments.forEach(attachment => {\n if (attachment && attachment.content && Buffer.isBuffer(attachment.content)) {\n attachment.content = attachment.content.toString('base64');\n attachment.encoding = 'base64';\n }\n });\n }\n\n data.normalizedHeaders = {};\n Object.keys(data.headers || {}).forEach(key => {\n let value = [].concat(data.headers[key] || []).shift();\n value = (value && value.value) || value;\n if (value) {\n if (['references', 'in-reply-to', 'message-id', 'content-id'].includes(key)) {\n value = this.message._encodeHeaderValue(key, value);\n }\n data.normalizedHeaders[key] = value;\n }\n });\n\n if (data.list && typeof data.list === 'object') {\n let listHeaders = this._getListHeaders(data.list);\n listHeaders.forEach(entry => {\n data.normalizedHeaders[entry.key] = entry.value.map(val => (val && val.value) || val).join(', ');\n });\n }\n\n if (data.references) {\n data.normalizedHeaders.references = this.message._encodeHeaderValue('references', data.references);\n }\n\n if (data.inReplyTo) {\n data.normalizedHeaders['in-reply-to'] = this.message._encodeHeaderValue('in-reply-to', data.inReplyTo);\n }\n\n return callback(null, data);\n });\n }\n\n setMailerHeader() {\n if (!this.message || !this.data.xMailer) {\n return;\n }\n this.message.setHeader('X-Mailer', this.data.xMailer);\n }\n\n setPriorityHeaders() {\n if (!this.message || !this.data.priority) {\n return;\n }\n switch ((this.data.priority || '').toString().toLowerCase()) {\n case 'high':\n this.message.setHeader('X-Priority', '1 (Highest)');\n this.message.setHeader('X-MSMail-Priority', 'High');\n this.message.setHeader('Importance', 'High');\n break;\n case 'low':\n this.message.setHeader('X-Priority', '5 (Lowest)');\n this.message.setHeader('X-MSMail-Priority', 'Low');\n this.message.setHeader('Importance', 'Low');\n break;\n default:\n // do not add anything, since all messages are 'Normal' by default\n }\n }\n\n setListHeaders() {\n if (!this.message || !this.data.list || typeof this.data.list !== 'object') {\n return;\n }\n // add optional List-* headers\n if (this.data.list && typeof this.data.list === 'object') {\n this._getListHeaders(this.data.list).forEach(listHeader => {\n listHeader.value.forEach(value => {\n this.message.addHeader(listHeader.key, value);\n });\n });\n }\n }\n\n _getListHeaders(listData) {\n // make sure an url looks like \n return Object.keys(listData).map(key => ({\n key: 'list-' + key.toLowerCase().trim(),\n value: [].concat(listData[key] || []).map(value => ({\n prepared: true,\n foldLines: true,\n value: []\n .concat(value || [])\n .map(value => {\n if (typeof value === 'string') {\n value = {\n url: value\n };\n }\n\n if (value && value.url) {\n if (key.toLowerCase().trim() === 'id') {\n // List-ID: \"comment\" \n let comment = value.comment || '';\n if (mimeFuncs.isPlainText(comment)) {\n comment = '\"' + comment + '\"';\n } else {\n comment = mimeFuncs.encodeWord(comment);\n }\n\n return (value.comment ? comment + ' ' : '') + this._formatListUrl(value.url).replace(/^<[^:]+\\/{,2}/, '');\n }\n\n // List-*: (comment)\n let comment = value.comment || '';\n if (!mimeFuncs.isPlainText(comment)) {\n comment = mimeFuncs.encodeWord(comment);\n }\n\n return this._formatListUrl(value.url) + (value.comment ? ' (' + comment + ')' : '');\n }\n\n return '';\n })\n .filter(value => value)\n .join(', ')\n }))\n }));\n }\n\n _formatListUrl(url) {\n url = url.replace(/[\\s<]+|[\\s>]+/g, '');\n if (/^(https?|mailto|ftp):/.test(url)) {\n return '<' + url + '>';\n }\n if (/^[^@]+@[^@]+$/.test(url)) {\n return '';\n }\n\n return '';\n }\n}\n\nmodule.exports = MailMessage;\n","/* eslint no-control-regex:0 */\n\n'use strict';\n\nconst base64 = require('../base64');\nconst qp = require('../qp');\nconst mimeTypes = require('./mime-types');\n\nmodule.exports = {\n /**\n * Checks if a value is plaintext string (uses only printable 7bit chars)\n *\n * @param {String} value String to be tested\n * @returns {Boolean} true if it is a plaintext string\n */\n isPlainText(value, isParam) {\n const re = isParam ? /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\"\\u0080-\\uFFFF]/ : /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\u0080-\\uFFFF]/;\n if (typeof value !== 'string' || re.test(value)) {\n return false;\n } else {\n return true;\n }\n },\n\n /**\n * Checks if a multi line string containes lines longer than the selected value.\n *\n * Useful when detecting if a mail message needs any processing at all –\n * if only plaintext characters are used and lines are short, then there is\n * no need to encode the values in any way. If the value is plaintext but has\n * longer lines then allowed, then use format=flowed\n *\n * @param {Number} lineLength Max line length to check for\n * @returns {Boolean} Returns true if there is at least one line longer than lineLength chars\n */\n hasLongerLines(str, lineLength) {\n if (str.length > 128 * 1024) {\n // do not test strings longer than 128kB\n return true;\n }\n return new RegExp('^.{' + (lineLength + 1) + ',}', 'm').test(str);\n },\n\n /**\n * Encodes a string or an Buffer to an UTF-8 MIME Word (rfc2047)\n *\n * @param {String|Buffer} data String to be encoded\n * @param {String} mimeWordEncoding='Q' Encoding for the mime word, either Q or B\n * @param {Number} [maxLength=0] If set, split mime words into several chunks if needed\n * @return {String} Single or several mime words joined together\n */\n encodeWord(data, mimeWordEncoding, maxLength) {\n mimeWordEncoding = (mimeWordEncoding || 'Q').toString().toUpperCase().trim().charAt(0);\n maxLength = maxLength || 0;\n\n let encodedStr;\n let toCharset = 'UTF-8';\n\n if (maxLength && maxLength > 7 + toCharset.length) {\n maxLength -= 7 + toCharset.length;\n }\n\n if (mimeWordEncoding === 'Q') {\n // https://tools.ietf.org/html/rfc2047#section-5 rule (3)\n encodedStr = qp.encode(data).replace(/[^a-z0-9!*+\\-/=]/gi, chr => {\n let ord = chr.charCodeAt(0).toString(16).toUpperCase();\n if (chr === ' ') {\n return '_';\n } else {\n return '=' + (ord.length === 1 ? '0' + ord : ord);\n }\n });\n } else if (mimeWordEncoding === 'B') {\n encodedStr = typeof data === 'string' ? data : base64.encode(data);\n maxLength = maxLength ? Math.max(3, ((maxLength - (maxLength % 4)) / 4) * 3) : 0;\n }\n\n if (maxLength && (mimeWordEncoding !== 'B' ? encodedStr : base64.encode(data)).length > maxLength) {\n if (mimeWordEncoding === 'Q') {\n encodedStr = this.splitMimeEncodedString(encodedStr, maxLength).join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');\n } else {\n // RFC2047 6.3 (2) states that encoded-word must include an integral number of characters, so no chopping unicode sequences\n let parts = [];\n let lpart = '';\n for (let i = 0, len = encodedStr.length; i < len; i++) {\n let chr = encodedStr.charAt(i);\n\n if (/[\\ud83c\\ud83d\\ud83e]/.test(chr) && i < len - 1) {\n // composite emoji byte, so add the next byte as well\n chr += encodedStr.charAt(++i);\n }\n\n // check if we can add this character to the existing string\n // without breaking byte length limit\n if (Buffer.byteLength(lpart + chr) <= maxLength || i === 0) {\n lpart += chr;\n } else {\n // we hit the length limit, so push the existing string and start over\n parts.push(base64.encode(lpart));\n lpart = chr;\n }\n }\n if (lpart) {\n parts.push(base64.encode(lpart));\n }\n\n if (parts.length > 1) {\n encodedStr = parts.join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');\n } else {\n encodedStr = parts.join('');\n }\n }\n } else if (mimeWordEncoding === 'B') {\n encodedStr = base64.encode(data);\n }\n\n return '=?' + toCharset + '?' + mimeWordEncoding + '?' + encodedStr + (encodedStr.substr(-2) === '?=' ? '' : '?=');\n },\n\n /**\n * Finds word sequences with non ascii text and converts these to mime words\n *\n * @param {String} value String to be encoded\n * @param {String} mimeWordEncoding='Q' Encoding for the mime word, either Q or B\n * @param {Number} [maxLength=0] If set, split mime words into several chunks if needed\n * @param {Boolean} [encodeAll=false] If true and the value needs encoding then encodes entire string, not just the smallest match\n * @return {String} String with possible mime words\n */\n encodeWords(value, mimeWordEncoding, maxLength, encodeAll) {\n maxLength = maxLength || 0;\n\n let encodedValue;\n\n // find first word with a non-printable ascii or special symbol in it\n let firstMatch = value.match(/(?:^|\\s)([^\\s]*[\"\\u0080-\\uFFFF])/);\n if (!firstMatch) {\n return value;\n }\n\n if (encodeAll) {\n // if it is requested to encode everything or the string contains something that resebles encoded word, then encode everything\n\n return this.encodeWord(value, mimeWordEncoding, maxLength);\n }\n\n // find the last word with a non-printable ascii in it\n let lastMatch = value.match(/([\"\\u0080-\\uFFFF][^\\s]*)[^\"\\u0080-\\uFFFF]*$/);\n if (!lastMatch) {\n // should not happen\n return value;\n }\n\n let startIndex =\n firstMatch.index +\n (\n firstMatch[0].match(/[^\\s]/) || {\n index: 0\n }\n ).index;\n let endIndex = lastMatch.index + (lastMatch[1] || '').length;\n\n encodedValue =\n (startIndex ? value.substr(0, startIndex) : '') +\n this.encodeWord(value.substring(startIndex, endIndex), mimeWordEncoding || 'Q', maxLength) +\n (endIndex < value.length ? value.substr(endIndex) : '');\n\n return encodedValue;\n },\n\n /**\n * Joins parsed header value together as 'value; param1=value1; param2=value2'\n * PS: We are following RFC 822 for the list of special characters that we need to keep in quotes.\n * Refer: https://www.w3.org/Protocols/rfc1341/4_Content-Type.html\n * @param {Object} structured Parsed header value\n * @return {String} joined header value\n */\n buildHeaderValue(structured) {\n let paramsArray = [];\n\n Object.keys(structured.params || {}).forEach(param => {\n // filename might include unicode characters so it is a special case\n // other values probably do not\n let value = structured.params[param];\n if (!this.isPlainText(value, true) || value.length >= 75) {\n this.buildHeaderParam(param, value, 50).forEach(encodedParam => {\n if (!/[\\s\"\\\\;:/=(),<>@[\\]?]|^[-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {\n paramsArray.push(encodedParam.key + '=' + encodedParam.value);\n } else {\n paramsArray.push(encodedParam.key + '=' + JSON.stringify(encodedParam.value));\n }\n });\n } else if (/[\\s'\"\\\\;:/=(),<>@[\\]?]|^-/.test(value)) {\n paramsArray.push(param + '=' + JSON.stringify(value));\n } else {\n paramsArray.push(param + '=' + value);\n }\n });\n\n return structured.value + (paramsArray.length ? '; ' + paramsArray.join('; ') : '');\n },\n\n /**\n * Encodes a string or an Buffer to an UTF-8 Parameter Value Continuation encoding (rfc2231)\n * Useful for splitting long parameter values.\n *\n * For example\n * title=\"unicode string\"\n * becomes\n * title*0*=utf-8''unicode\n * title*1*=%20string\n *\n * @param {String|Buffer} data String to be encoded\n * @param {Number} [maxLength=50] Max length for generated chunks\n * @param {String} [fromCharset='UTF-8'] Source sharacter set\n * @return {Array} A list of encoded keys and headers\n */\n buildHeaderParam(key, data, maxLength) {\n let list = [];\n let encodedStr = typeof data === 'string' ? data : (data || '').toString();\n let encodedStrArr;\n let chr, ord;\n let line;\n let startPos = 0;\n let i, len;\n\n maxLength = maxLength || 50;\n\n // process ascii only text\n if (this.isPlainText(data, true)) {\n // check if conversion is even needed\n if (encodedStr.length <= maxLength) {\n return [\n {\n key,\n value: encodedStr\n }\n ];\n }\n\n encodedStr = encodedStr.replace(new RegExp('.{' + maxLength + '}', 'g'), str => {\n list.push({\n line: str\n });\n return '';\n });\n\n if (encodedStr) {\n list.push({\n line: encodedStr\n });\n }\n } else {\n if (/[\\uD800-\\uDBFF]/.test(encodedStr)) {\n // string containts surrogate pairs, so normalize it to an array of bytes\n encodedStrArr = [];\n for (i = 0, len = encodedStr.length; i < len; i++) {\n chr = encodedStr.charAt(i);\n ord = chr.charCodeAt(0);\n if (ord >= 0xd800 && ord <= 0xdbff && i < len - 1) {\n chr += encodedStr.charAt(i + 1);\n encodedStrArr.push(chr);\n i++;\n } else {\n encodedStrArr.push(chr);\n }\n }\n encodedStr = encodedStrArr;\n }\n\n // first line includes the charset and language info and needs to be encoded\n // even if it does not contain any unicode characters\n line = 'utf-8\\x27\\x27';\n let encoded = true;\n startPos = 0;\n\n // process text with unicode or special chars\n for (i = 0, len = encodedStr.length; i < len; i++) {\n chr = encodedStr[i];\n\n if (encoded) {\n chr = this.safeEncodeURIComponent(chr);\n } else {\n // try to urlencode current char\n chr = chr === ' ' ? chr : this.safeEncodeURIComponent(chr);\n // By default it is not required to encode a line, the need\n // only appears when the string contains unicode or special chars\n // in this case we start processing the line over and encode all chars\n if (chr !== encodedStr[i]) {\n // Check if it is even possible to add the encoded char to the line\n // If not, there is no reason to use this line, just push it to the list\n // and start a new line with the char that needs encoding\n if ((this.safeEncodeURIComponent(line) + chr).length >= maxLength) {\n list.push({\n line,\n encoded\n });\n line = '';\n startPos = i - 1;\n } else {\n encoded = true;\n i = startPos;\n line = '';\n continue;\n }\n }\n }\n\n // if the line is already too long, push it to the list and start a new one\n if ((line + chr).length >= maxLength) {\n list.push({\n line,\n encoded\n });\n line = chr = encodedStr[i] === ' ' ? ' ' : this.safeEncodeURIComponent(encodedStr[i]);\n if (chr === encodedStr[i]) {\n encoded = false;\n startPos = i - 1;\n } else {\n encoded = true;\n }\n } else {\n line += chr;\n }\n }\n\n if (line) {\n list.push({\n line,\n encoded\n });\n }\n }\n\n return list.map((item, i) => ({\n // encoded lines: {name}*{part}*\n // unencoded lines: {name}*{part}\n // if any line needs to be encoded then the first line (part==0) is always encoded\n key: key + '*' + i + (item.encoded ? '*' : ''),\n value: item.line\n }));\n },\n\n /**\n * Parses a header value with key=value arguments into a structured\n * object.\n *\n * parseHeaderValue('content-type: text/plain; CHARSET='UTF-8'') ->\n * {\n * 'value': 'text/plain',\n * 'params': {\n * 'charset': 'UTF-8'\n * }\n * }\n *\n * @param {String} str Header value\n * @return {Object} Header value as a parsed structure\n */\n parseHeaderValue(str) {\n let response = {\n value: false,\n params: {}\n };\n let key = false;\n let value = '';\n let type = 'value';\n let quote = false;\n let escaped = false;\n let chr;\n\n for (let i = 0, len = str.length; i < len; i++) {\n chr = str.charAt(i);\n if (type === 'key') {\n if (chr === '=') {\n key = value.trim().toLowerCase();\n type = 'value';\n value = '';\n continue;\n }\n value += chr;\n } else {\n if (escaped) {\n value += chr;\n } else if (chr === '\\\\') {\n escaped = true;\n continue;\n } else if (quote && chr === quote) {\n quote = false;\n } else if (!quote && chr === '\"') {\n quote = chr;\n } else if (!quote && chr === ';') {\n if (key === false) {\n response.value = value.trim();\n } else {\n response.params[key] = value.trim();\n }\n type = 'key';\n value = '';\n } else {\n value += chr;\n }\n escaped = false;\n }\n }\n\n if (type === 'value') {\n if (key === false) {\n response.value = value.trim();\n } else {\n response.params[key] = value.trim();\n }\n } else if (value.trim()) {\n response.params[value.trim().toLowerCase()] = '';\n }\n\n // handle parameter value continuations\n // https://tools.ietf.org/html/rfc2231#section-3\n\n // preprocess values\n Object.keys(response.params).forEach(key => {\n let actualKey, nr, match, value;\n if ((match = key.match(/(\\*(\\d+)|\\*(\\d+)\\*|\\*)$/))) {\n actualKey = key.substr(0, match.index);\n nr = Number(match[2] || match[3]) || 0;\n\n if (!response.params[actualKey] || typeof response.params[actualKey] !== 'object') {\n response.params[actualKey] = {\n charset: false,\n values: []\n };\n }\n\n value = response.params[key];\n\n if (nr === 0 && match[0].substr(-1) === '*' && (match = value.match(/^([^']*)'[^']*'(.*)$/))) {\n response.params[actualKey].charset = match[1] || 'iso-8859-1';\n value = match[2];\n }\n\n response.params[actualKey].values[nr] = value;\n\n // remove the old reference\n delete response.params[key];\n }\n });\n\n // concatenate split rfc2231 strings and convert encoded strings to mime encoded words\n Object.keys(response.params).forEach(key => {\n let value;\n if (response.params[key] && Array.isArray(response.params[key].values)) {\n value = response.params[key].values.map(val => val || '').join('');\n\n if (response.params[key].charset) {\n // convert \"%AB\" to \"=?charset?Q?=AB?=\"\n response.params[key] =\n '=?' +\n response.params[key].charset +\n '?Q?' +\n value\n // fix invalidly encoded chars\n .replace(/[=?_\\s]/g, s => {\n let c = s.charCodeAt(0).toString(16);\n if (s === ' ') {\n return '_';\n } else {\n return '%' + (c.length < 2 ? '0' : '') + c;\n }\n })\n // change from urlencoding to percent encoding\n .replace(/%/g, '=') +\n '?=';\n } else {\n response.params[key] = value;\n }\n }\n });\n\n return response;\n },\n\n /**\n * Returns file extension for a content type string. If no suitable extensions\n * are found, 'bin' is used as the default extension\n *\n * @param {String} mimeType Content type to be checked for\n * @return {String} File extension\n */\n detectExtension: mimeType => mimeTypes.detectExtension(mimeType),\n\n /**\n * Returns content type for a file extension. If no suitable content types\n * are found, 'application/octet-stream' is used as the default content type\n *\n * @param {String} extension Extension to be checked for\n * @return {String} File extension\n */\n detectMimeType: extension => mimeTypes.detectMimeType(extension),\n\n /**\n * Folds long lines, useful for folding header lines (afterSpace=false) and\n * flowed text (afterSpace=true)\n *\n * @param {String} str String to be folded\n * @param {Number} [lineLength=76] Maximum length of a line\n * @param {Boolean} afterSpace If true, leave a space in th end of a line\n * @return {String} String with folded lines\n */\n foldLines(str, lineLength, afterSpace) {\n str = (str || '').toString();\n lineLength = lineLength || 76;\n\n let pos = 0,\n len = str.length,\n result = '',\n line,\n match;\n\n while (pos < len) {\n line = str.substr(pos, lineLength);\n if (line.length < lineLength) {\n result += line;\n break;\n }\n if ((match = line.match(/^[^\\n\\r]*(\\r?\\n|\\r)/))) {\n line = match[0];\n result += line;\n pos += line.length;\n continue;\n } else if ((match = line.match(/(\\s+)[^\\s]*$/)) && match[0].length - (afterSpace ? (match[1] || '').length : 0) < line.length) {\n line = line.substr(0, line.length - (match[0].length - (afterSpace ? (match[1] || '').length : 0)));\n } else if ((match = str.substr(pos + line.length).match(/^[^\\s]+(\\s*)/))) {\n line = line + match[0].substr(0, match[0].length - (!afterSpace ? (match[1] || '').length : 0));\n }\n\n result += line;\n pos += line.length;\n if (pos < len) {\n result += '\\r\\n';\n }\n }\n\n return result;\n },\n\n /**\n * Splits a mime encoded string. Needed for dividing mime words into smaller chunks\n *\n * @param {String} str Mime encoded string to be split up\n * @param {Number} maxlen Maximum length of characters for one part (minimum 12)\n * @return {Array} Split string\n */\n splitMimeEncodedString: (str, maxlen) => {\n let curLine,\n match,\n chr,\n done,\n lines = [];\n\n // require at least 12 symbols to fit possible 4 octet UTF-8 sequences\n maxlen = Math.max(maxlen || 0, 12);\n\n while (str.length) {\n curLine = str.substr(0, maxlen);\n\n // move incomplete escaped char back to main\n if ((match = curLine.match(/[=][0-9A-F]?$/i))) {\n curLine = curLine.substr(0, match.index);\n }\n\n done = false;\n while (!done) {\n done = true;\n // check if not middle of a unicode char sequence\n if ((match = str.substr(curLine.length).match(/^[=]([0-9A-F]{2})/i))) {\n chr = parseInt(match[1], 16);\n // invalid sequence, move one char back anc recheck\n if (chr < 0xc2 && chr > 0x7f) {\n curLine = curLine.substr(0, curLine.length - 3);\n done = false;\n }\n }\n }\n\n if (curLine.length) {\n lines.push(curLine);\n }\n str = str.substr(curLine.length);\n }\n\n return lines;\n },\n\n encodeURICharComponent: chr => {\n let res = '';\n let ord = chr.charCodeAt(0).toString(16).toUpperCase();\n\n if (ord.length % 2) {\n ord = '0' + ord;\n }\n\n if (ord.length > 2) {\n for (let i = 0, len = ord.length / 2; i < len; i++) {\n res += '%' + ord.substr(i, 2);\n }\n } else {\n res += '%' + ord;\n }\n\n return res;\n },\n\n safeEncodeURIComponent(str) {\n str = (str || '').toString();\n\n try {\n // might throw if we try to encode invalid sequences, eg. partial emoji\n str = encodeURIComponent(str);\n } catch (E) {\n // should never run\n return str.replace(/[^\\x00-\\x1F *'()<>@,;:\\\\\"[\\]?=\\u007F-\\uFFFF]+/g, '');\n }\n\n // ensure chars that are not handled by encodeURICompent are converted as well\n return str.replace(/[\\x00-\\x1F *'()<>@,;:\\\\\"[\\]?=\\u007F-\\uFFFF]/g, chr => this.encodeURICharComponent(chr));\n }\n};\n","/* eslint quote-props: 0 */\n\n'use strict';\n\nconst path = require('path');\n\nconst defaultMimeType = 'application/octet-stream';\nconst defaultExtension = 'bin';\n\nconst mimeTypes = new Map([\n ['application/acad', 'dwg'],\n ['application/applixware', 'aw'],\n ['application/arj', 'arj'],\n ['application/atom+xml', 'xml'],\n ['application/atomcat+xml', 'atomcat'],\n ['application/atomsvc+xml', 'atomsvc'],\n ['application/base64', ['mm', 'mme']],\n ['application/binhex', 'hqx'],\n ['application/binhex4', 'hqx'],\n ['application/book', ['book', 'boo']],\n ['application/ccxml+xml,', 'ccxml'],\n ['application/cdf', 'cdf'],\n ['application/cdmi-capability', 'cdmia'],\n ['application/cdmi-container', 'cdmic'],\n ['application/cdmi-domain', 'cdmid'],\n ['application/cdmi-object', 'cdmio'],\n ['application/cdmi-queue', 'cdmiq'],\n ['application/clariscad', 'ccad'],\n ['application/commonground', 'dp'],\n ['application/cu-seeme', 'cu'],\n ['application/davmount+xml', 'davmount'],\n ['application/drafting', 'drw'],\n ['application/dsptype', 'tsp'],\n ['application/dssc+der', 'dssc'],\n ['application/dssc+xml', 'xdssc'],\n ['application/dxf', 'dxf'],\n ['application/ecmascript', ['js', 'es']],\n ['application/emma+xml', 'emma'],\n ['application/envoy', 'evy'],\n ['application/epub+zip', 'epub'],\n ['application/excel', ['xls', 'xl', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],\n ['application/exi', 'exi'],\n ['application/font-tdpfr', 'pfr'],\n ['application/fractals', 'fif'],\n ['application/freeloader', 'frl'],\n ['application/futuresplash', 'spl'],\n ['application/gnutar', 'tgz'],\n ['application/groupwise', 'vew'],\n ['application/hlp', 'hlp'],\n ['application/hta', 'hta'],\n ['application/hyperstudio', 'stk'],\n ['application/i-deas', 'unv'],\n ['application/iges', ['iges', 'igs']],\n ['application/inf', 'inf'],\n ['application/internet-property-stream', 'acx'],\n ['application/ipfix', 'ipfix'],\n ['application/java', 'class'],\n ['application/java-archive', 'jar'],\n ['application/java-byte-code', 'class'],\n ['application/java-serialized-object', 'ser'],\n ['application/java-vm', 'class'],\n ['application/javascript', 'js'],\n ['application/json', 'json'],\n ['application/lha', 'lha'],\n ['application/lzx', 'lzx'],\n ['application/mac-binary', 'bin'],\n ['application/mac-binhex', 'hqx'],\n ['application/mac-binhex40', 'hqx'],\n ['application/mac-compactpro', 'cpt'],\n ['application/macbinary', 'bin'],\n ['application/mads+xml', 'mads'],\n ['application/marc', 'mrc'],\n ['application/marcxml+xml', 'mrcx'],\n ['application/mathematica', 'ma'],\n ['application/mathml+xml', 'mathml'],\n ['application/mbedlet', 'mbd'],\n ['application/mbox', 'mbox'],\n ['application/mcad', 'mcd'],\n ['application/mediaservercontrol+xml', 'mscml'],\n ['application/metalink4+xml', 'meta4'],\n ['application/mets+xml', 'mets'],\n ['application/mime', 'aps'],\n ['application/mods+xml', 'mods'],\n ['application/mp21', 'm21'],\n ['application/mp4', 'mp4'],\n ['application/mspowerpoint', ['ppt', 'pot', 'pps', 'ppz']],\n ['application/msword', ['doc', 'dot', 'w6w', 'wiz', 'word']],\n ['application/mswrite', 'wri'],\n ['application/mxf', 'mxf'],\n ['application/netmc', 'mcp'],\n ['application/octet-stream', ['*']],\n ['application/oda', 'oda'],\n ['application/oebps-package+xml', 'opf'],\n ['application/ogg', 'ogx'],\n ['application/olescript', 'axs'],\n ['application/onenote', 'onetoc'],\n ['application/patch-ops-error+xml', 'xer'],\n ['application/pdf', 'pdf'],\n ['application/pgp-encrypted', 'asc'],\n ['application/pgp-signature', 'pgp'],\n ['application/pics-rules', 'prf'],\n ['application/pkcs-12', 'p12'],\n ['application/pkcs-crl', 'crl'],\n ['application/pkcs10', 'p10'],\n ['application/pkcs7-mime', ['p7c', 'p7m']],\n ['application/pkcs7-signature', 'p7s'],\n ['application/pkcs8', 'p8'],\n ['application/pkix-attr-cert', 'ac'],\n ['application/pkix-cert', ['cer', 'crt']],\n ['application/pkix-crl', 'crl'],\n ['application/pkix-pkipath', 'pkipath'],\n ['application/pkixcmp', 'pki'],\n ['application/plain', 'text'],\n ['application/pls+xml', 'pls'],\n ['application/postscript', ['ps', 'ai', 'eps']],\n ['application/powerpoint', 'ppt'],\n ['application/pro_eng', ['part', 'prt']],\n ['application/prs.cww', 'cww'],\n ['application/pskc+xml', 'pskcxml'],\n ['application/rdf+xml', 'rdf'],\n ['application/reginfo+xml', 'rif'],\n ['application/relax-ng-compact-syntax', 'rnc'],\n ['application/resource-lists+xml', 'rl'],\n ['application/resource-lists-diff+xml', 'rld'],\n ['application/ringing-tones', 'rng'],\n ['application/rls-services+xml', 'rs'],\n ['application/rsd+xml', 'rsd'],\n ['application/rss+xml', 'xml'],\n ['application/rtf', ['rtf', 'rtx']],\n ['application/sbml+xml', 'sbml'],\n ['application/scvp-cv-request', 'scq'],\n ['application/scvp-cv-response', 'scs'],\n ['application/scvp-vp-request', 'spq'],\n ['application/scvp-vp-response', 'spp'],\n ['application/sdp', 'sdp'],\n ['application/sea', 'sea'],\n ['application/set', 'set'],\n ['application/set-payment-initiation', 'setpay'],\n ['application/set-registration-initiation', 'setreg'],\n ['application/shf+xml', 'shf'],\n ['application/sla', 'stl'],\n ['application/smil', ['smi', 'smil']],\n ['application/smil+xml', 'smi'],\n ['application/solids', 'sol'],\n ['application/sounder', 'sdr'],\n ['application/sparql-query', 'rq'],\n ['application/sparql-results+xml', 'srx'],\n ['application/srgs', 'gram'],\n ['application/srgs+xml', 'grxml'],\n ['application/sru+xml', 'sru'],\n ['application/ssml+xml', 'ssml'],\n ['application/step', ['step', 'stp']],\n ['application/streamingmedia', 'ssm'],\n ['application/tei+xml', 'tei'],\n ['application/thraud+xml', 'tfi'],\n ['application/timestamped-data', 'tsd'],\n ['application/toolbook', 'tbk'],\n ['application/vda', 'vda'],\n ['application/vnd.3gpp.pic-bw-large', 'plb'],\n ['application/vnd.3gpp.pic-bw-small', 'psb'],\n ['application/vnd.3gpp.pic-bw-var', 'pvb'],\n ['application/vnd.3gpp2.tcap', 'tcap'],\n ['application/vnd.3m.post-it-notes', 'pwn'],\n ['application/vnd.accpac.simply.aso', 'aso'],\n ['application/vnd.accpac.simply.imp', 'imp'],\n ['application/vnd.acucobol', 'acu'],\n ['application/vnd.acucorp', 'atc'],\n ['application/vnd.adobe.air-application-installer-package+zip', 'air'],\n ['application/vnd.adobe.fxp', 'fxp'],\n ['application/vnd.adobe.xdp+xml', 'xdp'],\n ['application/vnd.adobe.xfdf', 'xfdf'],\n ['application/vnd.ahead.space', 'ahead'],\n ['application/vnd.airzip.filesecure.azf', 'azf'],\n ['application/vnd.airzip.filesecure.azs', 'azs'],\n ['application/vnd.amazon.ebook', 'azw'],\n ['application/vnd.americandynamics.acc', 'acc'],\n ['application/vnd.amiga.ami', 'ami'],\n ['application/vnd.android.package-archive', 'apk'],\n ['application/vnd.anser-web-certificate-issue-initiation', 'cii'],\n ['application/vnd.anser-web-funds-transfer-initiation', 'fti'],\n ['application/vnd.antix.game-component', 'atx'],\n ['application/vnd.apple.installer+xml', 'mpkg'],\n ['application/vnd.apple.mpegurl', 'm3u8'],\n ['application/vnd.aristanetworks.swi', 'swi'],\n ['application/vnd.audiograph', 'aep'],\n ['application/vnd.blueice.multipass', 'mpm'],\n ['application/vnd.bmi', 'bmi'],\n ['application/vnd.businessobjects', 'rep'],\n ['application/vnd.chemdraw+xml', 'cdxml'],\n ['application/vnd.chipnuts.karaoke-mmd', 'mmd'],\n ['application/vnd.cinderella', 'cdy'],\n ['application/vnd.claymore', 'cla'],\n ['application/vnd.cloanto.rp9', 'rp9'],\n ['application/vnd.clonk.c4group', 'c4g'],\n ['application/vnd.cluetrust.cartomobile-config', 'c11amc'],\n ['application/vnd.cluetrust.cartomobile-config-pkg', 'c11amz'],\n ['application/vnd.commonspace', 'csp'],\n ['application/vnd.contact.cmsg', 'cdbcmsg'],\n ['application/vnd.cosmocaller', 'cmc'],\n ['application/vnd.crick.clicker', 'clkx'],\n ['application/vnd.crick.clicker.keyboard', 'clkk'],\n ['application/vnd.crick.clicker.palette', 'clkp'],\n ['application/vnd.crick.clicker.template', 'clkt'],\n ['application/vnd.crick.clicker.wordbank', 'clkw'],\n ['application/vnd.criticaltools.wbs+xml', 'wbs'],\n ['application/vnd.ctc-posml', 'pml'],\n ['application/vnd.cups-ppd', 'ppd'],\n ['application/vnd.curl.car', 'car'],\n ['application/vnd.curl.pcurl', 'pcurl'],\n ['application/vnd.data-vision.rdz', 'rdz'],\n ['application/vnd.denovo.fcselayout-link', 'fe_launch'],\n ['application/vnd.dna', 'dna'],\n ['application/vnd.dolby.mlp', 'mlp'],\n ['application/vnd.dpgraph', 'dpg'],\n ['application/vnd.dreamfactory', 'dfac'],\n ['application/vnd.dvb.ait', 'ait'],\n ['application/vnd.dvb.service', 'svc'],\n ['application/vnd.dynageo', 'geo'],\n ['application/vnd.ecowin.chart', 'mag'],\n ['application/vnd.enliven', 'nml'],\n ['application/vnd.epson.esf', 'esf'],\n ['application/vnd.epson.msf', 'msf'],\n ['application/vnd.epson.quickanime', 'qam'],\n ['application/vnd.epson.salt', 'slt'],\n ['application/vnd.epson.ssf', 'ssf'],\n ['application/vnd.eszigno3+xml', 'es3'],\n ['application/vnd.ezpix-album', 'ez2'],\n ['application/vnd.ezpix-package', 'ez3'],\n ['application/vnd.fdf', 'fdf'],\n ['application/vnd.fdsn.seed', 'seed'],\n ['application/vnd.flographit', 'gph'],\n ['application/vnd.fluxtime.clip', 'ftc'],\n ['application/vnd.framemaker', 'fm'],\n ['application/vnd.frogans.fnc', 'fnc'],\n ['application/vnd.frogans.ltf', 'ltf'],\n ['application/vnd.fsc.weblaunch', 'fsc'],\n ['application/vnd.fujitsu.oasys', 'oas'],\n ['application/vnd.fujitsu.oasys2', 'oa2'],\n ['application/vnd.fujitsu.oasys3', 'oa3'],\n ['application/vnd.fujitsu.oasysgp', 'fg5'],\n ['application/vnd.fujitsu.oasysprs', 'bh2'],\n ['application/vnd.fujixerox.ddd', 'ddd'],\n ['application/vnd.fujixerox.docuworks', 'xdw'],\n ['application/vnd.fujixerox.docuworks.binder', 'xbd'],\n ['application/vnd.fuzzysheet', 'fzs'],\n ['application/vnd.genomatix.tuxedo', 'txd'],\n ['application/vnd.geogebra.file', 'ggb'],\n ['application/vnd.geogebra.tool', 'ggt'],\n ['application/vnd.geometry-explorer', 'gex'],\n ['application/vnd.geonext', 'gxt'],\n ['application/vnd.geoplan', 'g2w'],\n ['application/vnd.geospace', 'g3w'],\n ['application/vnd.gmx', 'gmx'],\n ['application/vnd.google-earth.kml+xml', 'kml'],\n ['application/vnd.google-earth.kmz', 'kmz'],\n ['application/vnd.grafeq', 'gqf'],\n ['application/vnd.groove-account', 'gac'],\n ['application/vnd.groove-help', 'ghf'],\n ['application/vnd.groove-identity-message', 'gim'],\n ['application/vnd.groove-injector', 'grv'],\n ['application/vnd.groove-tool-message', 'gtm'],\n ['application/vnd.groove-tool-template', 'tpl'],\n ['application/vnd.groove-vcard', 'vcg'],\n ['application/vnd.hal+xml', 'hal'],\n ['application/vnd.handheld-entertainment+xml', 'zmm'],\n ['application/vnd.hbci', 'hbci'],\n ['application/vnd.hhe.lesson-player', 'les'],\n ['application/vnd.hp-hpgl', ['hgl', 'hpg', 'hpgl']],\n ['application/vnd.hp-hpid', 'hpid'],\n ['application/vnd.hp-hps', 'hps'],\n ['application/vnd.hp-jlyt', 'jlt'],\n ['application/vnd.hp-pcl', 'pcl'],\n ['application/vnd.hp-pclxl', 'pclxl'],\n ['application/vnd.hydrostatix.sof-data', 'sfd-hdstx'],\n ['application/vnd.hzn-3d-crossword', 'x3d'],\n ['application/vnd.ibm.minipay', 'mpy'],\n ['application/vnd.ibm.modcap', 'afp'],\n ['application/vnd.ibm.rights-management', 'irm'],\n ['application/vnd.ibm.secure-container', 'sc'],\n ['application/vnd.iccprofile', 'icc'],\n ['application/vnd.igloader', 'igl'],\n ['application/vnd.immervision-ivp', 'ivp'],\n ['application/vnd.immervision-ivu', 'ivu'],\n ['application/vnd.insors.igm', 'igm'],\n ['application/vnd.intercon.formnet', 'xpw'],\n ['application/vnd.intergeo', 'i2g'],\n ['application/vnd.intu.qbo', 'qbo'],\n ['application/vnd.intu.qfx', 'qfx'],\n ['application/vnd.ipunplugged.rcprofile', 'rcprofile'],\n ['application/vnd.irepository.package+xml', 'irp'],\n ['application/vnd.is-xpr', 'xpr'],\n ['application/vnd.isac.fcs', 'fcs'],\n ['application/vnd.jam', 'jam'],\n ['application/vnd.jcp.javame.midlet-rms', 'rms'],\n ['application/vnd.jisp', 'jisp'],\n ['application/vnd.joost.joda-archive', 'joda'],\n ['application/vnd.kahootz', 'ktz'],\n ['application/vnd.kde.karbon', 'karbon'],\n ['application/vnd.kde.kchart', 'chrt'],\n ['application/vnd.kde.kformula', 'kfo'],\n ['application/vnd.kde.kivio', 'flw'],\n ['application/vnd.kde.kontour', 'kon'],\n ['application/vnd.kde.kpresenter', 'kpr'],\n ['application/vnd.kde.kspread', 'ksp'],\n ['application/vnd.kde.kword', 'kwd'],\n ['application/vnd.kenameaapp', 'htke'],\n ['application/vnd.kidspiration', 'kia'],\n ['application/vnd.kinar', 'kne'],\n ['application/vnd.koan', 'skp'],\n ['application/vnd.kodak-descriptor', 'sse'],\n ['application/vnd.las.las+xml', 'lasxml'],\n ['application/vnd.llamagraphics.life-balance.desktop', 'lbd'],\n ['application/vnd.llamagraphics.life-balance.exchange+xml', 'lbe'],\n ['application/vnd.lotus-1-2-3', '123'],\n ['application/vnd.lotus-approach', 'apr'],\n ['application/vnd.lotus-freelance', 'pre'],\n ['application/vnd.lotus-notes', 'nsf'],\n ['application/vnd.lotus-organizer', 'org'],\n ['application/vnd.lotus-screencam', 'scm'],\n ['application/vnd.lotus-wordpro', 'lwp'],\n ['application/vnd.macports.portpkg', 'portpkg'],\n ['application/vnd.mcd', 'mcd'],\n ['application/vnd.medcalcdata', 'mc1'],\n ['application/vnd.mediastation.cdkey', 'cdkey'],\n ['application/vnd.mfer', 'mwf'],\n ['application/vnd.mfmp', 'mfm'],\n ['application/vnd.micrografx.flo', 'flo'],\n ['application/vnd.micrografx.igx', 'igx'],\n ['application/vnd.mif', 'mif'],\n ['application/vnd.mobius.daf', 'daf'],\n ['application/vnd.mobius.dis', 'dis'],\n ['application/vnd.mobius.mbk', 'mbk'],\n ['application/vnd.mobius.mqy', 'mqy'],\n ['application/vnd.mobius.msl', 'msl'],\n ['application/vnd.mobius.plc', 'plc'],\n ['application/vnd.mobius.txf', 'txf'],\n ['application/vnd.mophun.application', 'mpn'],\n ['application/vnd.mophun.certificate', 'mpc'],\n ['application/vnd.mozilla.xul+xml', 'xul'],\n ['application/vnd.ms-artgalry', 'cil'],\n ['application/vnd.ms-cab-compressed', 'cab'],\n ['application/vnd.ms-excel', ['xls', 'xla', 'xlc', 'xlm', 'xlt', 'xlw', 'xlb', 'xll']],\n ['application/vnd.ms-excel.addin.macroenabled.12', 'xlam'],\n ['application/vnd.ms-excel.sheet.binary.macroenabled.12', 'xlsb'],\n ['application/vnd.ms-excel.sheet.macroenabled.12', 'xlsm'],\n ['application/vnd.ms-excel.template.macroenabled.12', 'xltm'],\n ['application/vnd.ms-fontobject', 'eot'],\n ['application/vnd.ms-htmlhelp', 'chm'],\n ['application/vnd.ms-ims', 'ims'],\n ['application/vnd.ms-lrm', 'lrm'],\n ['application/vnd.ms-officetheme', 'thmx'],\n ['application/vnd.ms-outlook', 'msg'],\n ['application/vnd.ms-pki.certstore', 'sst'],\n ['application/vnd.ms-pki.pko', 'pko'],\n ['application/vnd.ms-pki.seccat', 'cat'],\n ['application/vnd.ms-pki.stl', 'stl'],\n ['application/vnd.ms-pkicertstore', 'sst'],\n ['application/vnd.ms-pkiseccat', 'cat'],\n ['application/vnd.ms-pkistl', 'stl'],\n ['application/vnd.ms-powerpoint', ['ppt', 'pot', 'pps', 'ppa', 'pwz']],\n ['application/vnd.ms-powerpoint.addin.macroenabled.12', 'ppam'],\n ['application/vnd.ms-powerpoint.presentation.macroenabled.12', 'pptm'],\n ['application/vnd.ms-powerpoint.slide.macroenabled.12', 'sldm'],\n ['application/vnd.ms-powerpoint.slideshow.macroenabled.12', 'ppsm'],\n ['application/vnd.ms-powerpoint.template.macroenabled.12', 'potm'],\n ['application/vnd.ms-project', 'mpp'],\n ['application/vnd.ms-word.document.macroenabled.12', 'docm'],\n ['application/vnd.ms-word.template.macroenabled.12', 'dotm'],\n ['application/vnd.ms-works', ['wks', 'wcm', 'wdb', 'wps']],\n ['application/vnd.ms-wpl', 'wpl'],\n ['application/vnd.ms-xpsdocument', 'xps'],\n ['application/vnd.mseq', 'mseq'],\n ['application/vnd.musician', 'mus'],\n ['application/vnd.muvee.style', 'msty'],\n ['application/vnd.neurolanguage.nlu', 'nlu'],\n ['application/vnd.noblenet-directory', 'nnd'],\n ['application/vnd.noblenet-sealer', 'nns'],\n ['application/vnd.noblenet-web', 'nnw'],\n ['application/vnd.nokia.configuration-message', 'ncm'],\n ['application/vnd.nokia.n-gage.data', 'ngdat'],\n ['application/vnd.nokia.n-gage.symbian.install', 'n-gage'],\n ['application/vnd.nokia.radio-preset', 'rpst'],\n ['application/vnd.nokia.radio-presets', 'rpss'],\n ['application/vnd.nokia.ringing-tone', 'rng'],\n ['application/vnd.novadigm.edm', 'edm'],\n ['application/vnd.novadigm.edx', 'edx'],\n ['application/vnd.novadigm.ext', 'ext'],\n ['application/vnd.oasis.opendocument.chart', 'odc'],\n ['application/vnd.oasis.opendocument.chart-template', 'otc'],\n ['application/vnd.oasis.opendocument.database', 'odb'],\n ['application/vnd.oasis.opendocument.formula', 'odf'],\n ['application/vnd.oasis.opendocument.formula-template', 'odft'],\n ['application/vnd.oasis.opendocument.graphics', 'odg'],\n ['application/vnd.oasis.opendocument.graphics-template', 'otg'],\n ['application/vnd.oasis.opendocument.image', 'odi'],\n ['application/vnd.oasis.opendocument.image-template', 'oti'],\n ['application/vnd.oasis.opendocument.presentation', 'odp'],\n ['application/vnd.oasis.opendocument.presentation-template', 'otp'],\n ['application/vnd.oasis.opendocument.spreadsheet', 'ods'],\n ['application/vnd.oasis.opendocument.spreadsheet-template', 'ots'],\n ['application/vnd.oasis.opendocument.text', 'odt'],\n ['application/vnd.oasis.opendocument.text-master', 'odm'],\n ['application/vnd.oasis.opendocument.text-template', 'ott'],\n ['application/vnd.oasis.opendocument.text-web', 'oth'],\n ['application/vnd.olpc-sugar', 'xo'],\n ['application/vnd.oma.dd2+xml', 'dd2'],\n ['application/vnd.openofficeorg.extension', 'oxt'],\n ['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.slide', 'sldx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.template', 'potx'],\n ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx'],\n ['application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltx'],\n ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx'],\n ['application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotx'],\n ['application/vnd.osgeo.mapguide.package', 'mgp'],\n ['application/vnd.osgi.dp', 'dp'],\n ['application/vnd.palm', 'pdb'],\n ['application/vnd.pawaafile', 'paw'],\n ['application/vnd.pg.format', 'str'],\n ['application/vnd.pg.osasli', 'ei6'],\n ['application/vnd.picsel', 'efif'],\n ['application/vnd.pmi.widget', 'wg'],\n ['application/vnd.pocketlearn', 'plf'],\n ['application/vnd.powerbuilder6', 'pbd'],\n ['application/vnd.previewsystems.box', 'box'],\n ['application/vnd.proteus.magazine', 'mgz'],\n ['application/vnd.publishare-delta-tree', 'qps'],\n ['application/vnd.pvi.ptid1', 'ptid'],\n ['application/vnd.quark.quarkxpress', 'qxd'],\n ['application/vnd.realvnc.bed', 'bed'],\n ['application/vnd.recordare.musicxml', 'mxl'],\n ['application/vnd.recordare.musicxml+xml', 'musicxml'],\n ['application/vnd.rig.cryptonote', 'cryptonote'],\n ['application/vnd.rim.cod', 'cod'],\n ['application/vnd.rn-realmedia', 'rm'],\n ['application/vnd.rn-realplayer', 'rnx'],\n ['application/vnd.route66.link66+xml', 'link66'],\n ['application/vnd.sailingtracker.track', 'st'],\n ['application/vnd.seemail', 'see'],\n ['application/vnd.sema', 'sema'],\n ['application/vnd.semd', 'semd'],\n ['application/vnd.semf', 'semf'],\n ['application/vnd.shana.informed.formdata', 'ifm'],\n ['application/vnd.shana.informed.formtemplate', 'itp'],\n ['application/vnd.shana.informed.interchange', 'iif'],\n ['application/vnd.shana.informed.package', 'ipk'],\n ['application/vnd.simtech-mindmapper', 'twd'],\n ['application/vnd.smaf', 'mmf'],\n ['application/vnd.smart.teacher', 'teacher'],\n ['application/vnd.solent.sdkm+xml', 'sdkm'],\n ['application/vnd.spotfire.dxp', 'dxp'],\n ['application/vnd.spotfire.sfs', 'sfs'],\n ['application/vnd.stardivision.calc', 'sdc'],\n ['application/vnd.stardivision.draw', 'sda'],\n ['application/vnd.stardivision.impress', 'sdd'],\n ['application/vnd.stardivision.math', 'smf'],\n ['application/vnd.stardivision.writer', 'sdw'],\n ['application/vnd.stardivision.writer-global', 'sgl'],\n ['application/vnd.stepmania.stepchart', 'sm'],\n ['application/vnd.sun.xml.calc', 'sxc'],\n ['application/vnd.sun.xml.calc.template', 'stc'],\n ['application/vnd.sun.xml.draw', 'sxd'],\n ['application/vnd.sun.xml.draw.template', 'std'],\n ['application/vnd.sun.xml.impress', 'sxi'],\n ['application/vnd.sun.xml.impress.template', 'sti'],\n ['application/vnd.sun.xml.math', 'sxm'],\n ['application/vnd.sun.xml.writer', 'sxw'],\n ['application/vnd.sun.xml.writer.global', 'sxg'],\n ['application/vnd.sun.xml.writer.template', 'stw'],\n ['application/vnd.sus-calendar', 'sus'],\n ['application/vnd.svd', 'svd'],\n ['application/vnd.symbian.install', 'sis'],\n ['application/vnd.syncml+xml', 'xsm'],\n ['application/vnd.syncml.dm+wbxml', 'bdm'],\n ['application/vnd.syncml.dm+xml', 'xdm'],\n ['application/vnd.tao.intent-module-archive', 'tao'],\n ['application/vnd.tmobile-livetv', 'tmo'],\n ['application/vnd.trid.tpt', 'tpt'],\n ['application/vnd.triscape.mxs', 'mxs'],\n ['application/vnd.trueapp', 'tra'],\n ['application/vnd.ufdl', 'ufd'],\n ['application/vnd.uiq.theme', 'utz'],\n ['application/vnd.umajin', 'umj'],\n ['application/vnd.unity', 'unityweb'],\n ['application/vnd.uoml+xml', 'uoml'],\n ['application/vnd.vcx', 'vcx'],\n ['application/vnd.visio', 'vsd'],\n ['application/vnd.visionary', 'vis'],\n ['application/vnd.vsf', 'vsf'],\n ['application/vnd.wap.wbxml', 'wbxml'],\n ['application/vnd.wap.wmlc', 'wmlc'],\n ['application/vnd.wap.wmlscriptc', 'wmlsc'],\n ['application/vnd.webturbo', 'wtb'],\n ['application/vnd.wolfram.player', 'nbp'],\n ['application/vnd.wordperfect', 'wpd'],\n ['application/vnd.wqd', 'wqd'],\n ['application/vnd.wt.stf', 'stf'],\n ['application/vnd.xara', ['web', 'xar']],\n ['application/vnd.xfdl', 'xfdl'],\n ['application/vnd.yamaha.hv-dic', 'hvd'],\n ['application/vnd.yamaha.hv-script', 'hvs'],\n ['application/vnd.yamaha.hv-voice', 'hvp'],\n ['application/vnd.yamaha.openscoreformat', 'osf'],\n ['application/vnd.yamaha.openscoreformat.osfpvg+xml', 'osfpvg'],\n ['application/vnd.yamaha.smaf-audio', 'saf'],\n ['application/vnd.yamaha.smaf-phrase', 'spf'],\n ['application/vnd.yellowriver-custom-menu', 'cmp'],\n ['application/vnd.zul', 'zir'],\n ['application/vnd.zzazz.deck+xml', 'zaz'],\n ['application/vocaltec-media-desc', 'vmd'],\n ['application/vocaltec-media-file', 'vmf'],\n ['application/voicexml+xml', 'vxml'],\n ['application/widget', 'wgt'],\n ['application/winhlp', 'hlp'],\n ['application/wordperfect', ['wp', 'wp5', 'wp6', 'wpd']],\n ['application/wordperfect6.0', ['w60', 'wp5']],\n ['application/wordperfect6.1', 'w61'],\n ['application/wsdl+xml', 'wsdl'],\n ['application/wspolicy+xml', 'wspolicy'],\n ['application/x-123', 'wk1'],\n ['application/x-7z-compressed', '7z'],\n ['application/x-abiword', 'abw'],\n ['application/x-ace-compressed', 'ace'],\n ['application/x-aim', 'aim'],\n ['application/x-authorware-bin', 'aab'],\n ['application/x-authorware-map', 'aam'],\n ['application/x-authorware-seg', 'aas'],\n ['application/x-bcpio', 'bcpio'],\n ['application/x-binary', 'bin'],\n ['application/x-binhex40', 'hqx'],\n ['application/x-bittorrent', 'torrent'],\n ['application/x-bsh', ['bsh', 'sh', 'shar']],\n ['application/x-bytecode.elisp', 'elc'],\n ['application/x-bytecode.python', 'pyc'],\n ['application/x-bzip', 'bz'],\n ['application/x-bzip2', ['boz', 'bz2']],\n ['application/x-cdf', 'cdf'],\n ['application/x-cdlink', 'vcd'],\n ['application/x-chat', ['cha', 'chat']],\n ['application/x-chess-pgn', 'pgn'],\n ['application/x-cmu-raster', 'ras'],\n ['application/x-cocoa', 'cco'],\n ['application/x-compactpro', 'cpt'],\n ['application/x-compress', 'z'],\n ['application/x-compressed', ['tgz', 'gz', 'z', 'zip']],\n ['application/x-conference', 'nsc'],\n ['application/x-cpio', 'cpio'],\n ['application/x-cpt', 'cpt'],\n ['application/x-csh', 'csh'],\n ['application/x-debian-package', 'deb'],\n ['application/x-deepv', 'deepv'],\n ['application/x-director', ['dir', 'dcr', 'dxr']],\n ['application/x-doom', 'wad'],\n ['application/x-dtbncx+xml', 'ncx'],\n ['application/x-dtbook+xml', 'dtb'],\n ['application/x-dtbresource+xml', 'res'],\n ['application/x-dvi', 'dvi'],\n ['application/x-elc', 'elc'],\n ['application/x-envoy', ['env', 'evy']],\n ['application/x-esrehber', 'es'],\n ['application/x-excel', ['xls', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],\n ['application/x-font-bdf', 'bdf'],\n ['application/x-font-ghostscript', 'gsf'],\n ['application/x-font-linux-psf', 'psf'],\n ['application/x-font-otf', 'otf'],\n ['application/x-font-pcf', 'pcf'],\n ['application/x-font-snf', 'snf'],\n ['application/x-font-ttf', 'ttf'],\n ['application/x-font-type1', 'pfa'],\n ['application/x-font-woff', 'woff'],\n ['application/x-frame', 'mif'],\n ['application/x-freelance', 'pre'],\n ['application/x-futuresplash', 'spl'],\n ['application/x-gnumeric', 'gnumeric'],\n ['application/x-gsp', 'gsp'],\n ['application/x-gss', 'gss'],\n ['application/x-gtar', 'gtar'],\n ['application/x-gzip', ['gz', 'gzip']],\n ['application/x-hdf', 'hdf'],\n ['application/x-helpfile', ['help', 'hlp']],\n ['application/x-httpd-imap', 'imap'],\n ['application/x-ima', 'ima'],\n ['application/x-internet-signup', ['ins', 'isp']],\n ['application/x-internett-signup', 'ins'],\n ['application/x-inventor', 'iv'],\n ['application/x-ip2', 'ip'],\n ['application/x-iphone', 'iii'],\n ['application/x-java-class', 'class'],\n ['application/x-java-commerce', 'jcm'],\n ['application/x-java-jnlp-file', 'jnlp'],\n ['application/x-javascript', 'js'],\n ['application/x-koan', ['skd', 'skm', 'skp', 'skt']],\n ['application/x-ksh', 'ksh'],\n ['application/x-latex', ['latex', 'ltx']],\n ['application/x-lha', 'lha'],\n ['application/x-lisp', 'lsp'],\n ['application/x-livescreen', 'ivy'],\n ['application/x-lotus', 'wq1'],\n ['application/x-lotusscreencam', 'scm'],\n ['application/x-lzh', 'lzh'],\n ['application/x-lzx', 'lzx'],\n ['application/x-mac-binhex40', 'hqx'],\n ['application/x-macbinary', 'bin'],\n ['application/x-magic-cap-package-1.0', 'mc$'],\n ['application/x-mathcad', 'mcd'],\n ['application/x-meme', 'mm'],\n ['application/x-midi', ['mid', 'midi']],\n ['application/x-mif', 'mif'],\n ['application/x-mix-transfer', 'nix'],\n ['application/x-mobipocket-ebook', 'prc'],\n ['application/x-mplayer2', 'asx'],\n ['application/x-ms-application', 'application'],\n ['application/x-ms-wmd', 'wmd'],\n ['application/x-ms-wmz', 'wmz'],\n ['application/x-ms-xbap', 'xbap'],\n ['application/x-msaccess', 'mdb'],\n ['application/x-msbinder', 'obd'],\n ['application/x-mscardfile', 'crd'],\n ['application/x-msclip', 'clp'],\n ['application/x-msdownload', ['exe', 'dll']],\n ['application/x-msexcel', ['xls', 'xla', 'xlw']],\n ['application/x-msmediaview', ['mvb', 'm13', 'm14']],\n ['application/x-msmetafile', 'wmf'],\n ['application/x-msmoney', 'mny'],\n ['application/x-mspowerpoint', 'ppt'],\n ['application/x-mspublisher', 'pub'],\n ['application/x-msschedule', 'scd'],\n ['application/x-msterminal', 'trm'],\n ['application/x-mswrite', 'wri'],\n ['application/x-navi-animation', 'ani'],\n ['application/x-navidoc', 'nvd'],\n ['application/x-navimap', 'map'],\n ['application/x-navistyle', 'stl'],\n ['application/x-netcdf', ['cdf', 'nc']],\n ['application/x-newton-compatible-pkg', 'pkg'],\n ['application/x-nokia-9000-communicator-add-on-software', 'aos'],\n ['application/x-omc', 'omc'],\n ['application/x-omcdatamaker', 'omcd'],\n ['application/x-omcregerator', 'omcr'],\n ['application/x-pagemaker', ['pm4', 'pm5']],\n ['application/x-pcl', 'pcl'],\n ['application/x-perfmon', ['pma', 'pmc', 'pml', 'pmr', 'pmw']],\n ['application/x-pixclscript', 'plx'],\n ['application/x-pkcs10', 'p10'],\n ['application/x-pkcs12', ['p12', 'pfx']],\n ['application/x-pkcs7-certificates', ['p7b', 'spc']],\n ['application/x-pkcs7-certreqresp', 'p7r'],\n ['application/x-pkcs7-mime', ['p7m', 'p7c']],\n ['application/x-pkcs7-signature', ['p7s', 'p7a']],\n ['application/x-pointplus', 'css'],\n ['application/x-portable-anymap', 'pnm'],\n ['application/x-project', ['mpc', 'mpt', 'mpv', 'mpx']],\n ['application/x-qpro', 'wb1'],\n ['application/x-rar-compressed', 'rar'],\n ['application/x-rtf', 'rtf'],\n ['application/x-sdp', 'sdp'],\n ['application/x-sea', 'sea'],\n ['application/x-seelogo', 'sl'],\n ['application/x-sh', 'sh'],\n ['application/x-shar', ['shar', 'sh']],\n ['application/x-shockwave-flash', 'swf'],\n ['application/x-silverlight-app', 'xap'],\n ['application/x-sit', 'sit'],\n ['application/x-sprite', ['spr', 'sprite']],\n ['application/x-stuffit', 'sit'],\n ['application/x-stuffitx', 'sitx'],\n ['application/x-sv4cpio', 'sv4cpio'],\n ['application/x-sv4crc', 'sv4crc'],\n ['application/x-tar', 'tar'],\n ['application/x-tbook', ['sbk', 'tbk']],\n ['application/x-tcl', 'tcl'],\n ['application/x-tex', 'tex'],\n ['application/x-tex-tfm', 'tfm'],\n ['application/x-texinfo', ['texi', 'texinfo']],\n ['application/x-troff', ['roff', 't', 'tr']],\n ['application/x-troff-man', 'man'],\n ['application/x-troff-me', 'me'],\n ['application/x-troff-ms', 'ms'],\n ['application/x-troff-msvideo', 'avi'],\n ['application/x-ustar', 'ustar'],\n ['application/x-visio', ['vsd', 'vst', 'vsw']],\n ['application/x-vnd.audioexplosion.mzz', 'mzz'],\n ['application/x-vnd.ls-xpix', 'xpix'],\n ['application/x-vrml', 'vrml'],\n ['application/x-wais-source', ['src', 'wsrc']],\n ['application/x-winhelp', 'hlp'],\n ['application/x-wintalk', 'wtk'],\n ['application/x-world', ['wrl', 'svr']],\n ['application/x-wpwin', 'wpd'],\n ['application/x-wri', 'wri'],\n ['application/x-x509-ca-cert', ['cer', 'crt', 'der']],\n ['application/x-x509-user-cert', 'crt'],\n ['application/x-xfig', 'fig'],\n ['application/x-xpinstall', 'xpi'],\n ['application/x-zip-compressed', 'zip'],\n ['application/xcap-diff+xml', 'xdf'],\n ['application/xenc+xml', 'xenc'],\n ['application/xhtml+xml', 'xhtml'],\n ['application/xml', 'xml'],\n ['application/xml-dtd', 'dtd'],\n ['application/xop+xml', 'xop'],\n ['application/xslt+xml', 'xslt'],\n ['application/xspf+xml', 'xspf'],\n ['application/xv+xml', 'mxml'],\n ['application/yang', 'yang'],\n ['application/yin+xml', 'yin'],\n ['application/ynd.ms-pkipko', 'pko'],\n ['application/zip', 'zip'],\n ['audio/adpcm', 'adp'],\n ['audio/aiff', ['aiff', 'aif', 'aifc']],\n ['audio/basic', ['snd', 'au']],\n ['audio/it', 'it'],\n ['audio/make', ['funk', 'my', 'pfunk']],\n ['audio/make.my.funk', 'pfunk'],\n ['audio/mid', ['mid', 'rmi']],\n ['audio/midi', ['midi', 'kar', 'mid']],\n ['audio/mod', 'mod'],\n ['audio/mp4', 'mp4a'],\n ['audio/mpeg', ['mpga', 'mp3', 'm2a', 'mp2', 'mpa', 'mpg']],\n ['audio/mpeg3', 'mp3'],\n ['audio/nspaudio', ['la', 'lma']],\n ['audio/ogg', 'oga'],\n ['audio/s3m', 's3m'],\n ['audio/tsp-audio', 'tsi'],\n ['audio/tsplayer', 'tsp'],\n ['audio/vnd.dece.audio', 'uva'],\n ['audio/vnd.digital-winds', 'eol'],\n ['audio/vnd.dra', 'dra'],\n ['audio/vnd.dts', 'dts'],\n ['audio/vnd.dts.hd', 'dtshd'],\n ['audio/vnd.lucent.voice', 'lvp'],\n ['audio/vnd.ms-playready.media.pya', 'pya'],\n ['audio/vnd.nuera.ecelp4800', 'ecelp4800'],\n ['audio/vnd.nuera.ecelp7470', 'ecelp7470'],\n ['audio/vnd.nuera.ecelp9600', 'ecelp9600'],\n ['audio/vnd.qcelp', 'qcp'],\n ['audio/vnd.rip', 'rip'],\n ['audio/voc', 'voc'],\n ['audio/voxware', 'vox'],\n ['audio/wav', 'wav'],\n ['audio/webm', 'weba'],\n ['audio/x-aac', 'aac'],\n ['audio/x-adpcm', 'snd'],\n ['audio/x-aiff', ['aiff', 'aif', 'aifc']],\n ['audio/x-au', 'au'],\n ['audio/x-gsm', ['gsd', 'gsm']],\n ['audio/x-jam', 'jam'],\n ['audio/x-liveaudio', 'lam'],\n ['audio/x-mid', ['mid', 'midi']],\n ['audio/x-midi', ['midi', 'mid']],\n ['audio/x-mod', 'mod'],\n ['audio/x-mpeg', 'mp2'],\n ['audio/x-mpeg-3', 'mp3'],\n ['audio/x-mpegurl', 'm3u'],\n ['audio/x-mpequrl', 'm3u'],\n ['audio/x-ms-wax', 'wax'],\n ['audio/x-ms-wma', 'wma'],\n ['audio/x-nspaudio', ['la', 'lma']],\n ['audio/x-pn-realaudio', ['ra', 'ram', 'rm', 'rmm', 'rmp']],\n ['audio/x-pn-realaudio-plugin', ['ra', 'rmp', 'rpm']],\n ['audio/x-psid', 'sid'],\n ['audio/x-realaudio', 'ra'],\n ['audio/x-twinvq', 'vqf'],\n ['audio/x-twinvq-plugin', ['vqe', 'vql']],\n ['audio/x-vnd.audioexplosion.mjuicemediafile', 'mjf'],\n ['audio/x-voc', 'voc'],\n ['audio/x-wav', 'wav'],\n ['audio/xm', 'xm'],\n ['chemical/x-cdx', 'cdx'],\n ['chemical/x-cif', 'cif'],\n ['chemical/x-cmdf', 'cmdf'],\n ['chemical/x-cml', 'cml'],\n ['chemical/x-csml', 'csml'],\n ['chemical/x-pdb', ['pdb', 'xyz']],\n ['chemical/x-xyz', 'xyz'],\n ['drawing/x-dwf', 'dwf'],\n ['i-world/i-vrml', 'ivr'],\n ['image/bmp', ['bmp', 'bm']],\n ['image/cgm', 'cgm'],\n ['image/cis-cod', 'cod'],\n ['image/cmu-raster', ['ras', 'rast']],\n ['image/fif', 'fif'],\n ['image/florian', ['flo', 'turbot']],\n ['image/g3fax', 'g3'],\n ['image/gif', 'gif'],\n ['image/ief', ['ief', 'iefs']],\n ['image/jpeg', ['jpeg', 'jpe', 'jpg', 'jfif', 'jfif-tbnl']],\n ['image/jutvision', 'jut'],\n ['image/ktx', 'ktx'],\n ['image/naplps', ['nap', 'naplps']],\n ['image/pict', ['pic', 'pict']],\n ['image/pipeg', 'jfif'],\n ['image/pjpeg', ['jfif', 'jpe', 'jpeg', 'jpg']],\n ['image/png', ['png', 'x-png']],\n ['image/prs.btif', 'btif'],\n ['image/svg+xml', 'svg'],\n ['image/tiff', ['tif', 'tiff']],\n ['image/vasa', 'mcf'],\n ['image/vnd.adobe.photoshop', 'psd'],\n ['image/vnd.dece.graphic', 'uvi'],\n ['image/vnd.djvu', 'djvu'],\n ['image/vnd.dvb.subtitle', 'sub'],\n ['image/vnd.dwg', ['dwg', 'dxf', 'svf']],\n ['image/vnd.dxf', 'dxf'],\n ['image/vnd.fastbidsheet', 'fbs'],\n ['image/vnd.fpx', 'fpx'],\n ['image/vnd.fst', 'fst'],\n ['image/vnd.fujixerox.edmics-mmr', 'mmr'],\n ['image/vnd.fujixerox.edmics-rlc', 'rlc'],\n ['image/vnd.ms-modi', 'mdi'],\n ['image/vnd.net-fpx', ['fpx', 'npx']],\n ['image/vnd.rn-realflash', 'rf'],\n ['image/vnd.rn-realpix', 'rp'],\n ['image/vnd.wap.wbmp', 'wbmp'],\n ['image/vnd.xiff', 'xif'],\n ['image/webp', 'webp'],\n ['image/x-cmu-raster', 'ras'],\n ['image/x-cmx', 'cmx'],\n ['image/x-dwg', ['dwg', 'dxf', 'svf']],\n ['image/x-freehand', 'fh'],\n ['image/x-icon', 'ico'],\n ['image/x-jg', 'art'],\n ['image/x-jps', 'jps'],\n ['image/x-niff', ['niff', 'nif']],\n ['image/x-pcx', 'pcx'],\n ['image/x-pict', ['pct', 'pic']],\n ['image/x-portable-anymap', 'pnm'],\n ['image/x-portable-bitmap', 'pbm'],\n ['image/x-portable-graymap', 'pgm'],\n ['image/x-portable-greymap', 'pgm'],\n ['image/x-portable-pixmap', 'ppm'],\n ['image/x-quicktime', ['qif', 'qti', 'qtif']],\n ['image/x-rgb', 'rgb'],\n ['image/x-tiff', ['tif', 'tiff']],\n ['image/x-windows-bmp', 'bmp'],\n ['image/x-xbitmap', 'xbm'],\n ['image/x-xbm', 'xbm'],\n ['image/x-xpixmap', ['xpm', 'pm']],\n ['image/x-xwd', 'xwd'],\n ['image/x-xwindowdump', 'xwd'],\n ['image/xbm', 'xbm'],\n ['image/xpm', 'xpm'],\n ['message/rfc822', ['eml', 'mht', 'mhtml', 'nws', 'mime']],\n ['model/iges', ['iges', 'igs']],\n ['model/mesh', 'msh'],\n ['model/vnd.collada+xml', 'dae'],\n ['model/vnd.dwf', 'dwf'],\n ['model/vnd.gdl', 'gdl'],\n ['model/vnd.gtw', 'gtw'],\n ['model/vnd.mts', 'mts'],\n ['model/vnd.vtu', 'vtu'],\n ['model/vrml', ['vrml', 'wrl', 'wrz']],\n ['model/x-pov', 'pov'],\n ['multipart/x-gzip', 'gzip'],\n ['multipart/x-ustar', 'ustar'],\n ['multipart/x-zip', 'zip'],\n ['music/crescendo', ['mid', 'midi']],\n ['music/x-karaoke', 'kar'],\n ['paleovu/x-pv', 'pvu'],\n ['text/asp', 'asp'],\n ['text/calendar', 'ics'],\n ['text/css', 'css'],\n ['text/csv', 'csv'],\n ['text/ecmascript', 'js'],\n ['text/h323', '323'],\n ['text/html', ['html', 'htm', 'stm', 'acgi', 'htmls', 'htx', 'shtml']],\n ['text/iuls', 'uls'],\n ['text/javascript', 'js'],\n ['text/mcf', 'mcf'],\n ['text/n3', 'n3'],\n ['text/pascal', 'pas'],\n [\n 'text/plain',\n [\n 'txt',\n 'bas',\n 'c',\n 'h',\n 'c++',\n 'cc',\n 'com',\n 'conf',\n 'cxx',\n 'def',\n 'f',\n 'f90',\n 'for',\n 'g',\n 'hh',\n 'idc',\n 'jav',\n 'java',\n 'list',\n 'log',\n 'lst',\n 'm',\n 'mar',\n 'pl',\n 'sdml',\n 'text'\n ]\n ],\n ['text/plain-bas', 'par'],\n ['text/prs.lines.tag', 'dsc'],\n ['text/richtext', ['rtx', 'rt', 'rtf']],\n ['text/scriplet', 'wsc'],\n ['text/scriptlet', 'sct'],\n ['text/sgml', ['sgm', 'sgml']],\n ['text/tab-separated-values', 'tsv'],\n ['text/troff', 't'],\n ['text/turtle', 'ttl'],\n ['text/uri-list', ['uni', 'unis', 'uri', 'uris']],\n ['text/vnd.abc', 'abc'],\n ['text/vnd.curl', 'curl'],\n ['text/vnd.curl.dcurl', 'dcurl'],\n ['text/vnd.curl.mcurl', 'mcurl'],\n ['text/vnd.curl.scurl', 'scurl'],\n ['text/vnd.fly', 'fly'],\n ['text/vnd.fmi.flexstor', 'flx'],\n ['text/vnd.graphviz', 'gv'],\n ['text/vnd.in3d.3dml', '3dml'],\n ['text/vnd.in3d.spot', 'spot'],\n ['text/vnd.rn-realtext', 'rt'],\n ['text/vnd.sun.j2me.app-descriptor', 'jad'],\n ['text/vnd.wap.wml', 'wml'],\n ['text/vnd.wap.wmlscript', 'wmls'],\n ['text/webviewhtml', 'htt'],\n ['text/x-asm', ['asm', 's']],\n ['text/x-audiosoft-intra', 'aip'],\n ['text/x-c', ['c', 'cc', 'cpp']],\n ['text/x-component', 'htc'],\n ['text/x-fortran', ['for', 'f', 'f77', 'f90']],\n ['text/x-h', ['h', 'hh']],\n ['text/x-java-source', ['java', 'jav']],\n ['text/x-java-source,java', 'java'],\n ['text/x-la-asf', 'lsx'],\n ['text/x-m', 'm'],\n ['text/x-pascal', 'p'],\n ['text/x-script', 'hlb'],\n ['text/x-script.csh', 'csh'],\n ['text/x-script.elisp', 'el'],\n ['text/x-script.guile', 'scm'],\n ['text/x-script.ksh', 'ksh'],\n ['text/x-script.lisp', 'lsp'],\n ['text/x-script.perl', 'pl'],\n ['text/x-script.perl-module', 'pm'],\n ['text/x-script.phyton', 'py'],\n ['text/x-script.rexx', 'rexx'],\n ['text/x-script.scheme', 'scm'],\n ['text/x-script.sh', 'sh'],\n ['text/x-script.tcl', 'tcl'],\n ['text/x-script.tcsh', 'tcsh'],\n ['text/x-script.zsh', 'zsh'],\n ['text/x-server-parsed-html', ['shtml', 'ssi']],\n ['text/x-setext', 'etx'],\n ['text/x-sgml', ['sgm', 'sgml']],\n ['text/x-speech', ['spc', 'talk']],\n ['text/x-uil', 'uil'],\n ['text/x-uuencode', ['uu', 'uue']],\n ['text/x-vcalendar', 'vcs'],\n ['text/x-vcard', 'vcf'],\n ['text/xml', 'xml'],\n ['video/3gpp', '3gp'],\n ['video/3gpp2', '3g2'],\n ['video/animaflex', 'afl'],\n ['video/avi', 'avi'],\n ['video/avs-video', 'avs'],\n ['video/dl', 'dl'],\n ['video/fli', 'fli'],\n ['video/gl', 'gl'],\n ['video/h261', 'h261'],\n ['video/h263', 'h263'],\n ['video/h264', 'h264'],\n ['video/jpeg', 'jpgv'],\n ['video/jpm', 'jpm'],\n ['video/mj2', 'mj2'],\n ['video/mp4', 'mp4'],\n ['video/mpeg', ['mpeg', 'mp2', 'mpa', 'mpe', 'mpg', 'mpv2', 'm1v', 'm2v', 'mp3']],\n ['video/msvideo', 'avi'],\n ['video/ogg', 'ogv'],\n ['video/quicktime', ['mov', 'qt', 'moov']],\n ['video/vdo', 'vdo'],\n ['video/vivo', ['viv', 'vivo']],\n ['video/vnd.dece.hd', 'uvh'],\n ['video/vnd.dece.mobile', 'uvm'],\n ['video/vnd.dece.pd', 'uvp'],\n ['video/vnd.dece.sd', 'uvs'],\n ['video/vnd.dece.video', 'uvv'],\n ['video/vnd.fvt', 'fvt'],\n ['video/vnd.mpegurl', 'mxu'],\n ['video/vnd.ms-playready.media.pyv', 'pyv'],\n ['video/vnd.rn-realvideo', 'rv'],\n ['video/vnd.uvvu.mp4', 'uvu'],\n ['video/vnd.vivo', ['viv', 'vivo']],\n ['video/vosaic', 'vos'],\n ['video/webm', 'webm'],\n ['video/x-amt-demorun', 'xdr'],\n ['video/x-amt-showrun', 'xsr'],\n ['video/x-atomic3d-feature', 'fmf'],\n ['video/x-dl', 'dl'],\n ['video/x-dv', ['dif', 'dv']],\n ['video/x-f4v', 'f4v'],\n ['video/x-fli', 'fli'],\n ['video/x-flv', 'flv'],\n ['video/x-gl', 'gl'],\n ['video/x-isvideo', 'isu'],\n ['video/x-la-asf', ['lsf', 'lsx']],\n ['video/x-m4v', 'm4v'],\n ['video/x-motion-jpeg', 'mjpg'],\n ['video/x-mpeg', ['mp3', 'mp2']],\n ['video/x-mpeq2a', 'mp2'],\n ['video/x-ms-asf', ['asf', 'asr', 'asx']],\n ['video/x-ms-asf-plugin', 'asx'],\n ['video/x-ms-wm', 'wm'],\n ['video/x-ms-wmv', 'wmv'],\n ['video/x-ms-wmx', 'wmx'],\n ['video/x-ms-wvx', 'wvx'],\n ['video/x-msvideo', 'avi'],\n ['video/x-qtc', 'qtc'],\n ['video/x-scm', 'scm'],\n ['video/x-sgi-movie', ['movie', 'mv']],\n ['windows/metafile', 'wmf'],\n ['www/mime', 'mime'],\n ['x-conference/x-cooltalk', 'ice'],\n ['x-music/x-midi', ['mid', 'midi']],\n ['x-world/x-3dmf', ['3dm', '3dmf', 'qd3', 'qd3d']],\n ['x-world/x-svr', 'svr'],\n ['x-world/x-vrml', ['flr', 'vrml', 'wrl', 'wrz', 'xaf', 'xof']],\n ['x-world/x-vrt', 'vrt'],\n ['xgl/drawing', 'xgz'],\n ['xgl/movie', 'xmz']\n]);\nconst extensions = new Map([\n ['123', 'application/vnd.lotus-1-2-3'],\n ['323', 'text/h323'],\n ['*', 'application/octet-stream'],\n ['3dm', 'x-world/x-3dmf'],\n ['3dmf', 'x-world/x-3dmf'],\n ['3dml', 'text/vnd.in3d.3dml'],\n ['3g2', 'video/3gpp2'],\n ['3gp', 'video/3gpp'],\n ['7z', 'application/x-7z-compressed'],\n ['a', 'application/octet-stream'],\n ['aab', 'application/x-authorware-bin'],\n ['aac', 'audio/x-aac'],\n ['aam', 'application/x-authorware-map'],\n ['aas', 'application/x-authorware-seg'],\n ['abc', 'text/vnd.abc'],\n ['abw', 'application/x-abiword'],\n ['ac', 'application/pkix-attr-cert'],\n ['acc', 'application/vnd.americandynamics.acc'],\n ['ace', 'application/x-ace-compressed'],\n ['acgi', 'text/html'],\n ['acu', 'application/vnd.acucobol'],\n ['acx', 'application/internet-property-stream'],\n ['adp', 'audio/adpcm'],\n ['aep', 'application/vnd.audiograph'],\n ['afl', 'video/animaflex'],\n ['afp', 'application/vnd.ibm.modcap'],\n ['ahead', 'application/vnd.ahead.space'],\n ['ai', 'application/postscript'],\n ['aif', ['audio/aiff', 'audio/x-aiff']],\n ['aifc', ['audio/aiff', 'audio/x-aiff']],\n ['aiff', ['audio/aiff', 'audio/x-aiff']],\n ['aim', 'application/x-aim'],\n ['aip', 'text/x-audiosoft-intra'],\n ['air', 'application/vnd.adobe.air-application-installer-package+zip'],\n ['ait', 'application/vnd.dvb.ait'],\n ['ami', 'application/vnd.amiga.ami'],\n ['ani', 'application/x-navi-animation'],\n ['aos', 'application/x-nokia-9000-communicator-add-on-software'],\n ['apk', 'application/vnd.android.package-archive'],\n ['application', 'application/x-ms-application'],\n ['apr', 'application/vnd.lotus-approach'],\n ['aps', 'application/mime'],\n ['arc', 'application/octet-stream'],\n ['arj', ['application/arj', 'application/octet-stream']],\n ['art', 'image/x-jg'],\n ['asf', 'video/x-ms-asf'],\n ['asm', 'text/x-asm'],\n ['aso', 'application/vnd.accpac.simply.aso'],\n ['asp', 'text/asp'],\n ['asr', 'video/x-ms-asf'],\n ['asx', ['video/x-ms-asf', 'application/x-mplayer2', 'video/x-ms-asf-plugin']],\n ['atc', 'application/vnd.acucorp'],\n ['atomcat', 'application/atomcat+xml'],\n ['atomsvc', 'application/atomsvc+xml'],\n ['atx', 'application/vnd.antix.game-component'],\n ['au', ['audio/basic', 'audio/x-au']],\n ['avi', ['video/avi', 'video/msvideo', 'application/x-troff-msvideo', 'video/x-msvideo']],\n ['avs', 'video/avs-video'],\n ['aw', 'application/applixware'],\n ['axs', 'application/olescript'],\n ['azf', 'application/vnd.airzip.filesecure.azf'],\n ['azs', 'application/vnd.airzip.filesecure.azs'],\n ['azw', 'application/vnd.amazon.ebook'],\n ['bas', 'text/plain'],\n ['bcpio', 'application/x-bcpio'],\n ['bdf', 'application/x-font-bdf'],\n ['bdm', 'application/vnd.syncml.dm+wbxml'],\n ['bed', 'application/vnd.realvnc.bed'],\n ['bh2', 'application/vnd.fujitsu.oasysprs'],\n ['bin', ['application/octet-stream', 'application/mac-binary', 'application/macbinary', 'application/x-macbinary', 'application/x-binary']],\n ['bm', 'image/bmp'],\n ['bmi', 'application/vnd.bmi'],\n ['bmp', ['image/bmp', 'image/x-windows-bmp']],\n ['boo', 'application/book'],\n ['book', 'application/book'],\n ['box', 'application/vnd.previewsystems.box'],\n ['boz', 'application/x-bzip2'],\n ['bsh', 'application/x-bsh'],\n ['btif', 'image/prs.btif'],\n ['bz', 'application/x-bzip'],\n ['bz2', 'application/x-bzip2'],\n ['c', ['text/plain', 'text/x-c']],\n ['c++', 'text/plain'],\n ['c11amc', 'application/vnd.cluetrust.cartomobile-config'],\n ['c11amz', 'application/vnd.cluetrust.cartomobile-config-pkg'],\n ['c4g', 'application/vnd.clonk.c4group'],\n ['cab', 'application/vnd.ms-cab-compressed'],\n ['car', 'application/vnd.curl.car'],\n ['cat', ['application/vnd.ms-pkiseccat', 'application/vnd.ms-pki.seccat']],\n ['cc', ['text/plain', 'text/x-c']],\n ['ccad', 'application/clariscad'],\n ['cco', 'application/x-cocoa'],\n ['ccxml', 'application/ccxml+xml,'],\n ['cdbcmsg', 'application/vnd.contact.cmsg'],\n ['cdf', ['application/cdf', 'application/x-cdf', 'application/x-netcdf']],\n ['cdkey', 'application/vnd.mediastation.cdkey'],\n ['cdmia', 'application/cdmi-capability'],\n ['cdmic', 'application/cdmi-container'],\n ['cdmid', 'application/cdmi-domain'],\n ['cdmio', 'application/cdmi-object'],\n ['cdmiq', 'application/cdmi-queue'],\n ['cdx', 'chemical/x-cdx'],\n ['cdxml', 'application/vnd.chemdraw+xml'],\n ['cdy', 'application/vnd.cinderella'],\n ['cer', ['application/pkix-cert', 'application/x-x509-ca-cert']],\n ['cgm', 'image/cgm'],\n ['cha', 'application/x-chat'],\n ['chat', 'application/x-chat'],\n ['chm', 'application/vnd.ms-htmlhelp'],\n ['chrt', 'application/vnd.kde.kchart'],\n ['cif', 'chemical/x-cif'],\n ['cii', 'application/vnd.anser-web-certificate-issue-initiation'],\n ['cil', 'application/vnd.ms-artgalry'],\n ['cla', 'application/vnd.claymore'],\n ['class', ['application/octet-stream', 'application/java', 'application/java-byte-code', 'application/java-vm', 'application/x-java-class']],\n ['clkk', 'application/vnd.crick.clicker.keyboard'],\n ['clkp', 'application/vnd.crick.clicker.palette'],\n ['clkt', 'application/vnd.crick.clicker.template'],\n ['clkw', 'application/vnd.crick.clicker.wordbank'],\n ['clkx', 'application/vnd.crick.clicker'],\n ['clp', 'application/x-msclip'],\n ['cmc', 'application/vnd.cosmocaller'],\n ['cmdf', 'chemical/x-cmdf'],\n ['cml', 'chemical/x-cml'],\n ['cmp', 'application/vnd.yellowriver-custom-menu'],\n ['cmx', 'image/x-cmx'],\n ['cod', ['image/cis-cod', 'application/vnd.rim.cod']],\n ['com', ['application/octet-stream', 'text/plain']],\n ['conf', 'text/plain'],\n ['cpio', 'application/x-cpio'],\n ['cpp', 'text/x-c'],\n ['cpt', ['application/mac-compactpro', 'application/x-compactpro', 'application/x-cpt']],\n ['crd', 'application/x-mscardfile'],\n ['crl', ['application/pkix-crl', 'application/pkcs-crl']],\n ['crt', ['application/pkix-cert', 'application/x-x509-user-cert', 'application/x-x509-ca-cert']],\n ['cryptonote', 'application/vnd.rig.cryptonote'],\n ['csh', ['text/x-script.csh', 'application/x-csh']],\n ['csml', 'chemical/x-csml'],\n ['csp', 'application/vnd.commonspace'],\n ['css', ['text/css', 'application/x-pointplus']],\n ['csv', 'text/csv'],\n ['cu', 'application/cu-seeme'],\n ['curl', 'text/vnd.curl'],\n ['cww', 'application/prs.cww'],\n ['cxx', 'text/plain'],\n ['dae', 'model/vnd.collada+xml'],\n ['daf', 'application/vnd.mobius.daf'],\n ['davmount', 'application/davmount+xml'],\n ['dcr', 'application/x-director'],\n ['dcurl', 'text/vnd.curl.dcurl'],\n ['dd2', 'application/vnd.oma.dd2+xml'],\n ['ddd', 'application/vnd.fujixerox.ddd'],\n ['deb', 'application/x-debian-package'],\n ['deepv', 'application/x-deepv'],\n ['def', 'text/plain'],\n ['der', 'application/x-x509-ca-cert'],\n ['dfac', 'application/vnd.dreamfactory'],\n ['dif', 'video/x-dv'],\n ['dir', 'application/x-director'],\n ['dis', 'application/vnd.mobius.dis'],\n ['djvu', 'image/vnd.djvu'],\n ['dl', ['video/dl', 'video/x-dl']],\n ['dll', 'application/x-msdownload'],\n ['dms', 'application/octet-stream'],\n ['dna', 'application/vnd.dna'],\n ['doc', 'application/msword'],\n ['docm', 'application/vnd.ms-word.document.macroenabled.12'],\n ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],\n ['dot', 'application/msword'],\n ['dotm', 'application/vnd.ms-word.template.macroenabled.12'],\n ['dotx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'],\n ['dp', ['application/commonground', 'application/vnd.osgi.dp']],\n ['dpg', 'application/vnd.dpgraph'],\n ['dra', 'audio/vnd.dra'],\n ['drw', 'application/drafting'],\n ['dsc', 'text/prs.lines.tag'],\n ['dssc', 'application/dssc+der'],\n ['dtb', 'application/x-dtbook+xml'],\n ['dtd', 'application/xml-dtd'],\n ['dts', 'audio/vnd.dts'],\n ['dtshd', 'audio/vnd.dts.hd'],\n ['dump', 'application/octet-stream'],\n ['dv', 'video/x-dv'],\n ['dvi', 'application/x-dvi'],\n ['dwf', ['model/vnd.dwf', 'drawing/x-dwf']],\n ['dwg', ['application/acad', 'image/vnd.dwg', 'image/x-dwg']],\n ['dxf', ['application/dxf', 'image/vnd.dwg', 'image/vnd.dxf', 'image/x-dwg']],\n ['dxp', 'application/vnd.spotfire.dxp'],\n ['dxr', 'application/x-director'],\n ['ecelp4800', 'audio/vnd.nuera.ecelp4800'],\n ['ecelp7470', 'audio/vnd.nuera.ecelp7470'],\n ['ecelp9600', 'audio/vnd.nuera.ecelp9600'],\n ['edm', 'application/vnd.novadigm.edm'],\n ['edx', 'application/vnd.novadigm.edx'],\n ['efif', 'application/vnd.picsel'],\n ['ei6', 'application/vnd.pg.osasli'],\n ['el', 'text/x-script.elisp'],\n ['elc', ['application/x-elc', 'application/x-bytecode.elisp']],\n ['eml', 'message/rfc822'],\n ['emma', 'application/emma+xml'],\n ['env', 'application/x-envoy'],\n ['eol', 'audio/vnd.digital-winds'],\n ['eot', 'application/vnd.ms-fontobject'],\n ['eps', 'application/postscript'],\n ['epub', 'application/epub+zip'],\n ['es', ['application/ecmascript', 'application/x-esrehber']],\n ['es3', 'application/vnd.eszigno3+xml'],\n ['esf', 'application/vnd.epson.esf'],\n ['etx', 'text/x-setext'],\n ['evy', ['application/envoy', 'application/x-envoy']],\n ['exe', ['application/octet-stream', 'application/x-msdownload']],\n ['exi', 'application/exi'],\n ['ext', 'application/vnd.novadigm.ext'],\n ['ez2', 'application/vnd.ezpix-album'],\n ['ez3', 'application/vnd.ezpix-package'],\n ['f', ['text/plain', 'text/x-fortran']],\n ['f4v', 'video/x-f4v'],\n ['f77', 'text/x-fortran'],\n ['f90', ['text/plain', 'text/x-fortran']],\n ['fbs', 'image/vnd.fastbidsheet'],\n ['fcs', 'application/vnd.isac.fcs'],\n ['fdf', 'application/vnd.fdf'],\n ['fe_launch', 'application/vnd.denovo.fcselayout-link'],\n ['fg5', 'application/vnd.fujitsu.oasysgp'],\n ['fh', 'image/x-freehand'],\n ['fif', ['application/fractals', 'image/fif']],\n ['fig', 'application/x-xfig'],\n ['fli', ['video/fli', 'video/x-fli']],\n ['flo', ['image/florian', 'application/vnd.micrografx.flo']],\n ['flr', 'x-world/x-vrml'],\n ['flv', 'video/x-flv'],\n ['flw', 'application/vnd.kde.kivio'],\n ['flx', 'text/vnd.fmi.flexstor'],\n ['fly', 'text/vnd.fly'],\n ['fm', 'application/vnd.framemaker'],\n ['fmf', 'video/x-atomic3d-feature'],\n ['fnc', 'application/vnd.frogans.fnc'],\n ['for', ['text/plain', 'text/x-fortran']],\n ['fpx', ['image/vnd.fpx', 'image/vnd.net-fpx']],\n ['frl', 'application/freeloader'],\n ['fsc', 'application/vnd.fsc.weblaunch'],\n ['fst', 'image/vnd.fst'],\n ['ftc', 'application/vnd.fluxtime.clip'],\n ['fti', 'application/vnd.anser-web-funds-transfer-initiation'],\n ['funk', 'audio/make'],\n ['fvt', 'video/vnd.fvt'],\n ['fxp', 'application/vnd.adobe.fxp'],\n ['fzs', 'application/vnd.fuzzysheet'],\n ['g', 'text/plain'],\n ['g2w', 'application/vnd.geoplan'],\n ['g3', 'image/g3fax'],\n ['g3w', 'application/vnd.geospace'],\n ['gac', 'application/vnd.groove-account'],\n ['gdl', 'model/vnd.gdl'],\n ['geo', 'application/vnd.dynageo'],\n ['gex', 'application/vnd.geometry-explorer'],\n ['ggb', 'application/vnd.geogebra.file'],\n ['ggt', 'application/vnd.geogebra.tool'],\n ['ghf', 'application/vnd.groove-help'],\n ['gif', 'image/gif'],\n ['gim', 'application/vnd.groove-identity-message'],\n ['gl', ['video/gl', 'video/x-gl']],\n ['gmx', 'application/vnd.gmx'],\n ['gnumeric', 'application/x-gnumeric'],\n ['gph', 'application/vnd.flographit'],\n ['gqf', 'application/vnd.grafeq'],\n ['gram', 'application/srgs'],\n ['grv', 'application/vnd.groove-injector'],\n ['grxml', 'application/srgs+xml'],\n ['gsd', 'audio/x-gsm'],\n ['gsf', 'application/x-font-ghostscript'],\n ['gsm', 'audio/x-gsm'],\n ['gsp', 'application/x-gsp'],\n ['gss', 'application/x-gss'],\n ['gtar', 'application/x-gtar'],\n ['gtm', 'application/vnd.groove-tool-message'],\n ['gtw', 'model/vnd.gtw'],\n ['gv', 'text/vnd.graphviz'],\n ['gxt', 'application/vnd.geonext'],\n ['gz', ['application/x-gzip', 'application/x-compressed']],\n ['gzip', ['multipart/x-gzip', 'application/x-gzip']],\n ['h', ['text/plain', 'text/x-h']],\n ['h261', 'video/h261'],\n ['h263', 'video/h263'],\n ['h264', 'video/h264'],\n ['hal', 'application/vnd.hal+xml'],\n ['hbci', 'application/vnd.hbci'],\n ['hdf', 'application/x-hdf'],\n ['help', 'application/x-helpfile'],\n ['hgl', 'application/vnd.hp-hpgl'],\n ['hh', ['text/plain', 'text/x-h']],\n ['hlb', 'text/x-script'],\n ['hlp', ['application/winhlp', 'application/hlp', 'application/x-helpfile', 'application/x-winhelp']],\n ['hpg', 'application/vnd.hp-hpgl'],\n ['hpgl', 'application/vnd.hp-hpgl'],\n ['hpid', 'application/vnd.hp-hpid'],\n ['hps', 'application/vnd.hp-hps'],\n [\n 'hqx',\n [\n 'application/mac-binhex40',\n 'application/binhex',\n 'application/binhex4',\n 'application/mac-binhex',\n 'application/x-binhex40',\n 'application/x-mac-binhex40'\n ]\n ],\n ['hta', 'application/hta'],\n ['htc', 'text/x-component'],\n ['htke', 'application/vnd.kenameaapp'],\n ['htm', 'text/html'],\n ['html', 'text/html'],\n ['htmls', 'text/html'],\n ['htt', 'text/webviewhtml'],\n ['htx', 'text/html'],\n ['hvd', 'application/vnd.yamaha.hv-dic'],\n ['hvp', 'application/vnd.yamaha.hv-voice'],\n ['hvs', 'application/vnd.yamaha.hv-script'],\n ['i2g', 'application/vnd.intergeo'],\n ['icc', 'application/vnd.iccprofile'],\n ['ice', 'x-conference/x-cooltalk'],\n ['ico', 'image/x-icon'],\n ['ics', 'text/calendar'],\n ['idc', 'text/plain'],\n ['ief', 'image/ief'],\n ['iefs', 'image/ief'],\n ['ifm', 'application/vnd.shana.informed.formdata'],\n ['iges', ['application/iges', 'model/iges']],\n ['igl', 'application/vnd.igloader'],\n ['igm', 'application/vnd.insors.igm'],\n ['igs', ['application/iges', 'model/iges']],\n ['igx', 'application/vnd.micrografx.igx'],\n ['iif', 'application/vnd.shana.informed.interchange'],\n ['iii', 'application/x-iphone'],\n ['ima', 'application/x-ima'],\n ['imap', 'application/x-httpd-imap'],\n ['imp', 'application/vnd.accpac.simply.imp'],\n ['ims', 'application/vnd.ms-ims'],\n ['inf', 'application/inf'],\n ['ins', ['application/x-internet-signup', 'application/x-internett-signup']],\n ['ip', 'application/x-ip2'],\n ['ipfix', 'application/ipfix'],\n ['ipk', 'application/vnd.shana.informed.package'],\n ['irm', 'application/vnd.ibm.rights-management'],\n ['irp', 'application/vnd.irepository.package+xml'],\n ['isp', 'application/x-internet-signup'],\n ['isu', 'video/x-isvideo'],\n ['it', 'audio/it'],\n ['itp', 'application/vnd.shana.informed.formtemplate'],\n ['iv', 'application/x-inventor'],\n ['ivp', 'application/vnd.immervision-ivp'],\n ['ivr', 'i-world/i-vrml'],\n ['ivu', 'application/vnd.immervision-ivu'],\n ['ivy', 'application/x-livescreen'],\n ['jad', 'text/vnd.sun.j2me.app-descriptor'],\n ['jam', ['application/vnd.jam', 'audio/x-jam']],\n ['jar', 'application/java-archive'],\n ['jav', ['text/plain', 'text/x-java-source']],\n ['java', ['text/plain', 'text/x-java-source,java', 'text/x-java-source']],\n ['jcm', 'application/x-java-commerce'],\n ['jfif', ['image/pipeg', 'image/jpeg', 'image/pjpeg']],\n ['jfif-tbnl', 'image/jpeg'],\n ['jisp', 'application/vnd.jisp'],\n ['jlt', 'application/vnd.hp-jlyt'],\n ['jnlp', 'application/x-java-jnlp-file'],\n ['joda', 'application/vnd.joost.joda-archive'],\n ['jpe', ['image/jpeg', 'image/pjpeg']],\n ['jpeg', ['image/jpeg', 'image/pjpeg']],\n ['jpg', ['image/jpeg', 'image/pjpeg']],\n ['jpgv', 'video/jpeg'],\n ['jpm', 'video/jpm'],\n ['jps', 'image/x-jps'],\n ['js', ['application/javascript', 'application/ecmascript', 'text/javascript', 'text/ecmascript', 'application/x-javascript']],\n ['json', 'application/json'],\n ['jut', 'image/jutvision'],\n ['kar', ['audio/midi', 'music/x-karaoke']],\n ['karbon', 'application/vnd.kde.karbon'],\n ['kfo', 'application/vnd.kde.kformula'],\n ['kia', 'application/vnd.kidspiration'],\n ['kml', 'application/vnd.google-earth.kml+xml'],\n ['kmz', 'application/vnd.google-earth.kmz'],\n ['kne', 'application/vnd.kinar'],\n ['kon', 'application/vnd.kde.kontour'],\n ['kpr', 'application/vnd.kde.kpresenter'],\n ['ksh', ['application/x-ksh', 'text/x-script.ksh']],\n ['ksp', 'application/vnd.kde.kspread'],\n ['ktx', 'image/ktx'],\n ['ktz', 'application/vnd.kahootz'],\n ['kwd', 'application/vnd.kde.kword'],\n ['la', ['audio/nspaudio', 'audio/x-nspaudio']],\n ['lam', 'audio/x-liveaudio'],\n ['lasxml', 'application/vnd.las.las+xml'],\n ['latex', 'application/x-latex'],\n ['lbd', 'application/vnd.llamagraphics.life-balance.desktop'],\n ['lbe', 'application/vnd.llamagraphics.life-balance.exchange+xml'],\n ['les', 'application/vnd.hhe.lesson-player'],\n ['lha', ['application/octet-stream', 'application/lha', 'application/x-lha']],\n ['lhx', 'application/octet-stream'],\n ['link66', 'application/vnd.route66.link66+xml'],\n ['list', 'text/plain'],\n ['lma', ['audio/nspaudio', 'audio/x-nspaudio']],\n ['log', 'text/plain'],\n ['lrm', 'application/vnd.ms-lrm'],\n ['lsf', 'video/x-la-asf'],\n ['lsp', ['application/x-lisp', 'text/x-script.lisp']],\n ['lst', 'text/plain'],\n ['lsx', ['video/x-la-asf', 'text/x-la-asf']],\n ['ltf', 'application/vnd.frogans.ltf'],\n ['ltx', 'application/x-latex'],\n ['lvp', 'audio/vnd.lucent.voice'],\n ['lwp', 'application/vnd.lotus-wordpro'],\n ['lzh', ['application/octet-stream', 'application/x-lzh']],\n ['lzx', ['application/lzx', 'application/octet-stream', 'application/x-lzx']],\n ['m', ['text/plain', 'text/x-m']],\n ['m13', 'application/x-msmediaview'],\n ['m14', 'application/x-msmediaview'],\n ['m1v', 'video/mpeg'],\n ['m21', 'application/mp21'],\n ['m2a', 'audio/mpeg'],\n ['m2v', 'video/mpeg'],\n ['m3u', ['audio/x-mpegurl', 'audio/x-mpequrl']],\n ['m3u8', 'application/vnd.apple.mpegurl'],\n ['m4v', 'video/x-m4v'],\n ['ma', 'application/mathematica'],\n ['mads', 'application/mads+xml'],\n ['mag', 'application/vnd.ecowin.chart'],\n ['man', 'application/x-troff-man'],\n ['map', 'application/x-navimap'],\n ['mar', 'text/plain'],\n ['mathml', 'application/mathml+xml'],\n ['mbd', 'application/mbedlet'],\n ['mbk', 'application/vnd.mobius.mbk'],\n ['mbox', 'application/mbox'],\n ['mc$', 'application/x-magic-cap-package-1.0'],\n ['mc1', 'application/vnd.medcalcdata'],\n ['mcd', ['application/mcad', 'application/vnd.mcd', 'application/x-mathcad']],\n ['mcf', ['image/vasa', 'text/mcf']],\n ['mcp', 'application/netmc'],\n ['mcurl', 'text/vnd.curl.mcurl'],\n ['mdb', 'application/x-msaccess'],\n ['mdi', 'image/vnd.ms-modi'],\n ['me', 'application/x-troff-me'],\n ['meta4', 'application/metalink4+xml'],\n ['mets', 'application/mets+xml'],\n ['mfm', 'application/vnd.mfmp'],\n ['mgp', 'application/vnd.osgeo.mapguide.package'],\n ['mgz', 'application/vnd.proteus.magazine'],\n ['mht', 'message/rfc822'],\n ['mhtml', 'message/rfc822'],\n ['mid', ['audio/mid', 'audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],\n ['midi', ['audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],\n ['mif', ['application/vnd.mif', 'application/x-mif', 'application/x-frame']],\n ['mime', ['message/rfc822', 'www/mime']],\n ['mj2', 'video/mj2'],\n ['mjf', 'audio/x-vnd.audioexplosion.mjuicemediafile'],\n ['mjpg', 'video/x-motion-jpeg'],\n ['mlp', 'application/vnd.dolby.mlp'],\n ['mm', ['application/base64', 'application/x-meme']],\n ['mmd', 'application/vnd.chipnuts.karaoke-mmd'],\n ['mme', 'application/base64'],\n ['mmf', 'application/vnd.smaf'],\n ['mmr', 'image/vnd.fujixerox.edmics-mmr'],\n ['mny', 'application/x-msmoney'],\n ['mod', ['audio/mod', 'audio/x-mod']],\n ['mods', 'application/mods+xml'],\n ['moov', 'video/quicktime'],\n ['mov', 'video/quicktime'],\n ['movie', 'video/x-sgi-movie'],\n ['mp2', ['video/mpeg', 'audio/mpeg', 'video/x-mpeg', 'audio/x-mpeg', 'video/x-mpeq2a']],\n ['mp3', ['audio/mpeg', 'audio/mpeg3', 'video/mpeg', 'audio/x-mpeg-3', 'video/x-mpeg']],\n ['mp4', ['video/mp4', 'application/mp4']],\n ['mp4a', 'audio/mp4'],\n ['mpa', ['video/mpeg', 'audio/mpeg']],\n ['mpc', ['application/vnd.mophun.certificate', 'application/x-project']],\n ['mpe', 'video/mpeg'],\n ['mpeg', 'video/mpeg'],\n ['mpg', ['video/mpeg', 'audio/mpeg']],\n ['mpga', 'audio/mpeg'],\n ['mpkg', 'application/vnd.apple.installer+xml'],\n ['mpm', 'application/vnd.blueice.multipass'],\n ['mpn', 'application/vnd.mophun.application'],\n ['mpp', 'application/vnd.ms-project'],\n ['mpt', 'application/x-project'],\n ['mpv', 'application/x-project'],\n ['mpv2', 'video/mpeg'],\n ['mpx', 'application/x-project'],\n ['mpy', 'application/vnd.ibm.minipay'],\n ['mqy', 'application/vnd.mobius.mqy'],\n ['mrc', 'application/marc'],\n ['mrcx', 'application/marcxml+xml'],\n ['ms', 'application/x-troff-ms'],\n ['mscml', 'application/mediaservercontrol+xml'],\n ['mseq', 'application/vnd.mseq'],\n ['msf', 'application/vnd.epson.msf'],\n ['msg', 'application/vnd.ms-outlook'],\n ['msh', 'model/mesh'],\n ['msl', 'application/vnd.mobius.msl'],\n ['msty', 'application/vnd.muvee.style'],\n ['mts', 'model/vnd.mts'],\n ['mus', 'application/vnd.musician'],\n ['musicxml', 'application/vnd.recordare.musicxml+xml'],\n ['mv', 'video/x-sgi-movie'],\n ['mvb', 'application/x-msmediaview'],\n ['mwf', 'application/vnd.mfer'],\n ['mxf', 'application/mxf'],\n ['mxl', 'application/vnd.recordare.musicxml'],\n ['mxml', 'application/xv+xml'],\n ['mxs', 'application/vnd.triscape.mxs'],\n ['mxu', 'video/vnd.mpegurl'],\n ['my', 'audio/make'],\n ['mzz', 'application/x-vnd.audioexplosion.mzz'],\n ['n-gage', 'application/vnd.nokia.n-gage.symbian.install'],\n ['n3', 'text/n3'],\n ['nap', 'image/naplps'],\n ['naplps', 'image/naplps'],\n ['nbp', 'application/vnd.wolfram.player'],\n ['nc', 'application/x-netcdf'],\n ['ncm', 'application/vnd.nokia.configuration-message'],\n ['ncx', 'application/x-dtbncx+xml'],\n ['ngdat', 'application/vnd.nokia.n-gage.data'],\n ['nif', 'image/x-niff'],\n ['niff', 'image/x-niff'],\n ['nix', 'application/x-mix-transfer'],\n ['nlu', 'application/vnd.neurolanguage.nlu'],\n ['nml', 'application/vnd.enliven'],\n ['nnd', 'application/vnd.noblenet-directory'],\n ['nns', 'application/vnd.noblenet-sealer'],\n ['nnw', 'application/vnd.noblenet-web'],\n ['npx', 'image/vnd.net-fpx'],\n ['nsc', 'application/x-conference'],\n ['nsf', 'application/vnd.lotus-notes'],\n ['nvd', 'application/x-navidoc'],\n ['nws', 'message/rfc822'],\n ['o', 'application/octet-stream'],\n ['oa2', 'application/vnd.fujitsu.oasys2'],\n ['oa3', 'application/vnd.fujitsu.oasys3'],\n ['oas', 'application/vnd.fujitsu.oasys'],\n ['obd', 'application/x-msbinder'],\n ['oda', 'application/oda'],\n ['odb', 'application/vnd.oasis.opendocument.database'],\n ['odc', 'application/vnd.oasis.opendocument.chart'],\n ['odf', 'application/vnd.oasis.opendocument.formula'],\n ['odft', 'application/vnd.oasis.opendocument.formula-template'],\n ['odg', 'application/vnd.oasis.opendocument.graphics'],\n ['odi', 'application/vnd.oasis.opendocument.image'],\n ['odm', 'application/vnd.oasis.opendocument.text-master'],\n ['odp', 'application/vnd.oasis.opendocument.presentation'],\n ['ods', 'application/vnd.oasis.opendocument.spreadsheet'],\n ['odt', 'application/vnd.oasis.opendocument.text'],\n ['oga', 'audio/ogg'],\n ['ogv', 'video/ogg'],\n ['ogx', 'application/ogg'],\n ['omc', 'application/x-omc'],\n ['omcd', 'application/x-omcdatamaker'],\n ['omcr', 'application/x-omcregerator'],\n ['onetoc', 'application/onenote'],\n ['opf', 'application/oebps-package+xml'],\n ['org', 'application/vnd.lotus-organizer'],\n ['osf', 'application/vnd.yamaha.openscoreformat'],\n ['osfpvg', 'application/vnd.yamaha.openscoreformat.osfpvg+xml'],\n ['otc', 'application/vnd.oasis.opendocument.chart-template'],\n ['otf', 'application/x-font-otf'],\n ['otg', 'application/vnd.oasis.opendocument.graphics-template'],\n ['oth', 'application/vnd.oasis.opendocument.text-web'],\n ['oti', 'application/vnd.oasis.opendocument.image-template'],\n ['otp', 'application/vnd.oasis.opendocument.presentation-template'],\n ['ots', 'application/vnd.oasis.opendocument.spreadsheet-template'],\n ['ott', 'application/vnd.oasis.opendocument.text-template'],\n ['oxt', 'application/vnd.openofficeorg.extension'],\n ['p', 'text/x-pascal'],\n ['p10', ['application/pkcs10', 'application/x-pkcs10']],\n ['p12', ['application/pkcs-12', 'application/x-pkcs12']],\n ['p7a', 'application/x-pkcs7-signature'],\n ['p7b', 'application/x-pkcs7-certificates'],\n ['p7c', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],\n ['p7m', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],\n ['p7r', 'application/x-pkcs7-certreqresp'],\n ['p7s', ['application/pkcs7-signature', 'application/x-pkcs7-signature']],\n ['p8', 'application/pkcs8'],\n ['par', 'text/plain-bas'],\n ['part', 'application/pro_eng'],\n ['pas', 'text/pascal'],\n ['paw', 'application/vnd.pawaafile'],\n ['pbd', 'application/vnd.powerbuilder6'],\n ['pbm', 'image/x-portable-bitmap'],\n ['pcf', 'application/x-font-pcf'],\n ['pcl', ['application/vnd.hp-pcl', 'application/x-pcl']],\n ['pclxl', 'application/vnd.hp-pclxl'],\n ['pct', 'image/x-pict'],\n ['pcurl', 'application/vnd.curl.pcurl'],\n ['pcx', 'image/x-pcx'],\n ['pdb', ['application/vnd.palm', 'chemical/x-pdb']],\n ['pdf', 'application/pdf'],\n ['pfa', 'application/x-font-type1'],\n ['pfr', 'application/font-tdpfr'],\n ['pfunk', ['audio/make', 'audio/make.my.funk']],\n ['pfx', 'application/x-pkcs12'],\n ['pgm', ['image/x-portable-graymap', 'image/x-portable-greymap']],\n ['pgn', 'application/x-chess-pgn'],\n ['pgp', 'application/pgp-signature'],\n ['pic', ['image/pict', 'image/x-pict']],\n ['pict', 'image/pict'],\n ['pkg', 'application/x-newton-compatible-pkg'],\n ['pki', 'application/pkixcmp'],\n ['pkipath', 'application/pkix-pkipath'],\n ['pko', ['application/ynd.ms-pkipko', 'application/vnd.ms-pki.pko']],\n ['pl', ['text/plain', 'text/x-script.perl']],\n ['plb', 'application/vnd.3gpp.pic-bw-large'],\n ['plc', 'application/vnd.mobius.plc'],\n ['plf', 'application/vnd.pocketlearn'],\n ['pls', 'application/pls+xml'],\n ['plx', 'application/x-pixclscript'],\n ['pm', ['text/x-script.perl-module', 'image/x-xpixmap']],\n ['pm4', 'application/x-pagemaker'],\n ['pm5', 'application/x-pagemaker'],\n ['pma', 'application/x-perfmon'],\n ['pmc', 'application/x-perfmon'],\n ['pml', ['application/vnd.ctc-posml', 'application/x-perfmon']],\n ['pmr', 'application/x-perfmon'],\n ['pmw', 'application/x-perfmon'],\n ['png', 'image/png'],\n ['pnm', ['application/x-portable-anymap', 'image/x-portable-anymap']],\n ['portpkg', 'application/vnd.macports.portpkg'],\n ['pot', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],\n ['potm', 'application/vnd.ms-powerpoint.template.macroenabled.12'],\n ['potx', 'application/vnd.openxmlformats-officedocument.presentationml.template'],\n ['pov', 'model/x-pov'],\n ['ppa', 'application/vnd.ms-powerpoint'],\n ['ppam', 'application/vnd.ms-powerpoint.addin.macroenabled.12'],\n ['ppd', 'application/vnd.cups-ppd'],\n ['ppm', 'image/x-portable-pixmap'],\n ['pps', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],\n ['ppsm', 'application/vnd.ms-powerpoint.slideshow.macroenabled.12'],\n ['ppsx', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow'],\n ['ppt', ['application/vnd.ms-powerpoint', 'application/mspowerpoint', 'application/powerpoint', 'application/x-mspowerpoint']],\n ['pptm', 'application/vnd.ms-powerpoint.presentation.macroenabled.12'],\n ['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],\n ['ppz', 'application/mspowerpoint'],\n ['prc', 'application/x-mobipocket-ebook'],\n ['pre', ['application/vnd.lotus-freelance', 'application/x-freelance']],\n ['prf', 'application/pics-rules'],\n ['prt', 'application/pro_eng'],\n ['ps', 'application/postscript'],\n ['psb', 'application/vnd.3gpp.pic-bw-small'],\n ['psd', ['application/octet-stream', 'image/vnd.adobe.photoshop']],\n ['psf', 'application/x-font-linux-psf'],\n ['pskcxml', 'application/pskc+xml'],\n ['ptid', 'application/vnd.pvi.ptid1'],\n ['pub', 'application/x-mspublisher'],\n ['pvb', 'application/vnd.3gpp.pic-bw-var'],\n ['pvu', 'paleovu/x-pv'],\n ['pwn', 'application/vnd.3m.post-it-notes'],\n ['pwz', 'application/vnd.ms-powerpoint'],\n ['py', 'text/x-script.phyton'],\n ['pya', 'audio/vnd.ms-playready.media.pya'],\n ['pyc', 'application/x-bytecode.python'],\n ['pyv', 'video/vnd.ms-playready.media.pyv'],\n ['qam', 'application/vnd.epson.quickanime'],\n ['qbo', 'application/vnd.intu.qbo'],\n ['qcp', 'audio/vnd.qcelp'],\n ['qd3', 'x-world/x-3dmf'],\n ['qd3d', 'x-world/x-3dmf'],\n ['qfx', 'application/vnd.intu.qfx'],\n ['qif', 'image/x-quicktime'],\n ['qps', 'application/vnd.publishare-delta-tree'],\n ['qt', 'video/quicktime'],\n ['qtc', 'video/x-qtc'],\n ['qti', 'image/x-quicktime'],\n ['qtif', 'image/x-quicktime'],\n ['qxd', 'application/vnd.quark.quarkxpress'],\n ['ra', ['audio/x-realaudio', 'audio/x-pn-realaudio', 'audio/x-pn-realaudio-plugin']],\n ['ram', 'audio/x-pn-realaudio'],\n ['rar', 'application/x-rar-compressed'],\n ['ras', ['image/cmu-raster', 'application/x-cmu-raster', 'image/x-cmu-raster']],\n ['rast', 'image/cmu-raster'],\n ['rcprofile', 'application/vnd.ipunplugged.rcprofile'],\n ['rdf', 'application/rdf+xml'],\n ['rdz', 'application/vnd.data-vision.rdz'],\n ['rep', 'application/vnd.businessobjects'],\n ['res', 'application/x-dtbresource+xml'],\n ['rexx', 'text/x-script.rexx'],\n ['rf', 'image/vnd.rn-realflash'],\n ['rgb', 'image/x-rgb'],\n ['rif', 'application/reginfo+xml'],\n ['rip', 'audio/vnd.rip'],\n ['rl', 'application/resource-lists+xml'],\n ['rlc', 'image/vnd.fujixerox.edmics-rlc'],\n ['rld', 'application/resource-lists-diff+xml'],\n ['rm', ['application/vnd.rn-realmedia', 'audio/x-pn-realaudio']],\n ['rmi', 'audio/mid'],\n ['rmm', 'audio/x-pn-realaudio'],\n ['rmp', ['audio/x-pn-realaudio-plugin', 'audio/x-pn-realaudio']],\n ['rms', 'application/vnd.jcp.javame.midlet-rms'],\n ['rnc', 'application/relax-ng-compact-syntax'],\n ['rng', ['application/ringing-tones', 'application/vnd.nokia.ringing-tone']],\n ['rnx', 'application/vnd.rn-realplayer'],\n ['roff', 'application/x-troff'],\n ['rp', 'image/vnd.rn-realpix'],\n ['rp9', 'application/vnd.cloanto.rp9'],\n ['rpm', 'audio/x-pn-realaudio-plugin'],\n ['rpss', 'application/vnd.nokia.radio-presets'],\n ['rpst', 'application/vnd.nokia.radio-preset'],\n ['rq', 'application/sparql-query'],\n ['rs', 'application/rls-services+xml'],\n ['rsd', 'application/rsd+xml'],\n ['rt', ['text/richtext', 'text/vnd.rn-realtext']],\n ['rtf', ['application/rtf', 'text/richtext', 'application/x-rtf']],\n ['rtx', ['text/richtext', 'application/rtf']],\n ['rv', 'video/vnd.rn-realvideo'],\n ['s', 'text/x-asm'],\n ['s3m', 'audio/s3m'],\n ['saf', 'application/vnd.yamaha.smaf-audio'],\n ['saveme', 'application/octet-stream'],\n ['sbk', 'application/x-tbook'],\n ['sbml', 'application/sbml+xml'],\n ['sc', 'application/vnd.ibm.secure-container'],\n ['scd', 'application/x-msschedule'],\n ['scm', ['application/vnd.lotus-screencam', 'video/x-scm', 'text/x-script.guile', 'application/x-lotusscreencam', 'text/x-script.scheme']],\n ['scq', 'application/scvp-cv-request'],\n ['scs', 'application/scvp-cv-response'],\n ['sct', 'text/scriptlet'],\n ['scurl', 'text/vnd.curl.scurl'],\n ['sda', 'application/vnd.stardivision.draw'],\n ['sdc', 'application/vnd.stardivision.calc'],\n ['sdd', 'application/vnd.stardivision.impress'],\n ['sdkm', 'application/vnd.solent.sdkm+xml'],\n ['sdml', 'text/plain'],\n ['sdp', ['application/sdp', 'application/x-sdp']],\n ['sdr', 'application/sounder'],\n ['sdw', 'application/vnd.stardivision.writer'],\n ['sea', ['application/sea', 'application/x-sea']],\n ['see', 'application/vnd.seemail'],\n ['seed', 'application/vnd.fdsn.seed'],\n ['sema', 'application/vnd.sema'],\n ['semd', 'application/vnd.semd'],\n ['semf', 'application/vnd.semf'],\n ['ser', 'application/java-serialized-object'],\n ['set', 'application/set'],\n ['setpay', 'application/set-payment-initiation'],\n ['setreg', 'application/set-registration-initiation'],\n ['sfd-hdstx', 'application/vnd.hydrostatix.sof-data'],\n ['sfs', 'application/vnd.spotfire.sfs'],\n ['sgl', 'application/vnd.stardivision.writer-global'],\n ['sgm', ['text/sgml', 'text/x-sgml']],\n ['sgml', ['text/sgml', 'text/x-sgml']],\n ['sh', ['application/x-shar', 'application/x-bsh', 'application/x-sh', 'text/x-script.sh']],\n ['shar', ['application/x-bsh', 'application/x-shar']],\n ['shf', 'application/shf+xml'],\n ['shtml', ['text/html', 'text/x-server-parsed-html']],\n ['sid', 'audio/x-psid'],\n ['sis', 'application/vnd.symbian.install'],\n ['sit', ['application/x-stuffit', 'application/x-sit']],\n ['sitx', 'application/x-stuffitx'],\n ['skd', 'application/x-koan'],\n ['skm', 'application/x-koan'],\n ['skp', ['application/vnd.koan', 'application/x-koan']],\n ['skt', 'application/x-koan'],\n ['sl', 'application/x-seelogo'],\n ['sldm', 'application/vnd.ms-powerpoint.slide.macroenabled.12'],\n ['sldx', 'application/vnd.openxmlformats-officedocument.presentationml.slide'],\n ['slt', 'application/vnd.epson.salt'],\n ['sm', 'application/vnd.stepmania.stepchart'],\n ['smf', 'application/vnd.stardivision.math'],\n ['smi', ['application/smil', 'application/smil+xml']],\n ['smil', 'application/smil'],\n ['snd', ['audio/basic', 'audio/x-adpcm']],\n ['snf', 'application/x-font-snf'],\n ['sol', 'application/solids'],\n ['spc', ['text/x-speech', 'application/x-pkcs7-certificates']],\n ['spf', 'application/vnd.yamaha.smaf-phrase'],\n ['spl', ['application/futuresplash', 'application/x-futuresplash']],\n ['spot', 'text/vnd.in3d.spot'],\n ['spp', 'application/scvp-vp-response'],\n ['spq', 'application/scvp-vp-request'],\n ['spr', 'application/x-sprite'],\n ['sprite', 'application/x-sprite'],\n ['src', 'application/x-wais-source'],\n ['sru', 'application/sru+xml'],\n ['srx', 'application/sparql-results+xml'],\n ['sse', 'application/vnd.kodak-descriptor'],\n ['ssf', 'application/vnd.epson.ssf'],\n ['ssi', 'text/x-server-parsed-html'],\n ['ssm', 'application/streamingmedia'],\n ['ssml', 'application/ssml+xml'],\n ['sst', ['application/vnd.ms-pkicertstore', 'application/vnd.ms-pki.certstore']],\n ['st', 'application/vnd.sailingtracker.track'],\n ['stc', 'application/vnd.sun.xml.calc.template'],\n ['std', 'application/vnd.sun.xml.draw.template'],\n ['step', 'application/step'],\n ['stf', 'application/vnd.wt.stf'],\n ['sti', 'application/vnd.sun.xml.impress.template'],\n ['stk', 'application/hyperstudio'],\n ['stl', ['application/vnd.ms-pkistl', 'application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle']],\n ['stm', 'text/html'],\n ['stp', 'application/step'],\n ['str', 'application/vnd.pg.format'],\n ['stw', 'application/vnd.sun.xml.writer.template'],\n ['sub', 'image/vnd.dvb.subtitle'],\n ['sus', 'application/vnd.sus-calendar'],\n ['sv4cpio', 'application/x-sv4cpio'],\n ['sv4crc', 'application/x-sv4crc'],\n ['svc', 'application/vnd.dvb.service'],\n ['svd', 'application/vnd.svd'],\n ['svf', ['image/vnd.dwg', 'image/x-dwg']],\n ['svg', 'image/svg+xml'],\n ['svr', ['x-world/x-svr', 'application/x-world']],\n ['swf', 'application/x-shockwave-flash'],\n ['swi', 'application/vnd.aristanetworks.swi'],\n ['sxc', 'application/vnd.sun.xml.calc'],\n ['sxd', 'application/vnd.sun.xml.draw'],\n ['sxg', 'application/vnd.sun.xml.writer.global'],\n ['sxi', 'application/vnd.sun.xml.impress'],\n ['sxm', 'application/vnd.sun.xml.math'],\n ['sxw', 'application/vnd.sun.xml.writer'],\n ['t', ['text/troff', 'application/x-troff']],\n ['talk', 'text/x-speech'],\n ['tao', 'application/vnd.tao.intent-module-archive'],\n ['tar', 'application/x-tar'],\n ['tbk', ['application/toolbook', 'application/x-tbook']],\n ['tcap', 'application/vnd.3gpp2.tcap'],\n ['tcl', ['text/x-script.tcl', 'application/x-tcl']],\n ['tcsh', 'text/x-script.tcsh'],\n ['teacher', 'application/vnd.smart.teacher'],\n ['tei', 'application/tei+xml'],\n ['tex', 'application/x-tex'],\n ['texi', 'application/x-texinfo'],\n ['texinfo', 'application/x-texinfo'],\n ['text', ['application/plain', 'text/plain']],\n ['tfi', 'application/thraud+xml'],\n ['tfm', 'application/x-tex-tfm'],\n ['tgz', ['application/gnutar', 'application/x-compressed']],\n ['thmx', 'application/vnd.ms-officetheme'],\n ['tif', ['image/tiff', 'image/x-tiff']],\n ['tiff', ['image/tiff', 'image/x-tiff']],\n ['tmo', 'application/vnd.tmobile-livetv'],\n ['torrent', 'application/x-bittorrent'],\n ['tpl', 'application/vnd.groove-tool-template'],\n ['tpt', 'application/vnd.trid.tpt'],\n ['tr', 'application/x-troff'],\n ['tra', 'application/vnd.trueapp'],\n ['trm', 'application/x-msterminal'],\n ['tsd', 'application/timestamped-data'],\n ['tsi', 'audio/tsp-audio'],\n ['tsp', ['application/dsptype', 'audio/tsplayer']],\n ['tsv', 'text/tab-separated-values'],\n ['ttf', 'application/x-font-ttf'],\n ['ttl', 'text/turtle'],\n ['turbot', 'image/florian'],\n ['twd', 'application/vnd.simtech-mindmapper'],\n ['txd', 'application/vnd.genomatix.tuxedo'],\n ['txf', 'application/vnd.mobius.txf'],\n ['txt', 'text/plain'],\n ['ufd', 'application/vnd.ufdl'],\n ['uil', 'text/x-uil'],\n ['uls', 'text/iuls'],\n ['umj', 'application/vnd.umajin'],\n ['uni', 'text/uri-list'],\n ['unis', 'text/uri-list'],\n ['unityweb', 'application/vnd.unity'],\n ['unv', 'application/i-deas'],\n ['uoml', 'application/vnd.uoml+xml'],\n ['uri', 'text/uri-list'],\n ['uris', 'text/uri-list'],\n ['ustar', ['application/x-ustar', 'multipart/x-ustar']],\n ['utz', 'application/vnd.uiq.theme'],\n ['uu', ['application/octet-stream', 'text/x-uuencode']],\n ['uue', 'text/x-uuencode'],\n ['uva', 'audio/vnd.dece.audio'],\n ['uvh', 'video/vnd.dece.hd'],\n ['uvi', 'image/vnd.dece.graphic'],\n ['uvm', 'video/vnd.dece.mobile'],\n ['uvp', 'video/vnd.dece.pd'],\n ['uvs', 'video/vnd.dece.sd'],\n ['uvu', 'video/vnd.uvvu.mp4'],\n ['uvv', 'video/vnd.dece.video'],\n ['vcd', 'application/x-cdlink'],\n ['vcf', 'text/x-vcard'],\n ['vcg', 'application/vnd.groove-vcard'],\n ['vcs', 'text/x-vcalendar'],\n ['vcx', 'application/vnd.vcx'],\n ['vda', 'application/vda'],\n ['vdo', 'video/vdo'],\n ['vew', 'application/groupwise'],\n ['vis', 'application/vnd.visionary'],\n ['viv', ['video/vivo', 'video/vnd.vivo']],\n ['vivo', ['video/vivo', 'video/vnd.vivo']],\n ['vmd', 'application/vocaltec-media-desc'],\n ['vmf', 'application/vocaltec-media-file'],\n ['voc', ['audio/voc', 'audio/x-voc']],\n ['vos', 'video/vosaic'],\n ['vox', 'audio/voxware'],\n ['vqe', 'audio/x-twinvq-plugin'],\n ['vqf', 'audio/x-twinvq'],\n ['vql', 'audio/x-twinvq-plugin'],\n ['vrml', ['model/vrml', 'x-world/x-vrml', 'application/x-vrml']],\n ['vrt', 'x-world/x-vrt'],\n ['vsd', ['application/vnd.visio', 'application/x-visio']],\n ['vsf', 'application/vnd.vsf'],\n ['vst', 'application/x-visio'],\n ['vsw', 'application/x-visio'],\n ['vtu', 'model/vnd.vtu'],\n ['vxml', 'application/voicexml+xml'],\n ['w60', 'application/wordperfect6.0'],\n ['w61', 'application/wordperfect6.1'],\n ['w6w', 'application/msword'],\n ['wad', 'application/x-doom'],\n ['wav', ['audio/wav', 'audio/x-wav']],\n ['wax', 'audio/x-ms-wax'],\n ['wb1', 'application/x-qpro'],\n ['wbmp', 'image/vnd.wap.wbmp'],\n ['wbs', 'application/vnd.criticaltools.wbs+xml'],\n ['wbxml', 'application/vnd.wap.wbxml'],\n ['wcm', 'application/vnd.ms-works'],\n ['wdb', 'application/vnd.ms-works'],\n ['web', 'application/vnd.xara'],\n ['weba', 'audio/webm'],\n ['webm', 'video/webm'],\n ['webp', 'image/webp'],\n ['wg', 'application/vnd.pmi.widget'],\n ['wgt', 'application/widget'],\n ['wiz', 'application/msword'],\n ['wk1', 'application/x-123'],\n ['wks', 'application/vnd.ms-works'],\n ['wm', 'video/x-ms-wm'],\n ['wma', 'audio/x-ms-wma'],\n ['wmd', 'application/x-ms-wmd'],\n ['wmf', ['windows/metafile', 'application/x-msmetafile']],\n ['wml', 'text/vnd.wap.wml'],\n ['wmlc', 'application/vnd.wap.wmlc'],\n ['wmls', 'text/vnd.wap.wmlscript'],\n ['wmlsc', 'application/vnd.wap.wmlscriptc'],\n ['wmv', 'video/x-ms-wmv'],\n ['wmx', 'video/x-ms-wmx'],\n ['wmz', 'application/x-ms-wmz'],\n ['woff', 'application/x-font-woff'],\n ['word', 'application/msword'],\n ['wp', 'application/wordperfect'],\n ['wp5', ['application/wordperfect', 'application/wordperfect6.0']],\n ['wp6', 'application/wordperfect'],\n ['wpd', ['application/wordperfect', 'application/vnd.wordperfect', 'application/x-wpwin']],\n ['wpl', 'application/vnd.ms-wpl'],\n ['wps', 'application/vnd.ms-works'],\n ['wq1', 'application/x-lotus'],\n ['wqd', 'application/vnd.wqd'],\n ['wri', ['application/mswrite', 'application/x-wri', 'application/x-mswrite']],\n ['wrl', ['model/vrml', 'x-world/x-vrml', 'application/x-world']],\n ['wrz', ['model/vrml', 'x-world/x-vrml']],\n ['wsc', 'text/scriplet'],\n ['wsdl', 'application/wsdl+xml'],\n ['wspolicy', 'application/wspolicy+xml'],\n ['wsrc', 'application/x-wais-source'],\n ['wtb', 'application/vnd.webturbo'],\n ['wtk', 'application/x-wintalk'],\n ['wvx', 'video/x-ms-wvx'],\n ['x-png', 'image/png'],\n ['x3d', 'application/vnd.hzn-3d-crossword'],\n ['xaf', 'x-world/x-vrml'],\n ['xap', 'application/x-silverlight-app'],\n ['xar', 'application/vnd.xara'],\n ['xbap', 'application/x-ms-xbap'],\n ['xbd', 'application/vnd.fujixerox.docuworks.binder'],\n ['xbm', ['image/xbm', 'image/x-xbm', 'image/x-xbitmap']],\n ['xdf', 'application/xcap-diff+xml'],\n ['xdm', 'application/vnd.syncml.dm+xml'],\n ['xdp', 'application/vnd.adobe.xdp+xml'],\n ['xdr', 'video/x-amt-demorun'],\n ['xdssc', 'application/dssc+xml'],\n ['xdw', 'application/vnd.fujixerox.docuworks'],\n ['xenc', 'application/xenc+xml'],\n ['xer', 'application/patch-ops-error+xml'],\n ['xfdf', 'application/vnd.adobe.xfdf'],\n ['xfdl', 'application/vnd.xfdl'],\n ['xgz', 'xgl/drawing'],\n ['xhtml', 'application/xhtml+xml'],\n ['xif', 'image/vnd.xiff'],\n ['xl', 'application/excel'],\n ['xla', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xlam', 'application/vnd.ms-excel.addin.macroenabled.12'],\n ['xlb', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],\n ['xlc', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xld', ['application/excel', 'application/x-excel']],\n ['xlk', ['application/excel', 'application/x-excel']],\n ['xll', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],\n ['xlm', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xls', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xlsb', 'application/vnd.ms-excel.sheet.binary.macroenabled.12'],\n ['xlsm', 'application/vnd.ms-excel.sheet.macroenabled.12'],\n ['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],\n ['xlt', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xltm', 'application/vnd.ms-excel.template.macroenabled.12'],\n ['xltx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'],\n ['xlv', ['application/excel', 'application/x-excel']],\n ['xlw', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xm', 'audio/xm'],\n ['xml', ['application/xml', 'text/xml', 'application/atom+xml', 'application/rss+xml']],\n ['xmz', 'xgl/movie'],\n ['xo', 'application/vnd.olpc-sugar'],\n ['xof', 'x-world/x-vrml'],\n ['xop', 'application/xop+xml'],\n ['xpi', 'application/x-xpinstall'],\n ['xpix', 'application/x-vnd.ls-xpix'],\n ['xpm', ['image/xpm', 'image/x-xpixmap']],\n ['xpr', 'application/vnd.is-xpr'],\n ['xps', 'application/vnd.ms-xpsdocument'],\n ['xpw', 'application/vnd.intercon.formnet'],\n ['xslt', 'application/xslt+xml'],\n ['xsm', 'application/vnd.syncml+xml'],\n ['xspf', 'application/xspf+xml'],\n ['xsr', 'video/x-amt-showrun'],\n ['xul', 'application/vnd.mozilla.xul+xml'],\n ['xwd', ['image/x-xwd', 'image/x-xwindowdump']],\n ['xyz', ['chemical/x-xyz', 'chemical/x-pdb']],\n ['yang', 'application/yang'],\n ['yin', 'application/yin+xml'],\n ['z', ['application/x-compressed', 'application/x-compress']],\n ['zaz', 'application/vnd.zzazz.deck+xml'],\n ['zip', ['application/zip', 'multipart/x-zip', 'application/x-zip-compressed', 'application/x-compressed']],\n ['zir', 'application/vnd.zul'],\n ['zmm', 'application/vnd.handheld-entertainment+xml'],\n ['zoo', 'application/octet-stream'],\n ['zsh', 'text/x-script.zsh']\n]);\n\nmodule.exports = {\n detectMimeType(filename) {\n if (!filename) {\n return defaultMimeType;\n }\n\n let parsed = path.parse(filename);\n let extension = (parsed.ext.substr(1) || parsed.name || '').split('?').shift().trim().toLowerCase();\n let value = defaultMimeType;\n\n if (extensions.has(extension)) {\n value = extensions.get(extension);\n }\n\n if (Array.isArray(value)) {\n return value[0];\n }\n return value;\n },\n\n detectExtension(mimeType) {\n if (!mimeType) {\n return defaultExtension;\n }\n let parts = (mimeType || '').toLowerCase().trim().split('/');\n let rootType = parts.shift().trim();\n let subType = parts.join('/').trim();\n\n if (mimeTypes.has(rootType + '/' + subType)) {\n let value = mimeTypes.get(rootType + '/' + subType);\n if (Array.isArray(value)) {\n return value[0];\n }\n return value;\n }\n\n switch (rootType) {\n case 'text':\n return 'txt';\n default:\n return 'bin';\n }\n }\n};\n","/* eslint no-undefined: 0, prefer-spread: 0, no-control-regex: 0 */\n\n'use strict';\n\nconst crypto = require('crypto');\nconst fs = require('fs');\nconst punycode = require('../punycode');\nconst PassThrough = require('stream').PassThrough;\nconst shared = require('../shared');\n\nconst mimeFuncs = require('../mime-funcs');\nconst qp = require('../qp');\nconst base64 = require('../base64');\nconst addressparser = require('../addressparser');\nconst nmfetch = require('../fetch');\nconst LastNewline = require('./last-newline');\n\nconst LeWindows = require('./le-windows');\nconst LeUnix = require('./le-unix');\n\n/**\n * Creates a new mime tree node. Assumes 'multipart/*' as the content type\n * if it is a branch, anything else counts as leaf. If rootNode is missing from\n * the options, assumes this is the root.\n *\n * @param {String} contentType Define the content type for the node. Can be left blank for attachments (derived from filename)\n * @param {Object} [options] optional options\n * @param {Object} [options.rootNode] root node for this tree\n * @param {Object} [options.parentNode] immediate parent for this node\n * @param {Object} [options.filename] filename for an attachment node\n * @param {String} [options.baseBoundary] shared part of the unique multipart boundary\n * @param {Boolean} [options.keepBcc] If true, do not exclude Bcc from the generated headers\n * @param {Function} [options.normalizeHeaderKey] method to normalize header keys for custom caseing\n * @param {String} [options.textEncoding] either 'Q' (the default) or 'B'\n */\nclass MimeNode {\n constructor(contentType, options) {\n this.nodeCounter = 0;\n\n options = options || {};\n\n /**\n * shared part of the unique multipart boundary\n */\n this.baseBoundary = options.baseBoundary || crypto.randomBytes(8).toString('hex');\n this.boundaryPrefix = options.boundaryPrefix || '--_NmP';\n\n this.disableFileAccess = !!options.disableFileAccess;\n this.disableUrlAccess = !!options.disableUrlAccess;\n\n this.normalizeHeaderKey = options.normalizeHeaderKey;\n\n /**\n * If date headers is missing and current node is the root, this value is used instead\n */\n this.date = new Date();\n\n /**\n * Root node for current mime tree\n */\n this.rootNode = options.rootNode || this;\n\n /**\n * If true include Bcc in generated headers (if available)\n */\n this.keepBcc = !!options.keepBcc;\n\n /**\n * If filename is specified but contentType is not (probably an attachment)\n * detect the content type from filename extension\n */\n if (options.filename) {\n /**\n * Filename for this node. Useful with attachments\n */\n this.filename = options.filename;\n if (!contentType) {\n contentType = mimeFuncs.detectMimeType(this.filename.split('.').pop());\n }\n }\n\n /**\n * Indicates which encoding should be used for header strings: \"Q\" or \"B\"\n */\n this.textEncoding = (options.textEncoding || '').toString().trim().charAt(0).toUpperCase();\n\n /**\n * Immediate parent for this node (or undefined if not set)\n */\n this.parentNode = options.parentNode;\n\n /**\n * Hostname for default message-id values\n */\n this.hostname = options.hostname;\n\n /**\n * If set to 'win' then uses \\r\\n, if 'linux' then \\n. If not set (or `raw` is used) then newlines are kept as is.\n */\n this.newline = options.newline;\n\n /**\n * An array for possible child nodes\n */\n this.childNodes = [];\n\n /**\n * Used for generating unique boundaries (prepended to the shared base)\n */\n this._nodeId = ++this.rootNode.nodeCounter;\n\n /**\n * A list of header values for this node in the form of [{key:'', value:''}]\n */\n this._headers = [];\n\n /**\n * True if the content only uses ASCII printable characters\n * @type {Boolean}\n */\n this._isPlainText = false;\n\n /**\n * True if the content is plain text but has longer lines than allowed\n * @type {Boolean}\n */\n this._hasLongLines = false;\n\n /**\n * If set, use instead this value for envelopes instead of generating one\n * @type {Boolean}\n */\n this._envelope = false;\n\n /**\n * If set then use this value as the stream content instead of building it\n * @type {String|Buffer|Stream}\n */\n this._raw = false;\n\n /**\n * Additional transform streams that the message will be piped before\n * exposing by createReadStream\n * @type {Array}\n */\n this._transforms = [];\n\n /**\n * Additional process functions that the message will be piped through before\n * exposing by createReadStream. These functions are run after transforms\n * @type {Array}\n */\n this._processFuncs = [];\n\n /**\n * If content type is set (or derived from the filename) add it to headers\n */\n if (contentType) {\n this.setHeader('Content-Type', contentType);\n }\n }\n\n /////// PUBLIC METHODS\n\n /**\n * Creates and appends a child node.Arguments provided are passed to MimeNode constructor\n *\n * @param {String} [contentType] Optional content type\n * @param {Object} [options] Optional options object\n * @return {Object} Created node object\n */\n createChild(contentType, options) {\n if (!options && typeof contentType === 'object') {\n options = contentType;\n contentType = undefined;\n }\n let node = new MimeNode(contentType, options);\n this.appendChild(node);\n return node;\n }\n\n /**\n * Appends an existing node to the mime tree. Removes the node from an existing\n * tree if needed\n *\n * @param {Object} childNode node to be appended\n * @return {Object} Appended node object\n */\n appendChild(childNode) {\n if (childNode.rootNode !== this.rootNode) {\n childNode.rootNode = this.rootNode;\n childNode._nodeId = ++this.rootNode.nodeCounter;\n }\n\n childNode.parentNode = this;\n\n this.childNodes.push(childNode);\n return childNode;\n }\n\n /**\n * Replaces current node with another node\n *\n * @param {Object} node Replacement node\n * @return {Object} Replacement node\n */\n replace(node) {\n if (node === this) {\n return this;\n }\n\n this.parentNode.childNodes.forEach((childNode, i) => {\n if (childNode === this) {\n node.rootNode = this.rootNode;\n node.parentNode = this.parentNode;\n node._nodeId = this._nodeId;\n\n this.rootNode = this;\n this.parentNode = undefined;\n\n node.parentNode.childNodes[i] = node;\n }\n });\n\n return node;\n }\n\n /**\n * Removes current node from the mime tree\n *\n * @return {Object} removed node\n */\n remove() {\n if (!this.parentNode) {\n return this;\n }\n\n for (let i = this.parentNode.childNodes.length - 1; i >= 0; i--) {\n if (this.parentNode.childNodes[i] === this) {\n this.parentNode.childNodes.splice(i, 1);\n this.parentNode = undefined;\n this.rootNode = this;\n return this;\n }\n }\n }\n\n /**\n * Sets a header value. If the value for selected key exists, it is overwritten.\n * You can set multiple values as well by using [{key:'', value:''}] or\n * {key: 'value'} as the first argument.\n *\n * @param {String|Array|Object} key Header key or a list of key value pairs\n * @param {String} value Header value\n * @return {Object} current node\n */\n setHeader(key, value) {\n let added = false,\n headerValue;\n\n // Allow setting multiple headers at once\n if (!value && key && typeof key === 'object') {\n // allow {key:'content-type', value: 'text/plain'}\n if (key.key && 'value' in key) {\n this.setHeader(key.key, key.value);\n } else if (Array.isArray(key)) {\n // allow [{key:'content-type', value: 'text/plain'}]\n key.forEach(i => {\n this.setHeader(i.key, i.value);\n });\n } else {\n // allow {'content-type': 'text/plain'}\n Object.keys(key).forEach(i => {\n this.setHeader(i, key[i]);\n });\n }\n return this;\n }\n\n key = this._normalizeHeaderKey(key);\n\n headerValue = {\n key,\n value\n };\n\n // Check if the value exists and overwrite\n for (let i = 0, len = this._headers.length; i < len; i++) {\n if (this._headers[i].key === key) {\n if (!added) {\n // replace the first match\n this._headers[i] = headerValue;\n added = true;\n } else {\n // remove following matches\n this._headers.splice(i, 1);\n i--;\n len--;\n }\n }\n }\n\n // match not found, append the value\n if (!added) {\n this._headers.push(headerValue);\n }\n\n return this;\n }\n\n /**\n * Adds a header value. If the value for selected key exists, the value is appended\n * as a new field and old one is not touched.\n * You can set multiple values as well by using [{key:'', value:''}] or\n * {key: 'value'} as the first argument.\n *\n * @param {String|Array|Object} key Header key or a list of key value pairs\n * @param {String} value Header value\n * @return {Object} current node\n */\n addHeader(key, value) {\n // Allow setting multiple headers at once\n if (!value && key && typeof key === 'object') {\n // allow {key:'content-type', value: 'text/plain'}\n if (key.key && key.value) {\n this.addHeader(key.key, key.value);\n } else if (Array.isArray(key)) {\n // allow [{key:'content-type', value: 'text/plain'}]\n key.forEach(i => {\n this.addHeader(i.key, i.value);\n });\n } else {\n // allow {'content-type': 'text/plain'}\n Object.keys(key).forEach(i => {\n this.addHeader(i, key[i]);\n });\n }\n return this;\n } else if (Array.isArray(value)) {\n value.forEach(val => {\n this.addHeader(key, val);\n });\n return this;\n }\n\n this._headers.push({\n key: this._normalizeHeaderKey(key),\n value\n });\n\n return this;\n }\n\n /**\n * Retrieves the first mathcing value of a selected key\n *\n * @param {String} key Key to search for\n * @retun {String} Value for the key\n */\n getHeader(key) {\n key = this._normalizeHeaderKey(key);\n for (let i = 0, len = this._headers.length; i < len; i++) {\n if (this._headers[i].key === key) {\n return this._headers[i].value;\n }\n }\n }\n\n /**\n * Sets body content for current node. If the value is a string, charset is added automatically\n * to Content-Type (if it is text/*). If the value is a Buffer, you need to specify\n * the charset yourself\n *\n * @param (String|Buffer) content Body content\n * @return {Object} current node\n */\n setContent(content) {\n this.content = content;\n if (typeof this.content.pipe === 'function') {\n // pre-stream handler. might be triggered if a stream is set as content\n // and 'error' fires before anything is done with this stream\n this._contentErrorHandler = err => {\n this.content.removeListener('error', this._contentErrorHandler);\n this.content = err;\n };\n this.content.once('error', this._contentErrorHandler);\n } else if (typeof this.content === 'string') {\n this._isPlainText = mimeFuncs.isPlainText(this.content);\n if (this._isPlainText && mimeFuncs.hasLongerLines(this.content, 76)) {\n // If there are lines longer than 76 symbols/bytes do not use 7bit\n this._hasLongLines = true;\n }\n }\n return this;\n }\n\n build(callback) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n let stream = this.createReadStream();\n let buf = [];\n let buflen = 0;\n let returned = false;\n\n stream.on('readable', () => {\n let chunk;\n\n while ((chunk = stream.read()) !== null) {\n buf.push(chunk);\n buflen += chunk.length;\n }\n });\n\n stream.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n\n return callback(err);\n });\n\n stream.once('end', chunk => {\n if (returned) {\n return;\n }\n returned = true;\n\n if (chunk && chunk.length) {\n buf.push(chunk);\n buflen += chunk.length;\n }\n return callback(null, Buffer.concat(buf, buflen));\n });\n\n return promise;\n }\n\n getTransferEncoding() {\n let transferEncoding = false;\n let contentType = (this.getHeader('Content-Type') || '').toString().toLowerCase().trim();\n\n if (this.content) {\n transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '').toString().toLowerCase().trim();\n if (!transferEncoding || !['base64', 'quoted-printable'].includes(transferEncoding)) {\n if (/^text\\//i.test(contentType)) {\n // If there are no special symbols, no need to modify the text\n if (this._isPlainText && !this._hasLongLines) {\n transferEncoding = '7bit';\n } else if (typeof this.content === 'string' || this.content instanceof Buffer) {\n // detect preferred encoding for string value\n transferEncoding = this._getTextEncoding(this.content) === 'Q' ? 'quoted-printable' : 'base64';\n } else {\n // we can not check content for a stream, so either use preferred encoding or fallback to QP\n transferEncoding = this.textEncoding === 'B' ? 'base64' : 'quoted-printable';\n }\n } else if (!/^(multipart|message)\\//i.test(contentType)) {\n transferEncoding = transferEncoding || 'base64';\n }\n }\n }\n return transferEncoding;\n }\n\n /**\n * Builds the header block for the mime node. Append \\r\\n\\r\\n before writing the content\n *\n * @returns {String} Headers\n */\n buildHeaders() {\n let transferEncoding = this.getTransferEncoding();\n let headers = [];\n\n if (transferEncoding) {\n this.setHeader('Content-Transfer-Encoding', transferEncoding);\n }\n\n if (this.filename && !this.getHeader('Content-Disposition')) {\n this.setHeader('Content-Disposition', 'attachment');\n }\n\n // Ensure mandatory header fields\n if (this.rootNode === this) {\n if (!this.getHeader('Date')) {\n this.setHeader('Date', this.date.toUTCString().replace(/GMT/, '+0000'));\n }\n\n // ensure that Message-Id is present\n this.messageId();\n\n if (!this.getHeader('MIME-Version')) {\n this.setHeader('MIME-Version', '1.0');\n }\n }\n\n this._headers.forEach(header => {\n let key = header.key;\n let value = header.value;\n let structured;\n let param;\n let options = {};\n let formattedHeaders = ['From', 'Sender', 'To', 'Cc', 'Bcc', 'Reply-To', 'Date', 'References'];\n\n if (value && typeof value === 'object' && !formattedHeaders.includes(key)) {\n Object.keys(value).forEach(key => {\n if (key !== 'value') {\n options[key] = value[key];\n }\n });\n value = (value.value || '').toString();\n if (!value.trim()) {\n return;\n }\n }\n\n if (options.prepared) {\n // header value is\n if (options.foldLines) {\n headers.push(mimeFuncs.foldLines(key + ': ' + value));\n } else {\n headers.push(key + ': ' + value);\n }\n return;\n }\n\n switch (header.key) {\n case 'Content-Disposition':\n structured = mimeFuncs.parseHeaderValue(value);\n if (this.filename) {\n structured.params.filename = this.filename;\n }\n value = mimeFuncs.buildHeaderValue(structured);\n break;\n\n case 'Content-Type':\n structured = mimeFuncs.parseHeaderValue(value);\n\n this._handleContentType(structured);\n\n if (structured.value.match(/^text\\/plain\\b/) && typeof this.content === 'string' && /[\\u0080-\\uFFFF]/.test(this.content)) {\n structured.params.charset = 'utf-8';\n }\n\n value = mimeFuncs.buildHeaderValue(structured);\n\n if (this.filename) {\n // add support for non-compliant clients like QQ webmail\n // we can't build the value with buildHeaderValue as the value is non standard and\n // would be converted to parameter continuation encoding that we do not want\n param = this._encodeWords(this.filename);\n\n if (param !== this.filename || /[\\s'\"\\\\;:/=(),<>@[\\]?]|^-/.test(param)) {\n // include value in quotes if needed\n param = '\"' + param + '\"';\n }\n value += '; name=' + param;\n }\n break;\n\n case 'Bcc':\n if (!this.keepBcc) {\n // skip BCC values\n return;\n }\n break;\n }\n\n value = this._encodeHeaderValue(key, value);\n\n // skip empty lines\n if (!(value || '').toString().trim()) {\n return;\n }\n\n if (typeof this.normalizeHeaderKey === 'function') {\n let normalized = this.normalizeHeaderKey(key, value);\n if (normalized && typeof normalized === 'string' && normalized.length) {\n key = normalized;\n }\n }\n\n headers.push(mimeFuncs.foldLines(key + ': ' + value, 76));\n });\n\n return headers.join('\\r\\n');\n }\n\n /**\n * Streams the rfc2822 message from the current node. If this is a root node,\n * mandatory header fields are set if missing (Date, Message-Id, MIME-Version)\n *\n * @return {String} Compiled message\n */\n createReadStream(options) {\n options = options || {};\n\n let stream = new PassThrough(options);\n let outputStream = stream;\n let transform;\n\n this.stream(stream, options, err => {\n if (err) {\n outputStream.emit('error', err);\n return;\n }\n stream.end();\n });\n\n for (let i = 0, len = this._transforms.length; i < len; i++) {\n transform = typeof this._transforms[i] === 'function' ? this._transforms[i]() : this._transforms[i];\n outputStream.once('error', err => {\n transform.emit('error', err);\n });\n outputStream = outputStream.pipe(transform);\n }\n\n // ensure terminating newline after possible user transforms\n transform = new LastNewline();\n outputStream.once('error', err => {\n transform.emit('error', err);\n });\n outputStream = outputStream.pipe(transform);\n\n // dkim and stuff\n for (let i = 0, len = this._processFuncs.length; i < len; i++) {\n transform = this._processFuncs[i];\n outputStream = transform(outputStream);\n }\n\n if (this.newline) {\n const winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes(this.newline.toString().toLowerCase());\n const newlineTransform = winbreak ? new LeWindows() : new LeUnix();\n\n const stream = outputStream.pipe(newlineTransform);\n outputStream.on('error', err => stream.emit('error', err));\n return stream;\n }\n\n return outputStream;\n }\n\n /**\n * Appends a transform stream object to the transforms list. Final output\n * is passed through this stream before exposing\n *\n * @param {Object} transform Read-Write stream\n */\n transform(transform) {\n this._transforms.push(transform);\n }\n\n /**\n * Appends a post process function. The functon is run after transforms and\n * uses the following syntax\n *\n * processFunc(input) -> outputStream\n *\n * @param {Object} processFunc Read-Write stream\n */\n processFunc(processFunc) {\n this._processFuncs.push(processFunc);\n }\n\n stream(outputStream, options, done) {\n let transferEncoding = this.getTransferEncoding();\n let contentStream;\n let localStream;\n\n // protect actual callback against multiple triggering\n let returned = false;\n let callback = err => {\n if (returned) {\n return;\n }\n returned = true;\n done(err);\n };\n\n // for multipart nodes, push child nodes\n // for content nodes end the stream\n let finalize = () => {\n let childId = 0;\n let processChildNode = () => {\n if (childId >= this.childNodes.length) {\n outputStream.write('\\r\\n--' + this.boundary + '--\\r\\n');\n return callback();\n }\n let child = this.childNodes[childId++];\n outputStream.write((childId > 1 ? '\\r\\n' : '') + '--' + this.boundary + '\\r\\n');\n child.stream(outputStream, options, err => {\n if (err) {\n return callback(err);\n }\n setImmediate(processChildNode);\n });\n };\n\n if (this.multipart) {\n setImmediate(processChildNode);\n } else {\n return callback();\n }\n };\n\n // pushes node content\n let sendContent = () => {\n if (this.content) {\n if (Object.prototype.toString.call(this.content) === '[object Error]') {\n // content is already errored\n return callback(this.content);\n }\n\n if (typeof this.content.pipe === 'function') {\n this.content.removeListener('error', this._contentErrorHandler);\n this._contentErrorHandler = err => callback(err);\n this.content.once('error', this._contentErrorHandler);\n }\n\n let createStream = () => {\n if (['quoted-printable', 'base64'].includes(transferEncoding)) {\n contentStream = new (transferEncoding === 'base64' ? base64 : qp).Encoder(options);\n\n contentStream.pipe(outputStream, {\n end: false\n });\n contentStream.once('end', finalize);\n contentStream.once('error', err => callback(err));\n\n localStream = this._getStream(this.content);\n localStream.pipe(contentStream);\n } else {\n // anything that is not QP or Base54 passes as-is\n localStream = this._getStream(this.content);\n localStream.pipe(outputStream, {\n end: false\n });\n localStream.once('end', finalize);\n }\n\n localStream.once('error', err => callback(err));\n };\n\n if (this.content._resolve) {\n let chunks = [];\n let chunklen = 0;\n let returned = false;\n let sourceStream = this._getStream(this.content);\n sourceStream.on('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n callback(err);\n });\n sourceStream.on('readable', () => {\n let chunk;\n while ((chunk = sourceStream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n sourceStream.on('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n this.content._resolve = false;\n this.content._resolvedValue = Buffer.concat(chunks, chunklen);\n setImmediate(createStream);\n });\n } else {\n setImmediate(createStream);\n }\n return;\n } else {\n return setImmediate(finalize);\n }\n };\n\n if (this._raw) {\n setImmediate(() => {\n if (Object.prototype.toString.call(this._raw) === '[object Error]') {\n // content is already errored\n return callback(this._raw);\n }\n\n // remove default error handler (if set)\n if (typeof this._raw.pipe === 'function') {\n this._raw.removeListener('error', this._contentErrorHandler);\n }\n\n let raw = this._getStream(this._raw);\n raw.pipe(outputStream, {\n end: false\n });\n raw.on('error', err => outputStream.emit('error', err));\n raw.on('end', finalize);\n });\n } else {\n outputStream.write(this.buildHeaders() + '\\r\\n\\r\\n');\n setImmediate(sendContent);\n }\n }\n\n /**\n * Sets envelope to be used instead of the generated one\n *\n * @return {Object} SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}\n */\n setEnvelope(envelope) {\n let list;\n\n this._envelope = {\n from: false,\n to: []\n };\n\n if (envelope.from) {\n list = [];\n this._convertAddresses(this._parseAddresses(envelope.from), list);\n list = list.filter(address => address && address.address);\n if (list.length && list[0]) {\n this._envelope.from = list[0].address;\n }\n }\n ['to', 'cc', 'bcc'].forEach(key => {\n if (envelope[key]) {\n this._convertAddresses(this._parseAddresses(envelope[key]), this._envelope.to);\n }\n });\n\n this._envelope.to = this._envelope.to.map(to => to.address).filter(address => address);\n\n let standardFields = ['to', 'cc', 'bcc', 'from'];\n Object.keys(envelope).forEach(key => {\n if (!standardFields.includes(key)) {\n this._envelope[key] = envelope[key];\n }\n });\n\n return this;\n }\n\n /**\n * Generates and returns an object with parsed address fields\n *\n * @return {Object} Address object\n */\n getAddresses() {\n let addresses = {};\n\n this._headers.forEach(header => {\n let key = header.key.toLowerCase();\n if (['from', 'sender', 'reply-to', 'to', 'cc', 'bcc'].includes(key)) {\n if (!Array.isArray(addresses[key])) {\n addresses[key] = [];\n }\n\n this._convertAddresses(this._parseAddresses(header.value), addresses[key]);\n }\n });\n\n return addresses;\n }\n\n /**\n * Generates and returns SMTP envelope with the sender address and a list of recipients addresses\n *\n * @return {Object} SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}\n */\n getEnvelope() {\n if (this._envelope) {\n return this._envelope;\n }\n\n let envelope = {\n from: false,\n to: []\n };\n this._headers.forEach(header => {\n let list = [];\n if (header.key === 'From' || (!envelope.from && ['Reply-To', 'Sender'].includes(header.key))) {\n this._convertAddresses(this._parseAddresses(header.value), list);\n if (list.length && list[0]) {\n envelope.from = list[0].address;\n }\n } else if (['To', 'Cc', 'Bcc'].includes(header.key)) {\n this._convertAddresses(this._parseAddresses(header.value), envelope.to);\n }\n });\n\n envelope.to = envelope.to.map(to => to.address);\n\n return envelope;\n }\n\n /**\n * Returns Message-Id value. If it does not exist, then creates one\n *\n * @return {String} Message-Id value\n */\n messageId() {\n let messageId = this.getHeader('Message-ID');\n // You really should define your own Message-Id field!\n if (!messageId) {\n messageId = this._generateMessageId();\n this.setHeader('Message-ID', messageId);\n }\n return messageId;\n }\n\n /**\n * Sets pregenerated content that will be used as the output of this node\n *\n * @param {String|Buffer|Stream} Raw MIME contents\n */\n setRaw(raw) {\n this._raw = raw;\n\n if (this._raw && typeof this._raw.pipe === 'function') {\n // pre-stream handler. might be triggered if a stream is set as content\n // and 'error' fires before anything is done with this stream\n this._contentErrorHandler = err => {\n this._raw.removeListener('error', this._contentErrorHandler);\n this._raw = err;\n };\n this._raw.once('error', this._contentErrorHandler);\n }\n\n return this;\n }\n\n /////// PRIVATE METHODS\n\n /**\n * Detects and returns handle to a stream related with the content.\n *\n * @param {Mixed} content Node content\n * @returns {Object} Stream object\n */\n _getStream(content) {\n let contentStream;\n\n if (content._resolvedValue) {\n // pass string or buffer content as a stream\n contentStream = new PassThrough();\n\n setImmediate(() => {\n try {\n contentStream.end(content._resolvedValue);\n } catch (err) {\n contentStream.emit('error', err);\n }\n });\n\n return contentStream;\n } else if (typeof content.pipe === 'function') {\n // assume as stream\n return content;\n } else if (content && typeof content.path === 'string' && !content.href) {\n if (this.disableFileAccess) {\n contentStream = new PassThrough();\n setImmediate(() => contentStream.emit('error', new Error('File access rejected for ' + content.path)));\n return contentStream;\n }\n // read file\n return fs.createReadStream(content.path);\n } else if (content && typeof content.href === 'string') {\n if (this.disableUrlAccess) {\n contentStream = new PassThrough();\n setImmediate(() => contentStream.emit('error', new Error('Url access rejected for ' + content.href)));\n return contentStream;\n }\n // fetch URL\n return nmfetch(content.href, { headers: content.httpHeaders });\n } else {\n // pass string or buffer content as a stream\n contentStream = new PassThrough();\n\n setImmediate(() => {\n try {\n contentStream.end(content || '');\n } catch (err) {\n contentStream.emit('error', err);\n }\n });\n return contentStream;\n }\n }\n\n /**\n * Parses addresses. Takes in a single address or an array or an\n * array of address arrays (eg. To: [[first group], [second group],...])\n *\n * @param {Mixed} addresses Addresses to be parsed\n * @return {Array} An array of address objects\n */\n _parseAddresses(addresses) {\n return [].concat.apply(\n [],\n [].concat(addresses).map(address => {\n // eslint-disable-line prefer-spread\n if (address && address.address) {\n address.address = this._normalizeAddress(address.address);\n address.name = address.name || '';\n return [address];\n }\n return addressparser(address);\n })\n );\n }\n\n /**\n * Normalizes a header key, uses Camel-Case form, except for uppercase MIME-\n *\n * @param {String} key Key to be normalized\n * @return {String} key in Camel-Case form\n */\n _normalizeHeaderKey(key) {\n key = (key || '')\n .toString()\n // no newlines in keys\n .replace(/\\r?\\n|\\r/g, ' ')\n .trim()\n .toLowerCase()\n // use uppercase words, except MIME\n .replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())\n // special case\n .replace(/^Content-Features$/i, 'Content-features');\n\n return key;\n }\n\n /**\n * Checks if the content type is multipart and defines boundary if needed.\n * Doesn't return anything, modifies object argument instead.\n *\n * @param {Object} structured Parsed header value for 'Content-Type' key\n */\n _handleContentType(structured) {\n this.contentType = structured.value.trim().toLowerCase();\n\n this.multipart = /^multipart\\//i.test(this.contentType) ? this.contentType.substr(this.contentType.indexOf('/') + 1) : false;\n\n if (this.multipart) {\n this.boundary = structured.params.boundary = structured.params.boundary || this.boundary || this._generateBoundary();\n } else {\n this.boundary = false;\n }\n }\n\n /**\n * Generates a multipart boundary value\n *\n * @return {String} boundary value\n */\n _generateBoundary() {\n return this.rootNode.boundaryPrefix + '-' + this.rootNode.baseBoundary + '-Part_' + this._nodeId;\n }\n\n /**\n * Encodes a header value for use in the generated rfc2822 email.\n *\n * @param {String} key Header key\n * @param {String} value Header value\n */\n _encodeHeaderValue(key, value) {\n key = this._normalizeHeaderKey(key);\n\n switch (key) {\n // Structured headers\n case 'From':\n case 'Sender':\n case 'To':\n case 'Cc':\n case 'Bcc':\n case 'Reply-To':\n return this._convertAddresses(this._parseAddresses(value));\n\n // values enclosed in <>\n case 'Message-ID':\n case 'In-Reply-To':\n case 'Content-Id':\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n\n if (value.charAt(0) !== '<') {\n value = '<' + value;\n }\n\n if (value.charAt(value.length - 1) !== '>') {\n value = value + '>';\n }\n return value;\n\n // space separated list of values enclosed in <>\n case 'References':\n value = [].concat\n .apply(\n [],\n [].concat(value || '').map(elm => {\n // eslint-disable-line prefer-spread\n elm = (elm || '')\n .toString()\n .replace(/\\r?\\n|\\r/g, ' ')\n .trim();\n return elm.replace(/<[^>]*>/g, str => str.replace(/\\s/g, '')).split(/\\s+/);\n })\n )\n .map(elm => {\n if (elm.charAt(0) !== '<') {\n elm = '<' + elm;\n }\n if (elm.charAt(elm.length - 1) !== '>') {\n elm = elm + '>';\n }\n return elm;\n });\n\n return value.join(' ').trim();\n\n case 'Date':\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return value.toUTCString().replace(/GMT/, '+0000');\n }\n\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n return this._encodeWords(value);\n\n case 'Content-Type':\n case 'Content-Disposition':\n // if it includes a filename then it is already encoded\n return (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n\n default:\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n // encodeWords only encodes if needed, otherwise the original string is returned\n return this._encodeWords(value);\n }\n }\n\n /**\n * Rebuilds address object using punycode and other adjustments\n *\n * @param {Array} addresses An array of address objects\n * @param {Array} [uniqueList] An array to be populated with addresses\n * @return {String} address string\n */\n _convertAddresses(addresses, uniqueList) {\n let values = [];\n\n uniqueList = uniqueList || [];\n\n [].concat(addresses || []).forEach(address => {\n if (address.address) {\n address.address = this._normalizeAddress(address.address);\n\n if (!address.name) {\n values.push(address.address.indexOf(' ') >= 0 ? `<${address.address}>` : `${address.address}`);\n } else if (address.name) {\n values.push(`${this._encodeAddressName(address.name)} <${address.address}>`);\n }\n\n if (address.address) {\n if (!uniqueList.filter(a => a.address === address.address).length) {\n uniqueList.push(address);\n }\n }\n } else if (address.group) {\n let groupListAddresses = (address.group.length ? this._convertAddresses(address.group, uniqueList) : '').trim();\n values.push(`${this._encodeAddressName(address.name)}:${groupListAddresses};`);\n }\n });\n\n return values.join(', ');\n }\n\n /**\n * Normalizes an email address\n *\n * @param {Array} address An array of address objects\n * @return {String} address string\n */\n _normalizeAddress(address) {\n address = (address || '')\n .toString()\n .replace(/[\\x00-\\x1F<>]+/g, ' ') // remove unallowed characters\n .trim();\n\n let lastAt = address.lastIndexOf('@');\n if (lastAt < 0) {\n // Bare username\n return address;\n }\n\n let user = address.substr(0, lastAt);\n let domain = address.substr(lastAt + 1);\n\n // Usernames are not touched and are kept as is even if these include unicode\n // Domains are punycoded by default\n // 'jõgeva.ee' will be converted to 'xn--jgeva-dua.ee'\n // non-unicode domains are left as is\n\n let encodedDomain;\n\n try {\n encodedDomain = punycode.toASCII(domain.toLowerCase());\n } catch (err) {\n // keep as is?\n }\n\n if (user.indexOf(' ') >= 0) {\n if (user.charAt(0) !== '\"') {\n user = '\"' + user;\n }\n if (user.substr(-1) !== '\"') {\n user = user + '\"';\n }\n }\n\n return `${user}@${encodedDomain}`;\n }\n\n /**\n * If needed, mime encodes the name part\n *\n * @param {String} name Name part of an address\n * @returns {String} Mime word encoded string if needed\n */\n _encodeAddressName(name) {\n if (!/^[\\w ']*$/.test(name)) {\n if (/^[\\x20-\\x7e]*$/.test(name)) {\n return '\"' + name.replace(/([\\\\\"])/g, '\\\\$1') + '\"';\n } else {\n return mimeFuncs.encodeWord(name, this._getTextEncoding(name), 52);\n }\n }\n return name;\n }\n\n /**\n * If needed, mime encodes the name part\n *\n * @param {String} name Name part of an address\n * @returns {String} Mime word encoded string if needed\n */\n _encodeWords(value) {\n // set encodeAll parameter to true even though it is against the recommendation of RFC2047,\n // by default only words that include non-ascii should be converted into encoded words\n // but some clients (eg. Zimbra) do not handle it properly and remove surrounding whitespace\n return mimeFuncs.encodeWords(value, this._getTextEncoding(value), 52, true);\n }\n\n /**\n * Detects best mime encoding for a text value\n *\n * @param {String} value Value to check for\n * @return {String} either 'Q' or 'B'\n */\n _getTextEncoding(value) {\n value = (value || '').toString();\n\n let encoding = this.textEncoding;\n let latinLen;\n let nonLatinLen;\n\n if (!encoding) {\n // count latin alphabet symbols and 8-bit range symbols + control symbols\n // if there are more latin characters, then use quoted-printable\n // encoding, otherwise use base64\n nonLatinLen = (value.match(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\u0080-\\uFFFF]/g) || []).length; // eslint-disable-line no-control-regex\n latinLen = (value.match(/[a-z]/gi) || []).length;\n // if there are more latin symbols than binary/unicode, then prefer Q, otherwise B\n encoding = nonLatinLen < latinLen ? 'Q' : 'B';\n }\n return encoding;\n }\n\n /**\n * Generates a message id\n *\n * @return {String} Random Message-ID value\n */\n _generateMessageId() {\n return (\n '<' +\n [2, 2, 2, 6].reduce(\n // crux to generate UUID-like random strings\n (prev, len) => prev + '-' + crypto.randomBytes(len).toString('hex'),\n crypto.randomBytes(4).toString('hex')\n ) +\n '@' +\n // try to use the domain of the FROM address or fallback to server hostname\n (this.getEnvelope().from || this.hostname || 'localhost').split('@').pop() +\n '>'\n );\n }\n}\n\nmodule.exports = MimeNode;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\nclass LastNewline extends Transform {\n constructor() {\n super();\n this.lastByte = false;\n }\n\n _transform(chunk, encoding, done) {\n if (chunk.length) {\n this.lastByte = chunk[chunk.length - 1];\n }\n\n this.push(chunk);\n done();\n }\n\n _flush(done) {\n if (this.lastByte === 0x0a) {\n return done();\n }\n if (this.lastByte === 0x0d) {\n this.push(Buffer.from('\\n'));\n return done();\n }\n this.push(Buffer.from('\\r\\n'));\n return done();\n }\n}\n\nmodule.exports = LastNewline;\n","'use strict';\n\nconst stream = require('stream');\nconst Transform = stream.Transform;\n\n/**\n * Ensures that only is used for linebreaks\n *\n * @param {Object} options Stream options\n */\nclass LeWindows extends Transform {\n constructor(options) {\n super(options);\n // init Transform\n this.options = options || {};\n }\n\n /**\n * Escapes dots\n */\n _transform(chunk, encoding, done) {\n let buf;\n let lastPos = 0;\n\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x0d) {\n // \\n\n buf = chunk.slice(lastPos, i);\n lastPos = i + 1;\n this.push(buf);\n }\n }\n if (lastPos && lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n this.push(buf);\n } else if (!lastPos) {\n this.push(chunk);\n }\n done();\n }\n}\n\nmodule.exports = LeWindows;\n","'use strict';\n\nconst stream = require('stream');\nconst Transform = stream.Transform;\n\n/**\n * Ensures that only sequences are used for linebreaks\n *\n * @param {Object} options Stream options\n */\nclass LeWindows extends Transform {\n constructor(options) {\n super(options);\n // init Transform\n this.options = options || {};\n this.lastByte = false;\n }\n\n /**\n * Escapes dots\n */\n _transform(chunk, encoding, done) {\n let buf;\n let lastPos = 0;\n\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x0a) {\n // \\n\n if ((i && chunk[i - 1] !== 0x0d) || (!i && this.lastByte !== 0x0d)) {\n if (i > lastPos) {\n buf = chunk.slice(lastPos, i);\n this.push(buf);\n }\n this.push(Buffer.from('\\r\\n'));\n lastPos = i + 1;\n }\n }\n }\n\n if (lastPos && lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n this.push(buf);\n } else if (!lastPos) {\n this.push(chunk);\n }\n\n this.lastByte = chunk[chunk.length - 1];\n done();\n }\n}\n\nmodule.exports = LeWindows;\n","'use strict';\n\nconst Mailer = require('./mailer');\nconst shared = require('./shared');\nconst SMTPPool = require('./smtp-pool');\nconst SMTPTransport = require('./smtp-transport');\nconst SendmailTransport = require('./sendmail-transport');\nconst StreamTransport = require('./stream-transport');\nconst JSONTransport = require('./json-transport');\nconst SESTransport = require('./ses-transport');\nconst nmfetch = require('./fetch');\nconst packageData = require('../package.json');\n\nconst ETHEREAL_API = (process.env.ETHEREAL_API || 'https://api.nodemailer.com').replace(/\\/+$/, '');\nconst ETHEREAL_WEB = (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\\/+$/, '');\nconst ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());\n\nlet testAccount = false;\n\nmodule.exports.createTransport = function (transporter, defaults) {\n let urlConfig;\n let options;\n let mailer;\n\n if (\n // provided transporter is a configuration object, not transporter plugin\n (typeof transporter === 'object' && typeof transporter.send !== 'function') ||\n // provided transporter looks like a connection url\n (typeof transporter === 'string' && /^(smtps?|direct):/i.test(transporter))\n ) {\n if ((urlConfig = typeof transporter === 'string' ? transporter : transporter.url)) {\n // parse a configuration URL into configuration options\n options = shared.parseConnectionUrl(urlConfig);\n } else {\n options = transporter;\n }\n\n if (options.pool) {\n transporter = new SMTPPool(options);\n } else if (options.sendmail) {\n transporter = new SendmailTransport(options);\n } else if (options.streamTransport) {\n transporter = new StreamTransport(options);\n } else if (options.jsonTransport) {\n transporter = new JSONTransport(options);\n } else if (options.SES) {\n transporter = new SESTransport(options);\n } else {\n transporter = new SMTPTransport(options);\n }\n }\n\n mailer = new Mailer(transporter, options, defaults);\n\n return mailer;\n};\n\nmodule.exports.createTestAccount = function (apiUrl, callback) {\n let promise;\n\n if (!callback && typeof apiUrl === 'function') {\n callback = apiUrl;\n apiUrl = false;\n }\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n if (ETHEREAL_CACHE && testAccount) {\n setImmediate(() => callback(null, testAccount));\n return promise;\n }\n\n apiUrl = apiUrl || ETHEREAL_API;\n\n let chunks = [];\n let chunklen = 0;\n\n let req = nmfetch(apiUrl + '/user', {\n contentType: 'application/json',\n method: 'POST',\n body: Buffer.from(\n JSON.stringify({\n requestor: packageData.name,\n version: packageData.version\n })\n )\n });\n\n req.on('readable', () => {\n let chunk;\n while ((chunk = req.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n req.once('error', err => callback(err));\n\n req.once('end', () => {\n let res = Buffer.concat(chunks, chunklen);\n let data;\n let err;\n try {\n data = JSON.parse(res.toString());\n } catch (E) {\n err = E;\n }\n if (err) {\n return callback(err);\n }\n if (data.status !== 'success' || data.error) {\n return callback(new Error(data.error || 'Request failed'));\n }\n delete data.status;\n testAccount = data;\n callback(null, testAccount);\n });\n\n return promise;\n};\n\nmodule.exports.getTestMessageUrl = function (info) {\n if (!info || !info.response) {\n return false;\n }\n\n let infoProps = new Map();\n info.response.replace(/\\[([^\\]]+)\\]$/, (m, props) => {\n props.replace(/\\b([A-Z0-9]+)=([^\\s]+)/g, (m, key, value) => {\n infoProps.set(key, value);\n });\n });\n\n if (infoProps.has('STATUS') && infoProps.has('MSGID')) {\n return (testAccount.web || ETHEREAL_WEB) + '/message/' + infoProps.get('MSGID');\n }\n\n return false;\n};\n","/*\n\nCopied from https://github.com/mathiasbynens/punycode.js/blob/ef3505c8abb5143a00d53ce59077c9f7f4b2ac47/punycode.js\n\nCopyright Mathias Bynens \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n/* eslint callback-return: 0, no-bitwise: 0, eqeqeq: 0, prefer-arrow-callback: 0, object-shorthand: 0 */\n\n'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n overflow: 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n throw new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n const result = [];\n let length = array.length;\n while (length--) {\n result[length] = callback(array[length]);\n }\n return result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n const parts = domain.split('@');\n let result = '';\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n domain = parts[1];\n }\n // Avoid `split(regex)` for IE8 compatibility. See #17.\n domain = domain.replace(regexSeparators, '\\x2E');\n const labels = domain.split('.');\n const encoded = map(labels, callback).join('.');\n return result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n const output = [];\n let counter = 0;\n const length = string.length;\n while (counter < length) {\n const value = string.charCodeAt(counter++);\n if (value >= 0xd800 && value <= 0xdbff && counter < length) {\n // It's a high surrogate, and there is a next character.\n const extra = string.charCodeAt(counter++);\n if ((extra & 0xfc00) == 0xdc00) {\n // Low surrogate.\n output.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function (codePoint) {\n if (codePoint >= 0x30 && codePoint < 0x3a) {\n return 26 + (codePoint - 0x30);\n }\n if (codePoint >= 0x41 && codePoint < 0x5b) {\n return codePoint - 0x41;\n }\n if (codePoint >= 0x61 && codePoint < 0x7b) {\n return codePoint - 0x61;\n }\n return base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function (digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function (delta, numPoints, firstTime) {\n let k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; /* no initialization */ delta > (baseMinusTMin * tMax) >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + ((baseMinusTMin + 1) * delta) / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function (input) {\n // Don't use UCS-2.\n const output = [];\n const inputLength = input.length;\n let i = 0;\n let n = initialN;\n let bias = initialBias;\n\n // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n\n let basic = input.lastIndexOf(delimiter);\n if (basic < 0) {\n basic = 0;\n }\n\n for (let j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n output.push(input.charCodeAt(j));\n }\n\n // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n\n for (let index = basic > 0 ? basic + 1 : 0; index < inputLength /* no final expression */; ) {\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n const oldi = i;\n for (let w = 1, k = base /* no condition */; ; k += base) {\n if (index >= inputLength) {\n error('invalid-input');\n }\n\n const digit = basicToDigit(input.charCodeAt(index++));\n\n if (digit >= base) {\n error('invalid-input');\n }\n if (digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n\n i += digit * w;\n const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (digit < t) {\n break;\n }\n\n const baseMinusT = base - t;\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n\n w *= baseMinusT;\n }\n\n const out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0);\n\n // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n\n n += floor(i / out);\n i %= out;\n\n // Insert `n` at position `i` of the output.\n output.splice(i++, 0, n);\n }\n\n return String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function (input) {\n const output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n const inputLength = input.length;\n\n // Initialize the state.\n let n = initialN;\n let delta = 0;\n let bias = initialBias;\n\n // Handle the basic code points.\n for (const currentValue of input) {\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n const basicLength = output.length;\n let handledCPCount = basicLength;\n\n // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n let m = maxInt;\n for (const currentValue of input) {\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow.\n const handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (const currentValue of input) {\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n if (currentValue === n) {\n // Represent delta as a generalized variable-length integer.\n let q = delta;\n for (let k = base /* no condition */; ; k += base) {\n const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (q < t) {\n break;\n }\n const qMinusT = q - t;\n const baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + (qMinusT % baseMinusT), 0)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function (input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function (input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n /**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n version: '2.3.1',\n /**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see \n * @memberOf punycode\n * @type Object\n */\n ucs2: {\n decode: ucs2decode,\n encode: ucs2encode\n },\n decode: decode,\n encode: encode,\n toASCII: toASCII,\n toUnicode: toUnicode\n};\n\nmodule.exports = punycode;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\n/**\n * Encodes a Buffer into a Quoted-Printable encoded string\n *\n * @param {Buffer} buffer Buffer to convert\n * @returns {String} Quoted-Printable encoded string\n */\nfunction encode(buffer) {\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer, 'utf-8');\n }\n\n // usable characters that do not need encoding\n let ranges = [\n // https://tools.ietf.org/html/rfc2045#section-6.7\n [0x09], // \n [0x0a], // \n [0x0d], // \n [0x20, 0x3c], // !\"#$%&'()*+,-./0123456789:;\n [0x3e, 0x7e] // >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\n ];\n let result = '';\n let ord;\n\n for (let i = 0, len = buffer.length; i < len; i++) {\n ord = buffer[i];\n // if the char is in allowed range, then keep as is, unless it is a WS in the end of a line\n if (checkRanges(ord, ranges) && !((ord === 0x20 || ord === 0x09) && (i === len - 1 || buffer[i + 1] === 0x0a || buffer[i + 1] === 0x0d))) {\n result += String.fromCharCode(ord);\n continue;\n }\n result += '=' + (ord < 0x10 ? '0' : '') + ord.toString(16).toUpperCase();\n }\n\n return result;\n}\n\n/**\n * Adds soft line breaks to a Quoted-Printable string\n *\n * @param {String} str Quoted-Printable encoded string that might need line wrapping\n * @param {Number} [lineLength=76] Maximum allowed length for a line\n * @returns {String} Soft-wrapped Quoted-Printable encoded string\n */\nfunction wrap(str, lineLength) {\n str = (str || '').toString();\n lineLength = lineLength || 76;\n\n if (str.length <= lineLength) {\n return str;\n }\n\n let pos = 0;\n let len = str.length;\n let match, code, line;\n let lineMargin = Math.floor(lineLength / 3);\n let result = '';\n\n // insert soft linebreaks where needed\n while (pos < len) {\n line = str.substr(pos, lineLength);\n if ((match = line.match(/\\r\\n/))) {\n line = line.substr(0, match.index + match[0].length);\n result += line;\n pos += line.length;\n continue;\n }\n\n if (line.substr(-1) === '\\n') {\n // nothing to change here\n result += line;\n pos += line.length;\n continue;\n } else if ((match = line.substr(-lineMargin).match(/\\n.*?$/))) {\n // truncate to nearest line break\n line = line.substr(0, line.length - (match[0].length - 1));\n result += line;\n pos += line.length;\n continue;\n } else if (line.length > lineLength - lineMargin && (match = line.substr(-lineMargin).match(/[ \\t.,!?][^ \\t.,!?]*$/))) {\n // truncate to nearest space\n line = line.substr(0, line.length - (match[0].length - 1));\n } else if (line.match(/[=][\\da-f]{0,2}$/i)) {\n // push incomplete encoding sequences to the next line\n if ((match = line.match(/[=][\\da-f]{0,1}$/i))) {\n line = line.substr(0, line.length - match[0].length);\n }\n\n // ensure that utf-8 sequences are not split\n while (line.length > 3 && line.length < len - pos && !line.match(/^(?:=[\\da-f]{2}){1,4}$/i) && (match = line.match(/[=][\\da-f]{2}$/gi))) {\n code = parseInt(match[0].substr(1, 2), 16);\n if (code < 128) {\n break;\n }\n\n line = line.substr(0, line.length - 3);\n\n if (code >= 0xc0) {\n break;\n }\n }\n }\n\n if (pos + line.length < len && line.substr(-1) !== '\\n') {\n if (line.length === lineLength && line.match(/[=][\\da-f]{2}$/i)) {\n line = line.substr(0, line.length - 3);\n } else if (line.length === lineLength) {\n line = line.substr(0, line.length - 1);\n }\n pos += line.length;\n line += '=\\r\\n';\n } else {\n pos += line.length;\n }\n\n result += line;\n }\n\n return result;\n}\n\n/**\n * Helper function to check if a number is inside provided ranges\n *\n * @param {Number} nr Number to check for\n * @param {Array} ranges An Array of allowed values\n * @returns {Boolean} True if the value was found inside allowed ranges, false otherwise\n */\nfunction checkRanges(nr, ranges) {\n for (let i = ranges.length - 1; i >= 0; i--) {\n if (!ranges[i].length) {\n continue;\n }\n if (ranges[i].length === 1 && nr === ranges[i][0]) {\n return true;\n }\n if (ranges[i].length === 2 && nr >= ranges[i][0] && nr <= ranges[i][1]) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Creates a transform stream for encoding data to Quoted-Printable encoding\n *\n * @constructor\n * @param {Object} options Stream options\n * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping\n */\nclass Encoder extends Transform {\n constructor(options) {\n super();\n\n // init Transform\n this.options = options || {};\n\n if (this.options.lineLength !== false) {\n this.options.lineLength = this.options.lineLength || 76;\n }\n\n this._curLine = '';\n\n this.inputBytes = 0;\n this.outputBytes = 0;\n }\n\n _transform(chunk, encoding, done) {\n let qp;\n\n if (encoding !== 'buffer') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (!chunk || !chunk.length) {\n return done();\n }\n\n this.inputBytes += chunk.length;\n\n if (this.options.lineLength) {\n qp = this._curLine + encode(chunk);\n qp = wrap(qp, this.options.lineLength);\n qp = qp.replace(/(^|\\n)([^\\n]*)$/, (match, lineBreak, lastLine) => {\n this._curLine = lastLine;\n return lineBreak;\n });\n\n if (qp) {\n this.outputBytes += qp.length;\n this.push(qp);\n }\n } else {\n qp = encode(chunk);\n this.outputBytes += qp.length;\n this.push(qp, 'ascii');\n }\n\n done();\n }\n\n _flush(done) {\n if (this._curLine) {\n this.outputBytes += this._curLine.length;\n this.push(this._curLine, 'ascii');\n }\n done();\n }\n}\n\n// expose to the world\nmodule.exports = {\n encode,\n wrap,\n Encoder\n};\n","'use strict';\n\nconst spawn = require('child_process').spawn;\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\n\n/**\n * Generates a Transport object for Sendmail\n *\n * Possible options can be the following:\n *\n * * **path** optional path to sendmail binary\n * * **newline** either 'windows' or 'unix'\n * * **args** an array of arguments for the sendmail binary\n *\n * @constructor\n * @param {Object} optional config parameter for Sendmail\n */\nclass SendmailTransport {\n constructor(options) {\n options = options || {};\n\n // use a reference to spawn for mocking purposes\n this._spawn = spawn;\n\n this.options = options || {};\n\n this.name = 'Sendmail';\n this.version = packageData.version;\n\n this.path = 'sendmail';\n this.args = false;\n this.winbreak = false;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'sendmail'\n });\n\n if (options) {\n if (typeof options === 'string') {\n this.path = options;\n } else if (typeof options === 'object') {\n if (options.path) {\n this.path = options.path;\n }\n if (Array.isArray(options.args)) {\n this.args = options.args;\n }\n this.winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes((options.newline || '').toString().toLowerCase());\n }\n }\n }\n\n /**\n *

Compiles a mailcomposer message and forwards it to handler that sends it.

\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, done) {\n // Sendmail strips this header line by itself\n mail.message.keepBcc = true;\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n let args;\n let sendmail;\n let returned;\n\n const hasInvalidAddresses = []\n .concat(envelope.from || [])\n .concat(envelope.to || [])\n .some(addr => /^-/.test(addr));\n if (hasInvalidAddresses) {\n return done(new Error('Can not send mail. Invalid envelope addresses.'));\n }\n\n if (this.args) {\n // force -i to keep single dots\n args = ['-i'].concat(this.args).concat(envelope.to);\n } else {\n args = ['-i'].concat(envelope.from ? ['-f', envelope.from] : []).concat(envelope.to);\n }\n\n let callback = err => {\n if (returned) {\n // ignore any additional responses, already done\n return;\n }\n returned = true;\n if (typeof done === 'function') {\n if (err) {\n return done(err);\n } else {\n return done(null, {\n envelope: mail.data.envelope || mail.message.getEnvelope(),\n messageId,\n response: 'Messages queued for delivery'\n });\n }\n }\n };\n\n try {\n sendmail = this._spawn(this.path, args);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'spawn',\n messageId\n },\n 'Error occurred while spawning sendmail. %s',\n E.message\n );\n return callback(E);\n }\n\n if (sendmail) {\n sendmail.on('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'spawn',\n messageId\n },\n 'Error occurred when sending message %s. %s',\n messageId,\n err.message\n );\n callback(err);\n });\n\n sendmail.once('exit', code => {\n if (!code) {\n return callback();\n }\n let err;\n if (code === 127) {\n err = new Error('Sendmail command not found, process exited with code ' + code);\n } else {\n err = new Error('Sendmail exited with code ' + code);\n }\n\n this.logger.error(\n {\n err,\n tnx: 'stdin',\n messageId\n },\n 'Error sending message %s to sendmail. %s',\n messageId,\n err.message\n );\n callback(err);\n });\n sendmail.once('close', callback);\n\n sendmail.stdin.on('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'stdin',\n messageId\n },\n 'Error occurred when piping message %s to sendmail. %s',\n messageId,\n err.message\n );\n callback(err);\n });\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n let sourceStream = mail.message.createReadStream();\n sourceStream.once('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'stdin',\n messageId\n },\n 'Error occurred when generating message %s. %s',\n messageId,\n err.message\n );\n sendmail.kill('SIGINT'); // do not deliver the message\n callback(err);\n });\n\n sourceStream.pipe(sendmail.stdin);\n } else {\n return callback(new Error('sendmail was not found'));\n }\n }\n}\n\nmodule.exports = SendmailTransport;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\nconst LeWindows = require('../mime-node/le-windows');\n\n/**\n * Generates a Transport object for AWS SES\n *\n * Possible options can be the following:\n *\n * * **sendingRate** optional Number specifying how many messages per second should be delivered to SES\n * * **maxConnections** optional Number specifying max number of parallel connections to SES\n *\n * @constructor\n * @param {Object} optional config parameter\n */\nclass SESTransport extends EventEmitter {\n constructor(options) {\n super();\n options = options || {};\n\n this.options = options || {};\n this.ses = this.options.SES;\n\n this.name = 'SESTransport';\n this.version = packageData.version;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'ses-transport'\n });\n\n // parallel sending connections\n this.maxConnections = Number(this.options.maxConnections) || Infinity;\n this.connections = 0;\n\n // max messages per second\n this.sendingRate = Number(this.options.sendingRate) || Infinity;\n this.sendingRateTTL = null;\n this.rateInterval = 1000; // milliseconds\n this.rateMessages = [];\n\n this.pending = [];\n\n this.idling = true;\n\n setImmediate(() => {\n if (this.idling) {\n this.emit('idle');\n }\n });\n }\n\n /**\n * Schedules a sending of a message\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, callback) {\n if (this.connections >= this.maxConnections) {\n this.idling = false;\n return this.pending.push({\n mail,\n callback\n });\n }\n\n if (!this._checkSendingRate()) {\n this.idling = false;\n return this.pending.push({\n mail,\n callback\n });\n }\n\n this._send(mail, (...args) => {\n setImmediate(() => callback(...args));\n this._sent();\n });\n }\n\n _checkRatedQueue() {\n if (this.connections >= this.maxConnections || !this._checkSendingRate()) {\n return;\n }\n\n if (!this.pending.length) {\n if (!this.idling) {\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n\n let next = this.pending.shift();\n this._send(next.mail, (...args) => {\n setImmediate(() => next.callback(...args));\n this._sent();\n });\n }\n\n _checkSendingRate() {\n clearTimeout(this.sendingRateTTL);\n\n let now = Date.now();\n let oldest = false;\n // delete older messages\n for (let i = this.rateMessages.length - 1; i >= 0; i--) {\n if (this.rateMessages[i].ts >= now - this.rateInterval && (!oldest || this.rateMessages[i].ts < oldest)) {\n oldest = this.rateMessages[i].ts;\n }\n\n if (this.rateMessages[i].ts < now - this.rateInterval && !this.rateMessages[i].pending) {\n this.rateMessages.splice(i, 1);\n }\n }\n\n if (this.rateMessages.length < this.sendingRate) {\n return true;\n }\n\n let delay = Math.max(oldest + 1001, now + 20);\n this.sendingRateTTL = setTimeout(() => this._checkRatedQueue(), now - delay);\n\n try {\n this.sendingRateTTL.unref();\n } catch (E) {\n // Ignore. Happens on envs with non-node timer implementation\n }\n\n return false;\n }\n\n _sent() {\n this.connections--;\n this._checkRatedQueue();\n }\n\n /**\n * Returns true if there are free slots in the queue\n */\n isIdle() {\n return this.idling;\n }\n\n /**\n * Compiles a mailcomposer message and forwards it to SES\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n _send(mail, callback) {\n let statObject = {\n ts: Date.now(),\n pending: true\n };\n this.connections++;\n this.rateMessages.push(statObject);\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n let getRawMessage = next => {\n // do not use Message-ID and Date in DKIM signature\n if (!mail.data._dkim) {\n mail.data._dkim = {};\n }\n if (mail.data._dkim.skipFields && typeof mail.data._dkim.skipFields === 'string') {\n mail.data._dkim.skipFields += ':date:message-id';\n } else {\n mail.data._dkim.skipFields = 'date:message-id';\n }\n\n let sourceStream = mail.message.createReadStream();\n let stream = sourceStream.pipe(new LeWindows());\n let chunks = [];\n let chunklen = 0;\n\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n sourceStream.once('error', err => stream.emit('error', err));\n\n stream.once('error', err => {\n next(err);\n });\n\n stream.once('end', () => next(null, Buffer.concat(chunks, chunklen)));\n };\n\n setImmediate(() =>\n getRawMessage((err, raw) => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed creating message for %s. %s',\n messageId,\n err.message\n );\n statObject.pending = false;\n return callback(err);\n }\n\n let sesMessage = {\n RawMessage: {\n // required\n Data: raw // required\n },\n Source: envelope.from,\n Destinations: envelope.to\n };\n\n Object.keys(mail.data.ses || {}).forEach(key => {\n sesMessage[key] = mail.data.ses[key];\n });\n\n let ses = (this.ses.aws ? this.ses.ses : this.ses) || {};\n let aws = this.ses.aws || {};\n\n let getRegion = cb => {\n if (ses.config && typeof ses.config.region === 'function') {\n // promise\n return ses.config\n .region()\n .then(region => cb(null, region))\n .catch(err => cb(err));\n }\n return cb(null, (ses.config && ses.config.region) || 'us-east-1');\n };\n\n getRegion((err, region) => {\n if (err || !region) {\n region = 'us-east-1';\n }\n\n let sendPromise;\n if (typeof ses.send === 'function' && aws.SendRawEmailCommand) {\n // v3 API\n sendPromise = ses.send(new aws.SendRawEmailCommand(sesMessage));\n } else {\n // v2 API\n sendPromise = ses.sendRawEmail(sesMessage).promise();\n }\n\n sendPromise\n .then(data => {\n if (region === 'us-east-1') {\n region = 'email';\n }\n\n statObject.pending = false;\n callback(null, {\n envelope: {\n from: envelope.from,\n to: envelope.to\n },\n messageId: '<' + data.MessageId + (!/@/.test(data.MessageId) ? '@' + region + '.amazonses.com' : '') + '>',\n response: data.MessageId,\n raw\n });\n })\n .catch(err => {\n this.logger.error(\n {\n err,\n tnx: 'send'\n },\n 'Send error for %s: %s',\n messageId,\n err.message\n );\n statObject.pending = false;\n callback(err);\n });\n });\n })\n );\n }\n\n /**\n * Verifies SES configuration\n *\n * @param {Function} callback Callback function\n */\n verify(callback) {\n let promise;\n let ses = (this.ses.aws ? this.ses.ses : this.ses) || {};\n let aws = this.ses.aws || {};\n\n const sesMessage = {\n RawMessage: {\n // required\n Data: 'From: invalid@invalid\\r\\nTo: invalid@invalid\\r\\n Subject: Invalid\\r\\n\\r\\nInvalid'\n },\n Source: 'invalid@invalid',\n Destinations: ['invalid@invalid']\n };\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n const cb = err => {\n if (err && (err.code || err.Code) !== 'InvalidParameterValue') {\n return callback(err);\n }\n return callback(null, true);\n };\n\n if (typeof ses.send === 'function' && aws.SendRawEmailCommand) {\n // v3 API\n sesMessage.RawMessage.Data = Buffer.from(sesMessage.RawMessage.Data);\n ses.send(new aws.SendRawEmailCommand(sesMessage), cb);\n } else {\n // v2 API\n ses.sendRawEmail(sesMessage, cb);\n }\n\n return promise;\n }\n}\n\nmodule.exports = SESTransport;\n","/* eslint no-console: 0 */\n\n'use strict';\n\nconst urllib = require('url');\nconst util = require('util');\nconst fs = require('fs');\nconst nmfetch = require('../fetch');\nconst dns = require('dns');\nconst net = require('net');\nconst os = require('os');\n\nconst DNS_TTL = 5 * 60 * 1000;\n\nlet networkInterfaces;\ntry {\n networkInterfaces = os.networkInterfaces();\n} catch (err) {\n // fails on some systems\n}\n\nmodule.exports.networkInterfaces = networkInterfaces;\n\nconst isFamilySupported = (family, allowInternal) => {\n let networkInterfaces = module.exports.networkInterfaces;\n if (!networkInterfaces) {\n // hope for the best\n return true;\n }\n\n const familySupported =\n // crux that replaces Object.values(networkInterfaces) as Object.values is not supported in nodejs v6\n Object.keys(networkInterfaces)\n .map(key => networkInterfaces[key])\n // crux that replaces .flat() as it is not supported in older Node versions (v10 and older)\n .reduce((acc, val) => acc.concat(val), [])\n .filter(i => !i.internal || allowInternal)\n .filter(i => i.family === 'IPv' + family || i.family === family).length > 0;\n\n return familySupported;\n};\n\nconst resolver = (family, hostname, options, callback) => {\n options = options || {};\n const familySupported = isFamilySupported(family, options.allowInternalNetworkInterfaces);\n\n if (!familySupported) {\n return callback(null, []);\n }\n\n const resolver = dns.Resolver ? new dns.Resolver(options) : dns;\n resolver['resolve' + family](hostname, (err, addresses) => {\n if (err) {\n switch (err.code) {\n case dns.NODATA:\n case dns.NOTFOUND:\n case dns.NOTIMP:\n case dns.SERVFAIL:\n case dns.CONNREFUSED:\n case dns.REFUSED:\n case 'EAI_AGAIN':\n return callback(null, []);\n }\n return callback(err);\n }\n return callback(null, Array.isArray(addresses) ? addresses : [].concat(addresses || []));\n });\n};\n\nconst dnsCache = (module.exports.dnsCache = new Map());\n\nconst formatDNSValue = (value, extra) => {\n if (!value) {\n return Object.assign({}, extra || {});\n }\n\n return Object.assign(\n {\n servername: value.servername,\n host:\n !value.addresses || !value.addresses.length\n ? null\n : value.addresses.length === 1\n ? value.addresses[0]\n : value.addresses[Math.floor(Math.random() * value.addresses.length)]\n },\n extra || {}\n );\n};\n\nmodule.exports.resolveHostname = (options, callback) => {\n options = options || {};\n\n if (!options.host && options.servername) {\n options.host = options.servername;\n }\n\n if (!options.host || net.isIP(options.host)) {\n // nothing to do here\n let value = {\n addresses: [options.host],\n servername: options.servername || false\n };\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n }\n\n let cached;\n if (dnsCache.has(options.host)) {\n cached = dnsCache.get(options.host);\n\n if (!cached.expires || cached.expires >= Date.now()) {\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true\n })\n );\n }\n }\n\n resolver(4, options.host, options, (err, addresses) => {\n if (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n\n if (addresses && addresses.length) {\n let value = {\n addresses,\n servername: options.servername || options.host\n };\n\n dnsCache.set(options.host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n }\n\n resolver(6, options.host, options, (err, addresses) => {\n if (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n\n if (addresses && addresses.length) {\n let value = {\n addresses,\n servername: options.servername || options.host\n };\n\n dnsCache.set(options.host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n }\n\n try {\n dns.lookup(options.host, { all: true }, (err, addresses) => {\n if (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n\n let address = addresses\n ? addresses\n .filter(addr => isFamilySupported(addr.family))\n .map(addr => addr.address)\n .shift()\n : false;\n\n if (addresses && addresses.length && !address) {\n // there are addresses but none can be used\n console.warn(`Failed to resolve IPv${addresses[0].family} addresses with current network`);\n }\n\n if (!address && cached) {\n // nothing was found, fallback to cached value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true\n })\n );\n }\n\n let value = {\n addresses: address ? [address] : [options.host],\n servername: options.servername || options.host\n };\n\n dnsCache.set(options.host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n });\n } catch (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n });\n });\n};\n/**\n * Parses connection url to a structured configuration object\n *\n * @param {String} str Connection url\n * @return {Object} Configuration object\n */\nmodule.exports.parseConnectionUrl = str => {\n str = str || '';\n let options = {};\n\n [urllib.parse(str, true)].forEach(url => {\n let auth;\n\n switch (url.protocol) {\n case 'smtp:':\n options.secure = false;\n break;\n case 'smtps:':\n options.secure = true;\n break;\n case 'direct:':\n options.direct = true;\n break;\n }\n\n if (!isNaN(url.port) && Number(url.port)) {\n options.port = Number(url.port);\n }\n\n if (url.hostname) {\n options.host = url.hostname;\n }\n\n if (url.auth) {\n auth = url.auth.split(':');\n\n if (!options.auth) {\n options.auth = {};\n }\n\n options.auth.user = auth.shift();\n options.auth.pass = auth.join(':');\n }\n\n Object.keys(url.query || {}).forEach(key => {\n let obj = options;\n let lKey = key;\n let value = url.query[key];\n\n if (!isNaN(value)) {\n value = Number(value);\n }\n\n switch (value) {\n case 'true':\n value = true;\n break;\n case 'false':\n value = false;\n break;\n }\n\n // tls is nested object\n if (key.indexOf('tls.') === 0) {\n lKey = key.substr(4);\n if (!options.tls) {\n options.tls = {};\n }\n obj = options.tls;\n } else if (key.indexOf('.') >= 0) {\n // ignore nested properties besides tls\n return;\n }\n\n if (!(lKey in obj)) {\n obj[lKey] = value;\n }\n });\n });\n\n return options;\n};\n\nmodule.exports._logFunc = (logger, level, defaults, data, message, ...args) => {\n let entry = {};\n\n Object.keys(defaults || {}).forEach(key => {\n if (key !== 'level') {\n entry[key] = defaults[key];\n }\n });\n\n Object.keys(data || {}).forEach(key => {\n if (key !== 'level') {\n entry[key] = data[key];\n }\n });\n\n logger[level](entry, message, ...args);\n};\n\n/**\n * Returns a bunyan-compatible logger interface. Uses either provided logger or\n * creates a default console logger\n *\n * @param {Object} [options] Options object that might include 'logger' value\n * @return {Object} bunyan compatible logger\n */\nmodule.exports.getLogger = (options, defaults) => {\n options = options || {};\n\n let response = {};\n let levels = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];\n\n if (!options.logger) {\n // use vanity logger\n levels.forEach(level => {\n response[level] = () => false;\n });\n return response;\n }\n\n let logger = options.logger;\n\n if (options.logger === true) {\n // create console logger\n logger = createDefaultLogger(levels);\n }\n\n levels.forEach(level => {\n response[level] = (data, message, ...args) => {\n module.exports._logFunc(logger, level, defaults, data, message, ...args);\n };\n });\n\n return response;\n};\n\n/**\n * Wrapper for creating a callback that either resolves or rejects a promise\n * based on input\n *\n * @param {Function} resolve Function to run if callback is called\n * @param {Function} reject Function to run if callback ends with an error\n */\nmodule.exports.callbackPromise = (resolve, reject) =>\n function () {\n let args = Array.from(arguments);\n let err = args.shift();\n if (err) {\n reject(err);\n } else {\n resolve(...args);\n }\n };\n\nmodule.exports.parseDataURI = uri => {\n let input = uri;\n let commaPos = input.indexOf(',');\n if (!commaPos) {\n return uri;\n }\n\n let data = input.substring(commaPos + 1);\n let metaStr = input.substring('data:'.length, commaPos);\n\n let encoding;\n\n let metaEntries = metaStr.split(';');\n let lastMetaEntry = metaEntries.length > 1 ? metaEntries[metaEntries.length - 1] : false;\n if (lastMetaEntry && lastMetaEntry.indexOf('=') < 0) {\n encoding = lastMetaEntry.toLowerCase();\n metaEntries.pop();\n }\n\n let contentType = metaEntries.shift() || 'application/octet-stream';\n let params = {};\n for (let entry of metaEntries) {\n let sep = entry.indexOf('=');\n if (sep >= 0) {\n let key = entry.substring(0, sep);\n let value = entry.substring(sep + 1);\n params[key] = value;\n }\n }\n\n switch (encoding) {\n case 'base64':\n data = Buffer.from(data, 'base64');\n break;\n case 'utf8':\n data = Buffer.from(data);\n break;\n default:\n try {\n data = Buffer.from(decodeURIComponent(data));\n } catch (err) {\n data = Buffer.from(data);\n }\n data = Buffer.from(data);\n }\n\n return { data, encoding, contentType, params };\n};\n\n/**\n * Resolves a String or a Buffer value for content value. Useful if the value\n * is a Stream or a file or an URL. If the value is a Stream, overwrites\n * the stream object with the resolved value (you can't stream a value twice).\n *\n * This is useful when you want to create a plugin that needs a content value,\n * for example the `html` or `text` value as a String or a Buffer but not as\n * a file path or an URL.\n *\n * @param {Object} data An object or an Array you want to resolve an element for\n * @param {String|Number} key Property name or an Array index\n * @param {Function} callback Callback function with (err, value)\n */\nmodule.exports.resolveContent = (data, key, callback) => {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = module.exports.callbackPromise(resolve, reject);\n });\n }\n\n let content = (data && data[key] && data[key].content) || data[key];\n let contentStream;\n let encoding = ((typeof data[key] === 'object' && data[key].encoding) || 'utf8')\n .toString()\n .toLowerCase()\n .replace(/[-_\\s]/g, '');\n\n if (!content) {\n return callback(null, content);\n }\n\n if (typeof content === 'object') {\n if (typeof content.pipe === 'function') {\n return resolveStream(content, (err, value) => {\n if (err) {\n return callback(err);\n }\n // we can't stream twice the same content, so we need\n // to replace the stream object with the streaming result\n if (data[key].content) {\n data[key].content = value;\n } else {\n data[key] = value;\n }\n callback(null, value);\n });\n } else if (/^https?:\\/\\//i.test(content.path || content.href)) {\n contentStream = nmfetch(content.path || content.href);\n return resolveStream(contentStream, callback);\n } else if (/^data:/i.test(content.path || content.href)) {\n let parsedDataUri = module.exports.parseDataURI(content.path || content.href);\n\n if (!parsedDataUri || !parsedDataUri.data) {\n return callback(null, Buffer.from(0));\n }\n return callback(null, parsedDataUri.data);\n } else if (content.path) {\n return resolveStream(fs.createReadStream(content.path), callback);\n }\n }\n\n if (typeof data[key].content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {\n content = Buffer.from(data[key].content, encoding);\n }\n\n // default action, return as is\n setImmediate(() => callback(null, content));\n\n return promise;\n};\n\n/**\n * Copies properties from source objects to target objects\n */\nmodule.exports.assign = function (/* target, ... sources */) {\n let args = Array.from(arguments);\n let target = args.shift() || {};\n\n args.forEach(source => {\n Object.keys(source || {}).forEach(key => {\n if (['tls', 'auth'].includes(key) && source[key] && typeof source[key] === 'object') {\n // tls and auth are special keys that need to be enumerated separately\n // other objects are passed as is\n if (!target[key]) {\n // ensure that target has this key\n target[key] = {};\n }\n Object.keys(source[key]).forEach(subKey => {\n target[key][subKey] = source[key][subKey];\n });\n } else {\n target[key] = source[key];\n }\n });\n });\n return target;\n};\n\nmodule.exports.encodeXText = str => {\n // ! 0x21\n // + 0x2B\n // = 0x3D\n // ~ 0x7E\n if (!/[^\\x21-\\x2A\\x2C-\\x3C\\x3E-\\x7E]/.test(str)) {\n return str;\n }\n let buf = Buffer.from(str);\n let result = '';\n for (let i = 0, len = buf.length; i < len; i++) {\n let c = buf[i];\n if (c < 0x21 || c > 0x7e || c === 0x2b || c === 0x3d) {\n result += '+' + (c < 0x10 ? '0' : '') + c.toString(16).toUpperCase();\n } else {\n result += String.fromCharCode(c);\n }\n }\n return result;\n};\n\n/**\n * Streams a stream value into a Buffer\n *\n * @param {Object} stream Readable stream\n * @param {Function} callback Callback function with (err, value)\n */\nfunction resolveStream(stream, callback) {\n let responded = false;\n let chunks = [];\n let chunklen = 0;\n\n stream.on('error', err => {\n if (responded) {\n return;\n }\n\n responded = true;\n callback(err);\n });\n\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n stream.on('end', () => {\n if (responded) {\n return;\n }\n responded = true;\n\n let value;\n\n try {\n value = Buffer.concat(chunks, chunklen);\n } catch (E) {\n return callback(E);\n }\n callback(null, value);\n });\n}\n\n/**\n * Generates a bunyan-like logger that prints to console\n *\n * @returns {Object} Bunyan logger instance\n */\nfunction createDefaultLogger(levels) {\n let levelMaxLen = 0;\n let levelNames = new Map();\n levels.forEach(level => {\n if (level.length > levelMaxLen) {\n levelMaxLen = level.length;\n }\n });\n\n levels.forEach(level => {\n let levelName = level.toUpperCase();\n if (levelName.length < levelMaxLen) {\n levelName += ' '.repeat(levelMaxLen - levelName.length);\n }\n levelNames.set(level, levelName);\n });\n\n let print = (level, entry, message, ...args) => {\n let prefix = '';\n if (entry) {\n if (entry.tnx === 'server') {\n prefix = 'S: ';\n } else if (entry.tnx === 'client') {\n prefix = 'C: ';\n }\n\n if (entry.sid) {\n prefix = '[' + entry.sid + '] ' + prefix;\n }\n\n if (entry.cid) {\n prefix = '[#' + entry.cid + '] ' + prefix;\n }\n }\n\n message = util.format(message, ...args);\n message.split(/\\r?\\n/).forEach(line => {\n console.log('[%s] %s %s', new Date().toISOString().substr(0, 19).replace(/T/, ' '), levelNames.get(level), prefix + line);\n });\n };\n\n let logger = {};\n levels.forEach(level => {\n logger[level] = print.bind(null, level);\n });\n\n return logger;\n}\n","'use strict';\n\nconst stream = require('stream');\nconst Transform = stream.Transform;\n\n/**\n * Escapes dots in the beginning of lines. Ends the stream with .\n * Also makes sure that only sequences are used for linebreaks\n *\n * @param {Object} options Stream options\n */\nclass DataStream extends Transform {\n constructor(options) {\n super(options);\n // init Transform\n this.options = options || {};\n this._curLine = '';\n\n this.inByteCount = 0;\n this.outByteCount = 0;\n this.lastByte = false;\n }\n\n /**\n * Escapes dots\n */\n _transform(chunk, encoding, done) {\n let chunks = [];\n let chunklen = 0;\n let i,\n len,\n lastPos = 0;\n let buf;\n\n if (!chunk || !chunk.length) {\n return done();\n }\n\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk);\n }\n\n this.inByteCount += chunk.length;\n\n for (i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x2e) {\n // .\n if ((i && chunk[i - 1] === 0x0a) || (!i && (!this.lastByte || this.lastByte === 0x0a))) {\n buf = chunk.slice(lastPos, i + 1);\n chunks.push(buf);\n chunks.push(Buffer.from('.'));\n chunklen += buf.length + 1;\n lastPos = i + 1;\n }\n } else if (chunk[i] === 0x0a) {\n // .\n if ((i && chunk[i - 1] !== 0x0d) || (!i && this.lastByte !== 0x0d)) {\n if (i > lastPos) {\n buf = chunk.slice(lastPos, i);\n chunks.push(buf);\n chunklen += buf.length + 2;\n } else {\n chunklen += 2;\n }\n chunks.push(Buffer.from('\\r\\n'));\n lastPos = i + 1;\n }\n }\n }\n\n if (chunklen) {\n // add last piece\n if (lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n chunks.push(buf);\n chunklen += buf.length;\n }\n\n this.outByteCount += chunklen;\n this.push(Buffer.concat(chunks, chunklen));\n } else {\n this.outByteCount += chunk.length;\n this.push(chunk);\n }\n\n this.lastByte = chunk[chunk.length - 1];\n done();\n }\n\n /**\n * Finalizes the stream with a dot on a single line\n */\n _flush(done) {\n let buf;\n if (this.lastByte === 0x0a) {\n buf = Buffer.from('.\\r\\n');\n } else if (this.lastByte === 0x0d) {\n buf = Buffer.from('\\n.\\r\\n');\n } else {\n buf = Buffer.from('\\r\\n.\\r\\n');\n }\n this.outByteCount += buf.length;\n this.push(buf);\n done();\n }\n}\n\nmodule.exports = DataStream;\n","'use strict';\n\n/**\n * Minimal HTTP/S proxy client\n */\n\nconst net = require('net');\nconst tls = require('tls');\nconst urllib = require('url');\n\n/**\n * Establishes proxied connection to destinationPort\n *\n * httpProxyClient(\"http://localhost:3128/\", 80, \"google.com\", function(err, socket){\n * socket.write(\"GET / HTTP/1.0\\r\\n\\r\\n\");\n * });\n *\n * @param {String} proxyUrl proxy configuration, etg \"http://proxy.host:3128/\"\n * @param {Number} destinationPort Port to open in destination host\n * @param {String} destinationHost Destination hostname\n * @param {Function} callback Callback to run with the rocket object once connection is established\n */\nfunction httpProxyClient(proxyUrl, destinationPort, destinationHost, callback) {\n let proxy = urllib.parse(proxyUrl);\n\n // create a socket connection to the proxy server\n let options;\n let connect;\n let socket;\n\n options = {\n host: proxy.hostname,\n port: Number(proxy.port) ? Number(proxy.port) : proxy.protocol === 'https:' ? 443 : 80\n };\n\n if (proxy.protocol === 'https:') {\n // we can use untrusted proxies as long as we verify actual SMTP certificates\n options.rejectUnauthorized = false;\n connect = tls.connect.bind(tls);\n } else {\n connect = net.connect.bind(net);\n }\n\n // Error harness for initial connection. Once connection is established, the responsibility\n // to handle errors is passed to whoever uses this socket\n let finished = false;\n let tempSocketErr = err => {\n if (finished) {\n return;\n }\n finished = true;\n try {\n socket.destroy();\n } catch (E) {\n // ignore\n }\n callback(err);\n };\n\n let timeoutErr = () => {\n let err = new Error('Proxy socket timed out');\n err.code = 'ETIMEDOUT';\n tempSocketErr(err);\n };\n\n socket = connect(options, () => {\n if (finished) {\n return;\n }\n\n let reqHeaders = {\n Host: destinationHost + ':' + destinationPort,\n Connection: 'close'\n };\n if (proxy.auth) {\n reqHeaders['Proxy-Authorization'] = 'Basic ' + Buffer.from(proxy.auth).toString('base64');\n }\n\n socket.write(\n // HTTP method\n 'CONNECT ' +\n destinationHost +\n ':' +\n destinationPort +\n ' HTTP/1.1\\r\\n' +\n // HTTP request headers\n Object.keys(reqHeaders)\n .map(key => key + ': ' + reqHeaders[key])\n .join('\\r\\n') +\n // End request\n '\\r\\n\\r\\n'\n );\n\n let headers = '';\n let onSocketData = chunk => {\n let match;\n let remainder;\n\n if (finished) {\n return;\n }\n\n headers += chunk.toString('binary');\n if ((match = headers.match(/\\r\\n\\r\\n/))) {\n socket.removeListener('data', onSocketData);\n\n remainder = headers.substr(match.index + match[0].length);\n headers = headers.substr(0, match.index);\n if (remainder) {\n socket.unshift(Buffer.from(remainder, 'binary'));\n }\n\n // proxy connection is now established\n finished = true;\n\n // check response code\n match = headers.match(/^HTTP\\/\\d+\\.\\d+ (\\d+)/i);\n if (!match || (match[1] || '').charAt(0) !== '2') {\n try {\n socket.destroy();\n } catch (E) {\n // ignore\n }\n return callback(new Error('Invalid response from proxy' + ((match && ': ' + match[1]) || '')));\n }\n\n socket.removeListener('error', tempSocketErr);\n socket.removeListener('timeout', timeoutErr);\n socket.setTimeout(0);\n\n return callback(null, socket);\n }\n };\n socket.on('data', onSocketData);\n });\n\n socket.setTimeout(httpProxyClient.timeout || 30 * 1000);\n socket.on('timeout', timeoutErr);\n\n socket.once('error', tempSocketErr);\n}\n\nmodule.exports = httpProxyClient;\n","'use strict';\n\nconst packageInfo = require('../../package.json');\nconst EventEmitter = require('events').EventEmitter;\nconst net = require('net');\nconst tls = require('tls');\nconst os = require('os');\nconst crypto = require('crypto');\nconst DataStream = require('./data-stream');\nconst PassThrough = require('stream').PassThrough;\nconst shared = require('../shared');\n\n// default timeout values in ms\nconst CONNECTION_TIMEOUT = 2 * 60 * 1000; // how much to wait for the connection to be established\nconst SOCKET_TIMEOUT = 10 * 60 * 1000; // how much to wait for socket inactivity before disconnecting the client\nconst GREETING_TIMEOUT = 30 * 1000; // how much to wait after connection is established but SMTP greeting is not receieved\nconst DNS_TIMEOUT = 30 * 1000; // how much to wait for resolveHostname\n\n/**\n * Generates a SMTP connection object\n *\n * Optional options object takes the following possible properties:\n *\n * * **port** - is the port to connect to (defaults to 587 or 465)\n * * **host** - is the hostname or IP address to connect to (defaults to 'localhost')\n * * **secure** - use SSL\n * * **ignoreTLS** - ignore server support for STARTTLS\n * * **requireTLS** - forces the client to use STARTTLS\n * * **name** - the name of the client server\n * * **localAddress** - outbound address to bind to (see: http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener)\n * * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 10000)\n * * **connectionTimeout** - how many milliseconds to wait for the connection to establish\n * * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 1 hour)\n * * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)\n * * **lmtp** - if true, uses LMTP instead of SMTP protocol\n * * **logger** - bunyan compatible logger interface\n * * **debug** - if true pass SMTP traffic to the logger\n * * **tls** - options for createCredentials\n * * **socket** - existing socket to use instead of creating a new one (see: http://nodejs.org/api/net.html#net_class_net_socket)\n * * **secured** - boolean indicates that the provided socket has already been upgraded to tls\n *\n * @constructor\n * @namespace SMTP Client module\n * @param {Object} [options] Option properties\n */\nclass SMTPConnection extends EventEmitter {\n constructor(options) {\n super(options);\n\n this.id = crypto.randomBytes(8).toString('base64').replace(/\\W/g, '');\n this.stage = 'init';\n\n this.options = options || {};\n\n this.secureConnection = !!this.options.secure;\n this.alreadySecured = !!this.options.secured;\n\n this.port = Number(this.options.port) || (this.secureConnection ? 465 : 587);\n this.host = this.options.host || 'localhost';\n\n this.allowInternalNetworkInterfaces = this.options.allowInternalNetworkInterfaces || false;\n\n if (typeof this.options.secure === 'undefined' && this.port === 465) {\n // if secure option is not set but port is 465, then default to secure\n this.secureConnection = true;\n }\n\n this.name = this.options.name || this._getHostname();\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-connection',\n sid: this.id\n });\n\n this.customAuth = new Map();\n Object.keys(this.options.customAuth || {}).forEach(key => {\n let mapKey = (key || '').toString().trim().toUpperCase();\n if (!mapKey) {\n return;\n }\n this.customAuth.set(mapKey, this.options.customAuth[key]);\n });\n\n /**\n * Expose version nr, just for the reference\n * @type {String}\n */\n this.version = packageInfo.version;\n\n /**\n * If true, then the user is authenticated\n * @type {Boolean}\n */\n this.authenticated = false;\n\n /**\n * If set to true, this instance is no longer active\n * @private\n */\n this.destroyed = false;\n\n /**\n * Defines if the current connection is secure or not. If not,\n * STARTTLS can be used if available\n * @private\n */\n this.secure = !!this.secureConnection;\n\n /**\n * Store incomplete messages coming from the server\n * @private\n */\n this._remainder = '';\n\n /**\n * Unprocessed responses from the server\n * @type {Array}\n */\n this._responseQueue = [];\n\n this.lastServerResponse = false;\n\n /**\n * The socket connecting to the server\n * @publick\n */\n this._socket = false;\n\n /**\n * Lists supported auth mechanisms\n * @private\n */\n this._supportedAuth = [];\n\n /**\n * Set to true, if EHLO response includes \"AUTH\".\n * If false then authentication is not tried\n */\n this.allowsAuth = false;\n\n /**\n * Includes current envelope (from, to)\n * @private\n */\n this._envelope = false;\n\n /**\n * Lists supported extensions\n * @private\n */\n this._supportedExtensions = [];\n\n /**\n * Defines the maximum allowed size for a single message\n * @private\n */\n this._maxAllowedSize = 0;\n\n /**\n * Function queue to run if a data chunk comes from the server\n * @private\n */\n this._responseActions = [];\n this._recipientQueue = [];\n\n /**\n * Timeout variable for waiting the greeting\n * @private\n */\n this._greetingTimeout = false;\n\n /**\n * Timeout variable for waiting the connection to start\n * @private\n */\n this._connectionTimeout = false;\n\n /**\n * If the socket is deemed already closed\n * @private\n */\n this._destroyed = false;\n\n /**\n * If the socket is already being closed\n * @private\n */\n this._closing = false;\n\n /**\n * Callbacks for socket's listeners\n */\n this._onSocketData = chunk => this._onData(chunk);\n this._onSocketError = error => this._onError(error, 'ESOCKET', false, 'CONN');\n this._onSocketClose = () => this._onClose();\n this._onSocketEnd = () => this._onEnd();\n this._onSocketTimeout = () => this._onTimeout();\n }\n\n /**\n * Creates a connection to a SMTP server and sets up connection\n * listener\n */\n connect(connectCallback) {\n if (typeof connectCallback === 'function') {\n this.once('connect', () => {\n this.logger.debug(\n {\n tnx: 'smtp'\n },\n 'SMTP handshake finished'\n );\n connectCallback();\n });\n\n const isDestroyedMessage = this._isDestroyedMessage('connect');\n if (isDestroyedMessage) {\n return connectCallback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'CONN'));\n }\n }\n\n let opts = {\n port: this.port,\n host: this.host,\n allowInternalNetworkInterfaces: this.allowInternalNetworkInterfaces,\n timeout: this.options.dnsTimeout || DNS_TIMEOUT\n };\n\n if (this.options.localAddress) {\n opts.localAddress = this.options.localAddress;\n }\n\n let setupConnectionHandlers = () => {\n this._connectionTimeout = setTimeout(() => {\n this._onError('Connection timeout', 'ETIMEDOUT', false, 'CONN');\n }, this.options.connectionTimeout || CONNECTION_TIMEOUT);\n\n this._socket.on('error', this._onSocketError);\n };\n\n if (this.options.connection) {\n // connection is already opened\n this._socket = this.options.connection;\n if (this.secureConnection && !this.alreadySecured) {\n setImmediate(() =>\n this._upgradeConnection(err => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');\n return;\n }\n this._onConnect();\n })\n );\n } else {\n setImmediate(() => this._onConnect());\n }\n return;\n } else if (this.options.socket) {\n // socket object is set up but not yet connected\n this._socket = this.options.socket;\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket.connect(this.port, this.host, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else if (this.secureConnection) {\n // connect using tls\n if (this.options.tls) {\n Object.keys(this.options.tls).forEach(key => {\n opts[key] = this.options.tls[key];\n });\n }\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = tls.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else {\n // connect using plaintext\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = net.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n }\n }\n\n /**\n * Sends QUIT\n */\n quit() {\n this._sendCommand('QUIT');\n this._responseActions.push(this.close);\n }\n\n /**\n * Closes the connection to the server\n */\n close() {\n clearTimeout(this._connectionTimeout);\n clearTimeout(this._greetingTimeout);\n this._responseActions = [];\n\n // allow to run this function only once\n if (this._closing) {\n return;\n }\n this._closing = true;\n\n let closeMethod = 'end';\n\n if (this.stage === 'init') {\n // Close the socket immediately when connection timed out\n closeMethod = 'destroy';\n }\n\n this.logger.debug(\n {\n tnx: 'smtp'\n },\n 'Closing connection to the server using \"%s\"',\n closeMethod\n );\n\n let socket = (this._socket && this._socket.socket) || this._socket;\n\n if (socket && !socket.destroyed) {\n try {\n this._socket[closeMethod]();\n } catch (E) {\n // just ignore\n }\n }\n\n this._destroy();\n }\n\n /**\n * Authenticate user\n */\n login(authData, callback) {\n const isDestroyedMessage = this._isDestroyedMessage('login');\n if (isDestroyedMessage) {\n return callback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));\n }\n\n this._auth = authData || {};\n // Select SASL authentication method\n this._authMethod = (this._auth.method || '').toString().trim().toUpperCase() || false;\n\n if (!this._authMethod && this._auth.oauth2 && !this._auth.credentials) {\n this._authMethod = 'XOAUTH2';\n } else if (!this._authMethod || (this._authMethod === 'XOAUTH2' && !this._auth.oauth2)) {\n // use first supported\n this._authMethod = (this._supportedAuth[0] || 'PLAIN').toUpperCase().trim();\n }\n\n if (this._authMethod !== 'XOAUTH2' && (!this._auth.credentials || !this._auth.credentials.user || !this._auth.credentials.pass)) {\n if ((this._auth.user && this._auth.pass) || this.customAuth.has(this._authMethod)) {\n this._auth.credentials = {\n user: this._auth.user,\n pass: this._auth.pass,\n options: this._auth.options\n };\n } else {\n return callback(this._formatError('Missing credentials for \"' + this._authMethod + '\"', 'EAUTH', false, 'API'));\n }\n }\n\n if (this.customAuth.has(this._authMethod)) {\n let handler = this.customAuth.get(this._authMethod);\n let lastResponse;\n let returned = false;\n\n let resolve = () => {\n if (returned) {\n return;\n }\n returned = true;\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n },\n 'User %s authenticated',\n JSON.stringify(this._auth.user)\n );\n this.authenticated = true;\n callback(null, true);\n };\n\n let reject = err => {\n if (returned) {\n return;\n }\n returned = true;\n callback(this._formatError(err, 'EAUTH', lastResponse, 'AUTH ' + this._authMethod));\n };\n\n let handlerResponse = handler({\n auth: this._auth,\n method: this._authMethod,\n\n extensions: [].concat(this._supportedExtensions),\n authMethods: [].concat(this._supportedAuth),\n maxAllowedSize: this._maxAllowedSize || false,\n\n sendCommand: (cmd, done) => {\n let promise;\n\n if (!done) {\n promise = new Promise((resolve, reject) => {\n done = shared.callbackPromise(resolve, reject);\n });\n }\n\n this._responseActions.push(str => {\n lastResponse = str;\n\n let codes = str.match(/^(\\d+)(?:\\s(\\d+\\.\\d+\\.\\d+))?\\s/);\n let data = {\n command: cmd,\n response: str\n };\n if (codes) {\n data.status = Number(codes[1]) || 0;\n if (codes[2]) {\n data.code = codes[2];\n }\n data.text = str.substr(codes[0].length);\n } else {\n data.text = str;\n data.status = 0; // just in case we need to perform numeric comparisons\n }\n done(null, data);\n });\n setImmediate(() => this._sendCommand(cmd));\n\n return promise;\n },\n\n resolve,\n reject\n });\n\n if (handlerResponse && typeof handlerResponse.catch === 'function') {\n // a promise was returned\n handlerResponse.then(resolve).catch(reject);\n }\n\n return;\n }\n\n switch (this._authMethod) {\n case 'XOAUTH2':\n this._handleXOauth2Token(false, callback);\n return;\n case 'LOGIN':\n this._responseActions.push(str => {\n this._actionAUTH_LOGIN_USER(str, callback);\n });\n this._sendCommand('AUTH LOGIN');\n return;\n case 'PLAIN':\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, callback);\n });\n this._sendCommand(\n 'AUTH PLAIN ' +\n Buffer.from(\n //this._auth.user+'\\u0000'+\n '\\u0000' + // skip authorization identity as it causes problems with some servers\n this._auth.credentials.user +\n '\\u0000' +\n this._auth.credentials.pass,\n 'utf-8'\n ).toString('base64'),\n // log entry without passwords\n 'AUTH PLAIN ' +\n Buffer.from(\n //this._auth.user+'\\u0000'+\n '\\u0000' + // skip authorization identity as it causes problems with some servers\n this._auth.credentials.user +\n '\\u0000' +\n '/* secret */',\n 'utf-8'\n ).toString('base64')\n );\n return;\n case 'CRAM-MD5':\n this._responseActions.push(str => {\n this._actionAUTH_CRAM_MD5(str, callback);\n });\n this._sendCommand('AUTH CRAM-MD5');\n return;\n }\n\n return callback(this._formatError('Unknown authentication method \"' + this._authMethod + '\"', 'EAUTH', false, 'API'));\n }\n\n /**\n * Sends a message\n *\n * @param {Object} envelope Envelope object, {from: addr, to: [addr]}\n * @param {Object} message String, Buffer or a Stream\n * @param {Function} callback Callback to return once sending is completed\n */\n send(envelope, message, done) {\n if (!message) {\n return done(this._formatError('Empty message', 'EMESSAGE', false, 'API'));\n }\n\n const isDestroyedMessage = this._isDestroyedMessage('send message');\n if (isDestroyedMessage) {\n return done(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));\n }\n\n // reject larger messages than allowed\n if (this._maxAllowedSize && envelope.size > this._maxAllowedSize) {\n return setImmediate(() => {\n done(this._formatError('Message size larger than allowed ' + this._maxAllowedSize, 'EMESSAGE', false, 'MAIL FROM'));\n });\n }\n\n // ensure that callback is only called once\n let returned = false;\n let callback = function () {\n if (returned) {\n return;\n }\n returned = true;\n\n done(...arguments);\n };\n\n if (typeof message.on === 'function') {\n message.on('error', err => callback(this._formatError(err, 'ESTREAM', false, 'API')));\n }\n\n let startTime = Date.now();\n this._setEnvelope(envelope, (err, info) => {\n if (err) {\n return callback(err);\n }\n let envelopeTime = Date.now();\n let stream = this._createSendStream((err, str) => {\n if (err) {\n return callback(err);\n }\n\n info.envelopeTime = envelopeTime - startTime;\n info.messageTime = Date.now() - envelopeTime;\n info.messageSize = stream.outByteCount;\n info.response = str;\n\n return callback(null, info);\n });\n if (typeof message.pipe === 'function') {\n message.pipe(stream);\n } else {\n stream.write(message);\n stream.end();\n }\n });\n }\n\n /**\n * Resets connection state\n *\n * @param {Function} callback Callback to return once connection is reset\n */\n reset(callback) {\n this._sendCommand('RSET');\n this._responseActions.push(str => {\n if (str.charAt(0) !== '2') {\n return callback(this._formatError('Could not reset session state. response=' + str, 'EPROTOCOL', str, 'RSET'));\n }\n this._envelope = false;\n return callback(null, true);\n });\n }\n\n /**\n * Connection listener that is run when the connection to\n * the server is opened\n *\n * @event\n */\n _onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }\n\n /**\n * 'data' listener for data coming from the server\n *\n * @event\n * @param {Buffer} chunk Data chunk coming from the server\n */\n _onData(chunk) {\n if (this._destroyed || !chunk || !chunk.length) {\n return;\n }\n\n let data = (chunk || '').toString('binary');\n let lines = (this._remainder + data).split(/\\r?\\n/);\n let lastline;\n\n this._remainder = lines.pop();\n\n for (let i = 0, len = lines.length; i < len; i++) {\n if (this._responseQueue.length) {\n lastline = this._responseQueue[this._responseQueue.length - 1];\n if (/^\\d+-/.test(lastline.split('\\n').pop())) {\n this._responseQueue[this._responseQueue.length - 1] += '\\n' + lines[i];\n continue;\n }\n }\n this._responseQueue.push(lines[i]);\n }\n\n if (this._responseQueue.length) {\n lastline = this._responseQueue[this._responseQueue.length - 1];\n if (/^\\d+-/.test(lastline.split('\\n').pop())) {\n return;\n }\n }\n\n this._processResponse();\n }\n\n /**\n * 'error' listener for the socket\n *\n * @event\n * @param {Error} err Error object\n * @param {String} type Error name\n */\n _onError(err, type, data, command) {\n clearTimeout(this._connectionTimeout);\n clearTimeout(this._greetingTimeout);\n\n if (this._destroyed) {\n // just ignore, already closed\n // this might happen when a socket is canceled because of reached timeout\n // but the socket timeout error itself receives only after\n return;\n }\n\n err = this._formatError(err, type, data, command);\n\n this.logger.error(data, err.message);\n\n this.emit('error', err);\n this.close();\n }\n\n _formatError(message, type, response, command) {\n let err;\n\n if (/Error\\]$/i.test(Object.prototype.toString.call(message))) {\n err = message;\n } else {\n err = new Error(message);\n }\n\n if (type && type !== 'Error') {\n err.code = type;\n }\n\n if (response) {\n err.response = response;\n err.message += ': ' + response;\n }\n\n let responseCode = (typeof response === 'string' && Number((response.match(/^\\d+/) || [])[0])) || false;\n if (responseCode) {\n err.responseCode = responseCode;\n }\n\n if (command) {\n err.command = command;\n }\n\n return err;\n }\n\n /**\n * 'close' listener for the socket\n *\n * @event\n */\n _onClose() {\n let serverResponse = false;\n\n if (this._remainder && this._remainder.trim()) {\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug(\n {\n tnx: 'server'\n },\n this._remainder.replace(/\\r?\\n$/, '')\n );\n }\n this.lastServerResponse = serverResponse = this._remainder.trim();\n }\n\n this.logger.info(\n {\n tnx: 'network'\n },\n 'Connection closed'\n );\n\n if (this.upgrading && !this._destroyed) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ETLS', serverResponse, 'CONN');\n } else if (![this._actionGreeting, this.close].includes(this._responseActions[0]) && !this._destroyed) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ECONNECTION', serverResponse, 'CONN');\n } else if (/^[45]\\d{2}\\b/.test(serverResponse)) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ECONNECTION', serverResponse, 'CONN');\n }\n\n this._destroy();\n }\n\n /**\n * 'end' listener for the socket\n *\n * @event\n */\n _onEnd() {\n if (this._socket && !this._socket.destroyed) {\n this._socket.destroy();\n }\n }\n\n /**\n * 'timeout' listener for the socket\n *\n * @event\n */\n _onTimeout() {\n return this._onError(new Error('Timeout'), 'ETIMEDOUT', false, 'CONN');\n }\n\n /**\n * Destroys the client, emits 'end'\n */\n _destroy() {\n if (this._destroyed) {\n return;\n }\n this._destroyed = true;\n this.emit('end');\n }\n\n /**\n * Upgrades the connection to TLS\n *\n * @param {Function} callback Callback function to run when the connection\n * has been secured\n */\n _upgradeConnection(callback) {\n // do not remove all listeners or it breaks node v0.10 as there's\n // apparently a 'finish' event set that would be cleared as well\n\n // we can safely keep 'error', 'end', 'close' etc. events\n this._socket.removeListener('data', this._onSocketData); // incoming data is going to be gibberish from this point onwards\n this._socket.removeListener('timeout', this._onSocketTimeout); // timeout will be re-set for the new socket object\n\n let socketPlain = this._socket;\n let opts = {\n socket: this._socket,\n host: this.host\n };\n\n Object.keys(this.options.tls || {}).forEach(key => {\n opts[key] = this.options.tls[key];\n });\n\n this.upgrading = true;\n // tls.connect is not an asynchronous function however it may still throw errors and requires to be wrapped with try/catch\n try {\n this._socket = tls.connect(opts, () => {\n this.secure = true;\n this.upgrading = false;\n this._socket.on('data', this._onSocketData);\n\n socketPlain.removeListener('close', this._onSocketClose);\n socketPlain.removeListener('end', this._onSocketEnd);\n\n return callback(null, true);\n });\n } catch (err) {\n return callback(err);\n }\n\n this._socket.on('error', this._onSocketError);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT); // 10 min.\n this._socket.on('timeout', this._onSocketTimeout);\n\n // resume in case the socket was paused\n socketPlain.resume();\n }\n\n /**\n * Processes queued responses from the server\n *\n * @param {Boolean} force If true, ignores _processing flag\n */\n _processResponse() {\n if (!this._responseQueue.length) {\n return false;\n }\n\n let str = (this.lastServerResponse = (this._responseQueue.shift() || '').toString());\n\n if (/^\\d+-/.test(str.split('\\n').pop())) {\n // keep waiting for the final part of multiline response\n return;\n }\n\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug(\n {\n tnx: 'server'\n },\n str.replace(/\\r?\\n$/, '')\n );\n }\n\n if (!str.trim()) {\n // skip unexpected empty lines\n setImmediate(() => this._processResponse());\n }\n\n let action = this._responseActions.shift();\n\n if (typeof action === 'function') {\n action.call(this, str);\n setImmediate(() => this._processResponse());\n } else {\n return this._onError(new Error('Unexpected Response'), 'EPROTOCOL', str, 'CONN');\n }\n }\n\n /**\n * Send a command to the server, append \\r\\n\n *\n * @param {String} str String to be sent to the server\n * @param {String} logStr Optional string to be used for logging instead of the actual string\n */\n _sendCommand(str, logStr) {\n if (this._destroyed) {\n // Connection already closed, can't send any more data\n return;\n }\n\n if (this._socket.destroyed) {\n return this.close();\n }\n\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug(\n {\n tnx: 'client'\n },\n (logStr || str || '').toString().replace(/\\r?\\n$/, '')\n );\n }\n\n this._socket.write(Buffer.from(str + '\\r\\n', 'utf-8'));\n }\n\n /**\n * Initiates a new message by submitting envelope data, starting with\n * MAIL FROM: command\n *\n * @param {Object} envelope Envelope object in the form of\n * {from:'...', to:['...']}\n * or\n * {from:{address:'...',name:'...'}, to:[address:'...',name:'...']}\n */\n _setEnvelope(envelope, callback) {\n let args = [];\n let useSmtpUtf8 = false;\n\n this._envelope = envelope || {};\n this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '').toString().trim();\n\n this._envelope.to = [].concat(this._envelope.to || []).map(to => ((to && to.address) || to || '').toString().trim());\n\n if (!this._envelope.to.length) {\n return callback(this._formatError('No recipients defined', 'EENVELOPE', false, 'API'));\n }\n\n if (this._envelope.from && /[\\r\\n<>]/.test(this._envelope.from)) {\n return callback(this._formatError('Invalid sender ' + JSON.stringify(this._envelope.from), 'EENVELOPE', false, 'API'));\n }\n\n // check if the sender address uses only ASCII characters,\n // otherwise require usage of SMTPUTF8 extension\n if (/[\\x80-\\uFFFF]/.test(this._envelope.from)) {\n useSmtpUtf8 = true;\n }\n\n for (let i = 0, len = this._envelope.to.length; i < len; i++) {\n if (!this._envelope.to[i] || /[\\r\\n<>]/.test(this._envelope.to[i])) {\n return callback(this._formatError('Invalid recipient ' + JSON.stringify(this._envelope.to[i]), 'EENVELOPE', false, 'API'));\n }\n\n // check if the recipients addresses use only ASCII characters,\n // otherwise require usage of SMTPUTF8 extension\n if (/[\\x80-\\uFFFF]/.test(this._envelope.to[i])) {\n useSmtpUtf8 = true;\n }\n }\n\n // clone the recipients array for latter manipulation\n this._envelope.rcptQueue = JSON.parse(JSON.stringify(this._envelope.to || []));\n this._envelope.rejected = [];\n this._envelope.rejectedErrors = [];\n this._envelope.accepted = [];\n\n if (this._envelope.dsn) {\n try {\n this._envelope.dsn = this._setDsnEnvelope(this._envelope.dsn);\n } catch (err) {\n return callback(this._formatError('Invalid DSN ' + err.message, 'EENVELOPE', false, 'API'));\n }\n }\n\n this._responseActions.push(str => {\n this._actionMAIL(str, callback);\n });\n\n // If the server supports SMTPUTF8 and the envelope includes an internationalized\n // email address then append SMTPUTF8 keyword to the MAIL FROM command\n if (useSmtpUtf8 && this._supportedExtensions.includes('SMTPUTF8')) {\n args.push('SMTPUTF8');\n this._usingSmtpUtf8 = true;\n }\n\n // If the server supports 8BITMIME and the message might contain non-ascii bytes\n // then append the 8BITMIME keyword to the MAIL FROM command\n if (this._envelope.use8BitMime && this._supportedExtensions.includes('8BITMIME')) {\n args.push('BODY=8BITMIME');\n this._using8BitMime = true;\n }\n\n if (this._envelope.size && this._supportedExtensions.includes('SIZE')) {\n args.push('SIZE=' + this._envelope.size);\n }\n\n // If the server supports DSN and the envelope includes an DSN prop\n // then append DSN params to the MAIL FROM command\n if (this._envelope.dsn && this._supportedExtensions.includes('DSN')) {\n if (this._envelope.dsn.ret) {\n args.push('RET=' + shared.encodeXText(this._envelope.dsn.ret));\n }\n if (this._envelope.dsn.envid) {\n args.push('ENVID=' + shared.encodeXText(this._envelope.dsn.envid));\n }\n }\n\n this._sendCommand('MAIL FROM:<' + this._envelope.from + '>' + (args.length ? ' ' + args.join(' ') : ''));\n }\n\n _setDsnEnvelope(params) {\n let ret = (params.ret || params.return || '').toString().toUpperCase() || null;\n if (ret) {\n switch (ret) {\n case 'HDRS':\n case 'HEADERS':\n ret = 'HDRS';\n break;\n case 'FULL':\n case 'BODY':\n ret = 'FULL';\n break;\n }\n }\n\n if (ret && !['FULL', 'HDRS'].includes(ret)) {\n throw new Error('ret: ' + JSON.stringify(ret));\n }\n\n let envid = (params.envid || params.id || '').toString() || null;\n\n let notify = params.notify || null;\n if (notify) {\n if (typeof notify === 'string') {\n notify = notify.split(',');\n }\n notify = notify.map(n => n.trim().toUpperCase());\n let validNotify = ['NEVER', 'SUCCESS', 'FAILURE', 'DELAY'];\n let invaliNotify = notify.filter(n => !validNotify.includes(n));\n if (invaliNotify.length || (notify.length > 1 && notify.includes('NEVER'))) {\n throw new Error('notify: ' + JSON.stringify(notify.join(',')));\n }\n notify = notify.join(',');\n }\n\n let orcpt = (params.recipient || params.orcpt || '').toString() || null;\n if (orcpt && orcpt.indexOf(';') < 0) {\n orcpt = 'rfc822;' + orcpt;\n }\n\n return {\n ret,\n envid,\n notify,\n orcpt\n };\n }\n\n _getDsnRcptToArgs() {\n let args = [];\n // If the server supports DSN and the envelope includes an DSN prop\n // then append DSN params to the RCPT TO command\n if (this._envelope.dsn && this._supportedExtensions.includes('DSN')) {\n if (this._envelope.dsn.notify) {\n args.push('NOTIFY=' + shared.encodeXText(this._envelope.dsn.notify));\n }\n if (this._envelope.dsn.orcpt) {\n args.push('ORCPT=' + shared.encodeXText(this._envelope.dsn.orcpt));\n }\n }\n return args.length ? ' ' + args.join(' ') : '';\n }\n\n _createSendStream(callback) {\n let dataStream = new DataStream();\n let logStream;\n\n if (this.options.lmtp) {\n this._envelope.accepted.forEach((recipient, i) => {\n let final = i === this._envelope.accepted.length - 1;\n this._responseActions.push(str => {\n this._actionLMTPStream(recipient, final, str, callback);\n });\n });\n } else {\n this._responseActions.push(str => {\n this._actionSMTPStream(str, callback);\n });\n }\n\n dataStream.pipe(this._socket, {\n end: false\n });\n\n if (this.options.debug) {\n logStream = new PassThrough();\n logStream.on('readable', () => {\n let chunk;\n while ((chunk = logStream.read())) {\n this.logger.debug(\n {\n tnx: 'message'\n },\n chunk.toString('binary').replace(/\\r?\\n$/, '')\n );\n }\n });\n dataStream.pipe(logStream);\n }\n\n dataStream.once('end', () => {\n this.logger.info(\n {\n tnx: 'message',\n inByteCount: dataStream.inByteCount,\n outByteCount: dataStream.outByteCount\n },\n '<%s bytes encoded mime message (source size %s bytes)>',\n dataStream.outByteCount,\n dataStream.inByteCount\n );\n });\n\n return dataStream;\n }\n\n /** ACTIONS **/\n\n /**\n * Will be run after the connection is created and the server sends\n * a greeting. If the incoming message starts with 220 initiate\n * SMTP session by sending EHLO command\n *\n * @param {String} str Message from the server\n */\n _actionGreeting(str) {\n clearTimeout(this._greetingTimeout);\n\n if (str.substr(0, 3) !== '220') {\n this._onError(new Error('Invalid greeting. response=' + str), 'EPROTOCOL', str, 'CONN');\n return;\n }\n\n if (this.options.lmtp) {\n this._responseActions.push(this._actionLHLO);\n this._sendCommand('LHLO ' + this.name);\n } else {\n this._responseActions.push(this._actionEHLO);\n this._sendCommand('EHLO ' + this.name);\n }\n }\n\n /**\n * Handles server response for LHLO command. If it yielded in\n * error, emit 'error', otherwise treat this as an EHLO response\n *\n * @param {String} str Message from the server\n */\n _actionLHLO(str) {\n if (str.charAt(0) !== '2') {\n this._onError(new Error('Invalid LHLO. response=' + str), 'EPROTOCOL', str, 'LHLO');\n return;\n }\n\n this._actionEHLO(str);\n }\n\n /**\n * Handles server response for EHLO command. If it yielded in\n * error, try HELO instead, otherwise initiate TLS negotiation\n * if STARTTLS is supported by the server or move into the\n * authentication phase.\n *\n * @param {String} str Message from the server\n */\n _actionEHLO(str) {\n let match;\n\n if (str.substr(0, 3) === '421') {\n this._onError(new Error('Server terminates connection. response=' + str), 'ECONNECTION', str, 'EHLO');\n return;\n }\n\n if (str.charAt(0) !== '2') {\n if (this.options.requireTLS) {\n this._onError(new Error('EHLO failed but HELO does not support required STARTTLS. response=' + str), 'ECONNECTION', str, 'EHLO');\n return;\n }\n\n // Try HELO instead\n this._responseActions.push(this._actionHELO);\n this._sendCommand('HELO ' + this.name);\n return;\n }\n\n this._ehloLines = str\n .split(/\\r?\\n/)\n .map(line => line.replace(/^\\d+[ -]/, '').trim())\n .filter(line => line)\n .slice(1);\n\n // Detect if the server supports STARTTLS\n if (!this.secure && !this.options.ignoreTLS && (/[ -]STARTTLS\\b/im.test(str) || this.options.requireTLS)) {\n this._sendCommand('STARTTLS');\n this._responseActions.push(this._actionSTARTTLS);\n return;\n }\n\n // Detect if the server supports SMTPUTF8\n if (/[ -]SMTPUTF8\\b/im.test(str)) {\n this._supportedExtensions.push('SMTPUTF8');\n }\n\n // Detect if the server supports DSN\n if (/[ -]DSN\\b/im.test(str)) {\n this._supportedExtensions.push('DSN');\n }\n\n // Detect if the server supports 8BITMIME\n if (/[ -]8BITMIME\\b/im.test(str)) {\n this._supportedExtensions.push('8BITMIME');\n }\n\n // Detect if the server supports PIPELINING\n if (/[ -]PIPELINING\\b/im.test(str)) {\n this._supportedExtensions.push('PIPELINING');\n }\n\n // Detect if the server supports AUTH\n if (/[ -]AUTH\\b/i.test(str)) {\n this.allowsAuth = true;\n }\n\n // Detect if the server supports PLAIN auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)PLAIN/i.test(str)) {\n this._supportedAuth.push('PLAIN');\n }\n\n // Detect if the server supports LOGIN auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)LOGIN/i.test(str)) {\n this._supportedAuth.push('LOGIN');\n }\n\n // Detect if the server supports CRAM-MD5 auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)CRAM-MD5/i.test(str)) {\n this._supportedAuth.push('CRAM-MD5');\n }\n\n // Detect if the server supports XOAUTH2 auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)XOAUTH2/i.test(str)) {\n this._supportedAuth.push('XOAUTH2');\n }\n\n // Detect if the server supports SIZE extensions (and the max allowed size)\n if ((match = str.match(/[ -]SIZE(?:[ \\t]+(\\d+))?/im))) {\n this._supportedExtensions.push('SIZE');\n this._maxAllowedSize = Number(match[1]) || 0;\n }\n\n this.emit('connect');\n }\n\n /**\n * Handles server response for HELO command. If it yielded in\n * error, emit 'error', otherwise move into the authentication phase.\n *\n * @param {String} str Message from the server\n */\n _actionHELO(str) {\n if (str.charAt(0) !== '2') {\n this._onError(new Error('Invalid HELO. response=' + str), 'EPROTOCOL', str, 'HELO');\n return;\n }\n\n // assume that authentication is enabled (most probably is not though)\n this.allowsAuth = true;\n\n this.emit('connect');\n }\n\n /**\n * Handles server response for STARTTLS command. If there's an error\n * try HELO instead, otherwise initiate TLS upgrade. If the upgrade\n * succeedes restart the EHLO\n *\n * @param {String} str Message from the server\n */\n _actionSTARTTLS(str) {\n if (str.charAt(0) !== '2') {\n if (this.options.opportunisticTLS) {\n this.logger.info(\n {\n tnx: 'smtp'\n },\n 'Failed STARTTLS upgrade, continuing unencrypted'\n );\n return this.emit('connect');\n }\n this._onError(new Error('Error upgrading connection with STARTTLS'), 'ETLS', str, 'STARTTLS');\n return;\n }\n\n this._upgradeConnection((err, secured) => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'STARTTLS');\n return;\n }\n\n this.logger.info(\n {\n tnx: 'smtp'\n },\n 'Connection upgraded with STARTTLS'\n );\n\n if (secured) {\n // restart session\n if (this.options.lmtp) {\n this._responseActions.push(this._actionLHLO);\n this._sendCommand('LHLO ' + this.name);\n } else {\n this._responseActions.push(this._actionEHLO);\n this._sendCommand('EHLO ' + this.name);\n }\n } else {\n this.emit('connect');\n }\n });\n }\n\n /**\n * Handle the response for AUTH LOGIN command. We are expecting\n * '334 VXNlcm5hbWU6' (base64 for 'Username:'). Data to be sent as\n * response needs to be base64 encoded username. We do not need\n * exact match but settle with 334 response in general as some\n * hosts invalidly use a longer message than VXNlcm5hbWU6\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_LOGIN_USER(str, callback) {\n if (!/^334[ -]/.test(str)) {\n // expecting '334 VXNlcm5hbWU6'\n callback(this._formatError('Invalid login sequence while waiting for \"334 VXNlcm5hbWU6\"', 'EAUTH', str, 'AUTH LOGIN'));\n return;\n }\n\n this._responseActions.push(str => {\n this._actionAUTH_LOGIN_PASS(str, callback);\n });\n\n this._sendCommand(Buffer.from(this._auth.credentials.user + '', 'utf-8').toString('base64'));\n }\n\n /**\n * Handle the response for AUTH CRAM-MD5 command. We are expecting\n * '334 '. Data to be sent as response needs to be\n * base64 decoded challenge string, MD5 hashed using the password as\n * a HMAC key, prefixed by the username and a space, and finally all\n * base64 encoded again.\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_CRAM_MD5(str, callback) {\n let challengeMatch = str.match(/^334\\s+(.+)$/);\n let challengeString = '';\n\n if (!challengeMatch) {\n return callback(this._formatError('Invalid login sequence while waiting for server challenge string', 'EAUTH', str, 'AUTH CRAM-MD5'));\n } else {\n challengeString = challengeMatch[1];\n }\n\n // Decode from base64\n let base64decoded = Buffer.from(challengeString, 'base64').toString('ascii'),\n hmacMD5 = crypto.createHmac('md5', this._auth.credentials.pass);\n\n hmacMD5.update(base64decoded);\n\n let prepended = this._auth.credentials.user + ' ' + hmacMD5.digest('hex');\n\n this._responseActions.push(str => {\n this._actionAUTH_CRAM_MD5_PASS(str, callback);\n });\n\n this._sendCommand(\n Buffer.from(prepended).toString('base64'),\n // hidden hash for logs\n Buffer.from(this._auth.credentials.user + ' /* secret */').toString('base64')\n );\n }\n\n /**\n * Handles the response to CRAM-MD5 authentication, if there's no error,\n * the user can be considered logged in. Start waiting for a message to send\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_CRAM_MD5_PASS(str, callback) {\n if (!str.match(/^235\\s+/)) {\n return callback(this._formatError('Invalid login sequence while waiting for \"235\"', 'EAUTH', str, 'AUTH CRAM-MD5'));\n }\n\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n },\n 'User %s authenticated',\n JSON.stringify(this._auth.user)\n );\n this.authenticated = true;\n callback(null, true);\n }\n\n /**\n * Handle the response for AUTH LOGIN command. We are expecting\n * '334 UGFzc3dvcmQ6' (base64 for 'Password:'). Data to be sent as\n * response needs to be base64 encoded password.\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_LOGIN_PASS(str, callback) {\n if (!/^334[ -]/.test(str)) {\n // expecting '334 UGFzc3dvcmQ6'\n return callback(this._formatError('Invalid login sequence while waiting for \"334 UGFzc3dvcmQ6\"', 'EAUTH', str, 'AUTH LOGIN'));\n }\n\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, callback);\n });\n\n this._sendCommand(\n Buffer.from((this._auth.credentials.pass || '').toString(), 'utf-8').toString('base64'),\n // Hidden pass for logs\n Buffer.from('/* secret */', 'utf-8').toString('base64')\n );\n }\n\n /**\n * Handles the response for authentication, if there's no error,\n * the user can be considered logged in. Start waiting for a message to send\n *\n * @param {String} str Message from the server\n */\n _actionAUTHComplete(str, isRetry, callback) {\n if (!callback && typeof isRetry === 'function') {\n callback = isRetry;\n isRetry = false;\n }\n\n if (str.substr(0, 3) === '334') {\n this._responseActions.push(str => {\n if (isRetry || this._authMethod !== 'XOAUTH2') {\n this._actionAUTHComplete(str, true, callback);\n } else {\n // fetch a new OAuth2 access token\n setImmediate(() => this._handleXOauth2Token(true, callback));\n }\n });\n this._sendCommand('');\n return;\n }\n\n if (str.charAt(0) !== '2') {\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authfail',\n method: this._authMethod\n },\n 'User %s failed to authenticate',\n JSON.stringify(this._auth.user)\n );\n return callback(this._formatError('Invalid login', 'EAUTH', str, 'AUTH ' + this._authMethod));\n }\n\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n },\n 'User %s authenticated',\n JSON.stringify(this._auth.user)\n );\n this.authenticated = true;\n callback(null, true);\n }\n\n /**\n * Handle response for a MAIL FROM: command\n *\n * @param {String} str Message from the server\n */\n _actionMAIL(str, callback) {\n let message, curRecipient;\n if (Number(str.charAt(0)) !== 2) {\n if (this._usingSmtpUtf8 && /^550 /.test(str) && /[\\x80-\\uFFFF]/.test(this._envelope.from)) {\n message = 'Internationalized mailbox name not allowed';\n } else {\n message = 'Mail command failed';\n }\n return callback(this._formatError(message, 'EENVELOPE', str, 'MAIL FROM'));\n }\n\n if (!this._envelope.rcptQueue.length) {\n return callback(this._formatError('Can\\x27t send mail - no recipients defined', 'EENVELOPE', false, 'API'));\n } else {\n this._recipientQueue = [];\n\n if (this._supportedExtensions.includes('PIPELINING')) {\n while (this._envelope.rcptQueue.length) {\n curRecipient = this._envelope.rcptQueue.shift();\n this._recipientQueue.push(curRecipient);\n this._responseActions.push(str => {\n this._actionRCPT(str, callback);\n });\n this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());\n }\n } else {\n curRecipient = this._envelope.rcptQueue.shift();\n this._recipientQueue.push(curRecipient);\n this._responseActions.push(str => {\n this._actionRCPT(str, callback);\n });\n this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());\n }\n }\n }\n\n /**\n * Handle response for a RCPT TO: command\n *\n * @param {String} str Message from the server\n */\n _actionRCPT(str, callback) {\n let message,\n err,\n curRecipient = this._recipientQueue.shift();\n if (Number(str.charAt(0)) !== 2) {\n // this is a soft error\n if (this._usingSmtpUtf8 && /^553 /.test(str) && /[\\x80-\\uFFFF]/.test(curRecipient)) {\n message = 'Internationalized mailbox name not allowed';\n } else {\n message = 'Recipient command failed';\n }\n this._envelope.rejected.push(curRecipient);\n // store error for the failed recipient\n err = this._formatError(message, 'EENVELOPE', str, 'RCPT TO');\n err.recipient = curRecipient;\n this._envelope.rejectedErrors.push(err);\n } else {\n this._envelope.accepted.push(curRecipient);\n }\n\n if (!this._envelope.rcptQueue.length && !this._recipientQueue.length) {\n if (this._envelope.rejected.length < this._envelope.to.length) {\n this._responseActions.push(str => {\n this._actionDATA(str, callback);\n });\n this._sendCommand('DATA');\n } else {\n err = this._formatError('Can\\x27t send mail - all recipients were rejected', 'EENVELOPE', str, 'RCPT TO');\n err.rejected = this._envelope.rejected;\n err.rejectedErrors = this._envelope.rejectedErrors;\n return callback(err);\n }\n } else if (this._envelope.rcptQueue.length) {\n curRecipient = this._envelope.rcptQueue.shift();\n this._recipientQueue.push(curRecipient);\n this._responseActions.push(str => {\n this._actionRCPT(str, callback);\n });\n this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());\n }\n }\n\n /**\n * Handle response for a DATA command\n *\n * @param {String} str Message from the server\n */\n _actionDATA(str, callback) {\n // response should be 354 but according to this issue https://github.com/eleith/emailjs/issues/24\n // some servers might use 250 instead, so lets check for 2 or 3 as the first digit\n if (!/^[23]/.test(str)) {\n return callback(this._formatError('Data command failed', 'EENVELOPE', str, 'DATA'));\n }\n\n let response = {\n accepted: this._envelope.accepted,\n rejected: this._envelope.rejected\n };\n\n if (this._ehloLines && this._ehloLines.length) {\n response.ehlo = this._ehloLines;\n }\n\n if (this._envelope.rejectedErrors.length) {\n response.rejectedErrors = this._envelope.rejectedErrors;\n }\n\n callback(null, response);\n }\n\n /**\n * Handle response for a DATA stream when using SMTP\n * We expect a single response that defines if the sending succeeded or failed\n *\n * @param {String} str Message from the server\n */\n _actionSMTPStream(str, callback) {\n if (Number(str.charAt(0)) !== 2) {\n // Message failed\n return callback(this._formatError('Message failed', 'EMESSAGE', str, 'DATA'));\n } else {\n // Message sent succesfully\n return callback(null, str);\n }\n }\n\n /**\n * Handle response for a DATA stream\n * We expect a separate response for every recipient. All recipients can either\n * succeed or fail separately\n *\n * @param {String} recipient The recipient this response applies to\n * @param {Boolean} final Is this the final recipient?\n * @param {String} str Message from the server\n */\n _actionLMTPStream(recipient, final, str, callback) {\n let err;\n if (Number(str.charAt(0)) !== 2) {\n // Message failed\n err = this._formatError('Message failed for recipient ' + recipient, 'EMESSAGE', str, 'DATA');\n err.recipient = recipient;\n this._envelope.rejected.push(recipient);\n this._envelope.rejectedErrors.push(err);\n for (let i = 0, len = this._envelope.accepted.length; i < len; i++) {\n if (this._envelope.accepted[i] === recipient) {\n this._envelope.accepted.splice(i, 1);\n }\n }\n }\n if (final) {\n return callback(null, str);\n }\n }\n\n _handleXOauth2Token(isRetry, callback) {\n this._auth.oauth2.getToken(isRetry, (err, accessToken) => {\n if (err) {\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authfail',\n method: this._authMethod\n },\n 'User %s failed to authenticate',\n JSON.stringify(this._auth.user)\n );\n return callback(this._formatError(err, 'EAUTH', false, 'AUTH XOAUTH2'));\n }\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, isRetry, callback);\n });\n this._sendCommand(\n 'AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token(accessToken),\n // Hidden for logs\n 'AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token('/* secret */')\n );\n });\n }\n\n /**\n *\n * @param {string} command\n * @private\n */\n _isDestroyedMessage(command) {\n if (this._destroyed) {\n return 'Cannot ' + command + ' - smtp connection is already destroyed.';\n }\n\n if (this._socket) {\n if (this._socket.destroyed) {\n return 'Cannot ' + command + ' - smtp connection socket is already destroyed.';\n }\n\n if (!this._socket.writable) {\n return 'Cannot ' + command + ' - smtp connection socket is already half-closed.';\n }\n }\n }\n\n _getHostname() {\n // defaul hostname is machine hostname or [IP]\n let defaultHostname;\n try {\n defaultHostname = os.hostname() || '';\n } catch (err) {\n // fails on windows 7\n defaultHostname = 'localhost';\n }\n\n // ignore if not FQDN\n if (!defaultHostname || defaultHostname.indexOf('.') < 0) {\n defaultHostname = '[127.0.0.1]';\n }\n\n // IP should be enclosed in []\n if (defaultHostname.match(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/)) {\n defaultHostname = '[' + defaultHostname + ']';\n }\n\n return defaultHostname;\n }\n}\n\nmodule.exports = SMTPConnection;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst PoolResource = require('./pool-resource');\nconst SMTPConnection = require('../smtp-connection');\nconst wellKnown = require('../well-known');\nconst shared = require('../shared');\nconst packageData = require('../../package.json');\n\n/**\n * Creates a SMTP pool transport object for Nodemailer\n *\n * @constructor\n * @param {Object} options SMTP Connection options\n */\nclass SMTPPool extends EventEmitter {\n constructor(options) {\n super();\n\n options = options || {};\n if (typeof options === 'string') {\n options = {\n url: options\n };\n }\n\n let urlData;\n let service = options.service;\n\n if (typeof options.getSocket === 'function') {\n this.getSocket = options.getSocket;\n }\n\n if (options.url) {\n urlData = shared.parseConnectionUrl(options.url);\n service = service || urlData.service;\n }\n\n this.options = shared.assign(\n false, // create new object\n options, // regular options\n urlData, // url options\n service && wellKnown(service) // wellknown options\n );\n\n this.options.maxConnections = this.options.maxConnections || 5;\n this.options.maxMessages = this.options.maxMessages || 100;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-pool'\n });\n\n // temporary object\n let connection = new SMTPConnection(this.options);\n\n this.name = 'SMTP (pool)';\n this.version = packageData.version + '[client:' + connection.version + ']';\n\n this._rateLimit = {\n counter: 0,\n timeout: null,\n waiting: [],\n checkpoint: false,\n delta: Number(this.options.rateDelta) || 1000,\n limit: Number(this.options.rateLimit) || 0\n };\n this._closed = false;\n this._queue = [];\n this._connections = [];\n this._connectionCounter = 0;\n\n this.idling = true;\n\n setImmediate(() => {\n if (this.idling) {\n this.emit('idle');\n }\n });\n }\n\n /**\n * Placeholder function for creating proxy sockets. This method immediatelly returns\n * without a socket\n *\n * @param {Object} options Connection options\n * @param {Function} callback Callback function to run with the socket keys\n */\n getSocket(options, callback) {\n // return immediatelly\n return setImmediate(() => callback(null, false));\n }\n\n /**\n * Queues an e-mail to be sent using the selected settings\n *\n * @param {Object} mail Mail object\n * @param {Function} callback Callback function\n */\n send(mail, callback) {\n if (this._closed) {\n return false;\n }\n\n this._queue.push({\n mail,\n requeueAttempts: 0,\n callback\n });\n\n if (this.idling && this._queue.length >= this.options.maxConnections) {\n this.idling = false;\n }\n\n setImmediate(() => this._processMessages());\n\n return true;\n }\n\n /**\n * Closes all connections in the pool. If there is a message being sent, the connection\n * is closed later\n */\n close() {\n let connection;\n let len = this._connections.length;\n this._closed = true;\n\n // clear rate limit timer if it exists\n clearTimeout(this._rateLimit.timeout);\n\n if (!len && !this._queue.length) {\n return;\n }\n\n // remove all available connections\n for (let i = len - 1; i >= 0; i--) {\n if (this._connections[i] && this._connections[i].available) {\n connection = this._connections[i];\n connection.close();\n this.logger.info(\n {\n tnx: 'connection',\n cid: connection.id,\n action: 'removed'\n },\n 'Connection #%s removed',\n connection.id\n );\n }\n }\n\n if (len && !this._connections.length) {\n this.logger.debug(\n {\n tnx: 'connection'\n },\n 'All connections removed'\n );\n }\n\n if (!this._queue.length) {\n return;\n }\n\n // make sure that entire queue would be cleaned\n let invokeCallbacks = () => {\n if (!this._queue.length) {\n this.logger.debug(\n {\n tnx: 'connection'\n },\n 'Pending queue entries cleared'\n );\n return;\n }\n let entry = this._queue.shift();\n if (entry && typeof entry.callback === 'function') {\n try {\n entry.callback(new Error('Connection pool was closed'));\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n }\n setImmediate(invokeCallbacks);\n };\n setImmediate(invokeCallbacks);\n }\n\n /**\n * Check the queue and available connections. If there is a message to be sent and there is\n * an available connection, then use this connection to send the mail\n */\n _processMessages() {\n let connection;\n let i, len;\n\n // do nothing if already closed\n if (this._closed) {\n return;\n }\n\n // do nothing if queue is empty\n if (!this._queue.length) {\n if (!this.idling) {\n // no pending jobs\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n\n // find first available connection\n for (i = 0, len = this._connections.length; i < len; i++) {\n if (this._connections[i].available) {\n connection = this._connections[i];\n break;\n }\n }\n\n if (!connection && this._connections.length < this.options.maxConnections) {\n connection = this._createConnection();\n }\n\n if (!connection) {\n // no more free connection slots available\n this.idling = false;\n return;\n }\n\n // check if there is free space in the processing queue\n if (!this.idling && this._queue.length < this.options.maxConnections) {\n this.idling = true;\n this.emit('idle');\n }\n\n let entry = (connection.queueEntry = this._queue.shift());\n entry.messageId = (connection.queueEntry.mail.message.getHeader('message-id') || '').replace(/[<>\\s]/g, '');\n\n connection.available = false;\n\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n messageId: entry.messageId,\n action: 'assign'\n },\n 'Assigned message <%s> to #%s (%s)',\n entry.messageId,\n connection.id,\n connection.messages + 1\n );\n\n if (this._rateLimit.limit) {\n this._rateLimit.counter++;\n if (!this._rateLimit.checkpoint) {\n this._rateLimit.checkpoint = Date.now();\n }\n }\n\n connection.send(entry.mail, (err, info) => {\n // only process callback if current handler is not changed\n if (entry === connection.queueEntry) {\n try {\n entry.callback(err, info);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n });\n }\n\n /**\n * Creates a new pool resource\n */\n _createConnection() {\n let connection = new PoolResource(this);\n\n connection.id = ++this._connectionCounter;\n\n this.logger.info(\n {\n tnx: 'pool',\n cid: connection.id,\n action: 'conection'\n },\n 'Created new pool resource #%s',\n connection.id\n );\n\n // resource comes available\n connection.on('available', () => {\n this.logger.debug(\n {\n tnx: 'connection',\n cid: connection.id,\n action: 'available'\n },\n 'Connection #%s became available',\n connection.id\n );\n\n if (this._closed) {\n // if already closed run close() that will remove this connections from connections list\n this.close();\n } else {\n // check if there's anything else to send\n this._processMessages();\n }\n });\n\n // resource is terminated with an error\n connection.once('error', err => {\n if (err.code !== 'EMAXLIMIT') {\n this.logger.error(\n {\n err,\n tnx: 'pool',\n cid: connection.id\n },\n 'Pool Error for #%s: %s',\n connection.id,\n err.message\n );\n } else {\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n action: 'maxlimit'\n },\n 'Max messages limit exchausted for #%s',\n connection.id\n );\n }\n\n if (connection.queueEntry) {\n try {\n connection.queueEntry.callback(err);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n\n // remove the erroneus connection from connections list\n this._removeConnection(connection);\n\n this._continueProcessing();\n });\n\n connection.once('close', () => {\n this.logger.info(\n {\n tnx: 'connection',\n cid: connection.id,\n action: 'closed'\n },\n 'Connection #%s was closed',\n connection.id\n );\n\n this._removeConnection(connection);\n\n if (connection.queueEntry) {\n // If the connection closed when sending, add the message to the queue again\n // if max number of requeues is not reached yet\n // Note that we must wait a bit.. because the callback of the 'error' handler might be called\n // in the next event loop\n setTimeout(() => {\n if (connection.queueEntry) {\n if (this._shouldRequeuOnConnectionClose(connection.queueEntry)) {\n this._requeueEntryOnConnectionClose(connection);\n } else {\n this._failDeliveryOnConnectionClose(connection);\n }\n }\n this._continueProcessing();\n }, 50);\n } else {\n this._continueProcessing();\n }\n });\n\n this._connections.push(connection);\n\n return connection;\n }\n\n _shouldRequeuOnConnectionClose(queueEntry) {\n if (this.options.maxRequeues === undefined || this.options.maxRequeues < 0) {\n return true;\n }\n\n return queueEntry.requeueAttempts < this.options.maxRequeues;\n }\n\n _failDeliveryOnConnectionClose(connection) {\n if (connection.queueEntry && connection.queueEntry.callback) {\n try {\n connection.queueEntry.callback(new Error('Reached maximum number of retries after connection was closed'));\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n messageId: connection.queueEntry.messageId,\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n }\n\n _requeueEntryOnConnectionClose(connection) {\n connection.queueEntry.requeueAttempts = connection.queueEntry.requeueAttempts + 1;\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n messageId: connection.queueEntry.messageId,\n action: 'requeue'\n },\n 'Re-queued message <%s> for #%s. Attempt: #%s',\n connection.queueEntry.messageId,\n connection.id,\n connection.queueEntry.requeueAttempts\n );\n this._queue.unshift(connection.queueEntry);\n connection.queueEntry = false;\n }\n\n /**\n * Continue to process message if the pool hasn't closed\n */\n _continueProcessing() {\n if (this._closed) {\n this.close();\n } else {\n setTimeout(() => this._processMessages(), 100);\n }\n }\n\n /**\n * Remove resource from pool\n *\n * @param {Object} connection The PoolResource to remove\n */\n _removeConnection(connection) {\n let index = this._connections.indexOf(connection);\n\n if (index !== -1) {\n this._connections.splice(index, 1);\n }\n }\n\n /**\n * Checks if connections have hit current rate limit and if so, queues the availability callback\n *\n * @param {Function} callback Callback function to run once rate limiter has been cleared\n */\n _checkRateLimit(callback) {\n if (!this._rateLimit.limit) {\n return callback();\n }\n\n let now = Date.now();\n\n if (this._rateLimit.counter < this._rateLimit.limit) {\n return callback();\n }\n\n this._rateLimit.waiting.push(callback);\n\n if (this._rateLimit.checkpoint <= now - this._rateLimit.delta) {\n return this._clearRateLimit();\n } else if (!this._rateLimit.timeout) {\n this._rateLimit.timeout = setTimeout(() => this._clearRateLimit(), this._rateLimit.delta - (now - this._rateLimit.checkpoint));\n this._rateLimit.checkpoint = now;\n }\n }\n\n /**\n * Clears current rate limit limitation and runs paused callback\n */\n _clearRateLimit() {\n clearTimeout(this._rateLimit.timeout);\n this._rateLimit.timeout = null;\n this._rateLimit.counter = 0;\n this._rateLimit.checkpoint = false;\n\n // resume all paused connections\n while (this._rateLimit.waiting.length) {\n let cb = this._rateLimit.waiting.shift();\n setImmediate(cb);\n }\n }\n\n /**\n * Returns true if there are free slots in the queue\n */\n isIdle() {\n return this.idling;\n }\n\n /**\n * Verifies SMTP configuration\n *\n * @param {Function} callback Callback function\n */\n verify(callback) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n let auth = new PoolResource(this).auth;\n\n this.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n options = shared.assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n let connection = new SMTPConnection(options);\n let returned = false;\n\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n connection.close();\n return callback(err);\n });\n\n connection.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(new Error('Connection closed'));\n });\n\n let finalize = () => {\n if (returned) {\n return;\n }\n returned = true;\n connection.quit();\n return callback(null, true);\n };\n\n connection.connect(() => {\n if (returned) {\n return;\n }\n\n if (auth && (connection.allowsAuth || options.forceAuth)) {\n connection.login(auth, err => {\n if (returned) {\n return;\n }\n\n if (err) {\n returned = true;\n connection.close();\n return callback(err);\n }\n\n finalize();\n });\n } else if (!auth && connection.allowsAuth && options.forceAuth) {\n let err = new Error('Authentication info was not provided');\n err.code = 'NoAuth';\n\n returned = true;\n connection.close();\n return callback(err);\n } else {\n finalize();\n }\n });\n });\n\n return promise;\n }\n}\n\n// expose to the world\nmodule.exports = SMTPPool;\n","'use strict';\n\nconst SMTPConnection = require('../smtp-connection');\nconst assign = require('../shared').assign;\nconst XOAuth2 = require('../xoauth2');\nconst EventEmitter = require('events');\n\n/**\n * Creates an element for the pool\n *\n * @constructor\n * @param {Object} options SMTPPool instance\n */\nclass PoolResource extends EventEmitter {\n constructor(pool) {\n super();\n\n this.pool = pool;\n this.options = pool.options;\n this.logger = this.pool.logger;\n\n if (this.options.auth) {\n switch ((this.options.auth.type || '').toString().toUpperCase()) {\n case 'OAUTH2': {\n let oauth2 = new XOAuth2(this.options.auth, this.logger);\n oauth2.provisionCallback = (this.pool.mailer && this.pool.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;\n this.auth = {\n type: 'OAUTH2',\n user: this.options.auth.user,\n oauth2,\n method: 'XOAUTH2'\n };\n oauth2.on('token', token => this.pool.mailer.emit('token', token));\n oauth2.on('error', err => this.emit('error', err));\n break;\n }\n default:\n if (!this.options.auth.user && !this.options.auth.pass) {\n break;\n }\n this.auth = {\n type: (this.options.auth.type || '').toString().toUpperCase() || 'LOGIN',\n user: this.options.auth.user,\n credentials: {\n user: this.options.auth.user || '',\n pass: this.options.auth.pass,\n options: this.options.auth.options\n },\n method: (this.options.auth.method || '').trim().toUpperCase() || this.options.authMethod || false\n };\n }\n }\n\n this._connection = false;\n this._connected = false;\n\n this.messages = 0;\n this.available = true;\n }\n\n /**\n * Initiates a connection to the SMTP server\n *\n * @param {Function} callback Callback function to run once the connection is established or failed\n */\n connect(callback) {\n this.pool.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let returned = false;\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n\n options = assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n this.connection = new SMTPConnection(options);\n\n this.connection.once('error', err => {\n this.emit('error', err);\n if (returned) {\n return;\n }\n returned = true;\n return callback(err);\n });\n\n this.connection.once('end', () => {\n this.close();\n if (returned) {\n return;\n }\n returned = true;\n\n let timer = setTimeout(() => {\n if (returned) {\n return;\n }\n // still have not returned, this means we have an unexpected connection close\n let err = new Error('Unexpected socket close');\n if (this.connection && this.connection._socket && this.connection._socket.upgrading) {\n // starttls connection errors\n err.code = 'ETLS';\n }\n callback(err);\n }, 1000);\n\n try {\n timer.unref();\n } catch (E) {\n // Ignore. Happens on envs with non-node timer implementation\n }\n });\n\n this.connection.connect(() => {\n if (returned) {\n return;\n }\n\n if (this.auth && (this.connection.allowsAuth || options.forceAuth)) {\n this.connection.login(this.auth, err => {\n if (returned) {\n return;\n }\n returned = true;\n\n if (err) {\n this.connection.close();\n this.emit('error', err);\n return callback(err);\n }\n\n this._connected = true;\n callback(null, true);\n });\n } else {\n returned = true;\n this._connected = true;\n return callback(null, true);\n }\n });\n });\n }\n\n /**\n * Sends an e-mail to be sent using the selected settings\n *\n * @param {Object} mail Mail object\n * @param {Function} callback Callback function\n */\n send(mail, callback) {\n if (!this._connected) {\n return this.connect(err => {\n if (err) {\n return callback(err);\n }\n return this.send(mail, callback);\n });\n }\n\n let envelope = mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId,\n cid: this.id\n },\n 'Sending message %s using #%s to <%s>',\n messageId,\n this.id,\n recipients.join(', ')\n );\n\n if (mail.data.dsn) {\n envelope.dsn = mail.data.dsn;\n }\n\n this.connection.send(envelope, mail.message.createReadStream(), (err, info) => {\n this.messages++;\n\n if (err) {\n this.connection.close();\n this.emit('error', err);\n return callback(err);\n }\n\n info.envelope = {\n from: envelope.from,\n to: envelope.to\n };\n info.messageId = messageId;\n\n setImmediate(() => {\n let err;\n if (this.messages >= this.options.maxMessages) {\n err = new Error('Resource exhausted');\n err.code = 'EMAXLIMIT';\n this.connection.close();\n this.emit('error', err);\n } else {\n this.pool._checkRateLimit(() => {\n this.available = true;\n this.emit('available');\n });\n }\n });\n\n callback(null, info);\n });\n }\n\n /**\n * Closes the connection\n */\n close() {\n this._connected = false;\n if (this.auth && this.auth.oauth2) {\n this.auth.oauth2.removeAllListeners();\n }\n if (this.connection) {\n this.connection.close();\n }\n this.emit('close');\n }\n}\n\nmodule.exports = PoolResource;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst SMTPConnection = require('../smtp-connection');\nconst wellKnown = require('../well-known');\nconst shared = require('../shared');\nconst XOAuth2 = require('../xoauth2');\nconst packageData = require('../../package.json');\n\n/**\n * Creates a SMTP transport object for Nodemailer\n *\n * @constructor\n * @param {Object} options Connection options\n */\nclass SMTPTransport extends EventEmitter {\n constructor(options) {\n super();\n\n options = options || {};\n\n if (typeof options === 'string') {\n options = {\n url: options\n };\n }\n\n let urlData;\n let service = options.service;\n\n if (typeof options.getSocket === 'function') {\n this.getSocket = options.getSocket;\n }\n\n if (options.url) {\n urlData = shared.parseConnectionUrl(options.url);\n service = service || urlData.service;\n }\n\n this.options = shared.assign(\n false, // create new object\n options, // regular options\n urlData, // url options\n service && wellKnown(service) // wellknown options\n );\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-transport'\n });\n\n // temporary object\n let connection = new SMTPConnection(this.options);\n\n this.name = 'SMTP';\n this.version = packageData.version + '[client:' + connection.version + ']';\n\n if (this.options.auth) {\n this.auth = this.getAuth({});\n }\n }\n\n /**\n * Placeholder function for creating proxy sockets. This method immediatelly returns\n * without a socket\n *\n * @param {Object} options Connection options\n * @param {Function} callback Callback function to run with the socket keys\n */\n getSocket(options, callback) {\n // return immediatelly\n return setImmediate(() => callback(null, false));\n }\n\n getAuth(authOpts) {\n if (!authOpts) {\n return this.auth;\n }\n\n let hasAuth = false;\n let authData = {};\n\n if (this.options.auth && typeof this.options.auth === 'object') {\n Object.keys(this.options.auth).forEach(key => {\n hasAuth = true;\n authData[key] = this.options.auth[key];\n });\n }\n\n if (authOpts && typeof authOpts === 'object') {\n Object.keys(authOpts).forEach(key => {\n hasAuth = true;\n authData[key] = authOpts[key];\n });\n }\n\n if (!hasAuth) {\n return false;\n }\n\n switch ((authData.type || '').toString().toUpperCase()) {\n case 'OAUTH2': {\n if (!authData.service && !authData.user) {\n return false;\n }\n let oauth2 = new XOAuth2(authData, this.logger);\n oauth2.provisionCallback = (this.mailer && this.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;\n oauth2.on('token', token => this.mailer.emit('token', token));\n oauth2.on('error', err => this.emit('error', err));\n return {\n type: 'OAUTH2',\n user: authData.user,\n oauth2,\n method: 'XOAUTH2'\n };\n }\n default:\n return {\n type: (authData.type || '').toString().toUpperCase() || 'LOGIN',\n user: authData.user,\n credentials: {\n user: authData.user || '',\n pass: authData.pass,\n options: authData.options\n },\n method: (authData.method || '').trim().toUpperCase() || this.options.authMethod || false\n };\n }\n }\n\n /**\n * Sends an e-mail using the selected settings\n *\n * @param {Object} mail Mail object\n * @param {Function} callback Callback function\n */\n send(mail, callback) {\n this.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let returned = false;\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n\n // only copy options if we need to modify it\n options = shared.assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n let connection = new SMTPConnection(options);\n\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n connection.close();\n return callback(err);\n });\n\n connection.once('end', () => {\n if (returned) {\n return;\n }\n\n let timer = setTimeout(() => {\n if (returned) {\n return;\n }\n returned = true;\n // still have not returned, this means we have an unexpected connection close\n let err = new Error('Unexpected socket close');\n if (connection && connection._socket && connection._socket.upgrading) {\n // starttls connection errors\n err.code = 'ETLS';\n }\n callback(err);\n }, 1000);\n\n try {\n timer.unref();\n } catch (E) {\n // Ignore. Happens on envs with non-node timer implementation\n }\n });\n\n let sendMessage = () => {\n let envelope = mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n\n if (mail.data.dsn) {\n envelope.dsn = mail.data.dsn;\n }\n\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n connection.send(envelope, mail.message.createReadStream(), (err, info) => {\n returned = true;\n connection.close();\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'send'\n },\n 'Send error for %s: %s',\n messageId,\n err.message\n );\n return callback(err);\n }\n info.envelope = {\n from: envelope.from,\n to: envelope.to\n };\n info.messageId = messageId;\n try {\n return callback(null, info);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback'\n },\n 'Callback error for %s: %s',\n messageId,\n E.message\n );\n }\n });\n };\n\n connection.connect(() => {\n if (returned) {\n return;\n }\n\n let auth = this.getAuth(mail.data.auth);\n\n if (auth && (connection.allowsAuth || options.forceAuth)) {\n connection.login(auth, err => {\n if (auth && auth !== this.auth && auth.oauth2) {\n auth.oauth2.removeAllListeners();\n }\n if (returned) {\n return;\n }\n\n if (err) {\n returned = true;\n connection.close();\n return callback(err);\n }\n\n sendMessage();\n });\n } else {\n sendMessage();\n }\n });\n });\n }\n\n /**\n * Verifies SMTP configuration\n *\n * @param {Function} callback Callback function\n */\n verify(callback) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n this.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n\n options = shared.assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n let connection = new SMTPConnection(options);\n let returned = false;\n\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n connection.close();\n return callback(err);\n });\n\n connection.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(new Error('Connection closed'));\n });\n\n let finalize = () => {\n if (returned) {\n return;\n }\n returned = true;\n connection.quit();\n return callback(null, true);\n };\n\n connection.connect(() => {\n if (returned) {\n return;\n }\n\n let authData = this.getAuth({});\n\n if (authData && (connection.allowsAuth || options.forceAuth)) {\n connection.login(authData, err => {\n if (returned) {\n return;\n }\n\n if (err) {\n returned = true;\n connection.close();\n return callback(err);\n }\n\n finalize();\n });\n } else if (!authData && connection.allowsAuth && options.forceAuth) {\n let err = new Error('Authentication info was not provided');\n err.code = 'NoAuth';\n\n returned = true;\n connection.close();\n return callback(err);\n } else {\n finalize();\n }\n });\n });\n\n return promise;\n }\n\n /**\n * Releases resources\n */\n close() {\n if (this.auth && this.auth.oauth2) {\n this.auth.oauth2.removeAllListeners();\n }\n this.emit('close');\n }\n}\n\n// expose to the world\nmodule.exports = SMTPTransport;\n","'use strict';\n\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\n\n/**\n * Generates a Transport object for streaming\n *\n * Possible options can be the following:\n *\n * * **buffer** if true, then returns the message as a Buffer object instead of a stream\n * * **newline** either 'windows' or 'unix'\n *\n * @constructor\n * @param {Object} optional config parameter\n */\nclass StreamTransport {\n constructor(options) {\n options = options || {};\n\n this.options = options || {};\n\n this.name = 'StreamTransport';\n this.version = packageData.version;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'stream-transport'\n });\n\n this.winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes((options.newline || '').toString().toLowerCase());\n }\n\n /**\n * Compiles a mailcomposer message and forwards it to handler that sends it\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, done) {\n // We probably need this in the output\n mail.message.keepBcc = true;\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s> using %s line breaks',\n messageId,\n recipients.join(', '),\n this.winbreak ? '' : ''\n );\n\n setImmediate(() => {\n let stream;\n\n try {\n stream = mail.message.createReadStream();\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'send',\n messageId\n },\n 'Creating send stream failed for %s. %s',\n messageId,\n E.message\n );\n return done(E);\n }\n\n if (!this.options.buffer) {\n stream.once('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed creating message for %s. %s',\n messageId,\n err.message\n );\n });\n return done(null, {\n envelope: mail.data.envelope || mail.message.getEnvelope(),\n messageId,\n message: stream\n });\n }\n\n let chunks = [];\n let chunklen = 0;\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n stream.once('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed creating message for %s. %s',\n messageId,\n err.message\n );\n return done(err);\n });\n\n stream.on('end', () =>\n done(null, {\n envelope: mail.data.envelope || mail.message.getEnvelope(),\n messageId,\n message: Buffer.concat(chunks, chunklen)\n })\n );\n });\n }\n}\n\nmodule.exports = StreamTransport;\n","'use strict';\n\nconst services = require('./services.json');\nconst normalized = {};\n\nObject.keys(services).forEach(key => {\n let service = services[key];\n\n normalized[normalizeKey(key)] = normalizeService(service);\n\n [].concat(service.aliases || []).forEach(alias => {\n normalized[normalizeKey(alias)] = normalizeService(service);\n });\n\n [].concat(service.domains || []).forEach(domain => {\n normalized[normalizeKey(domain)] = normalizeService(service);\n });\n});\n\nfunction normalizeKey(key) {\n return key.replace(/[^a-zA-Z0-9.-]/g, '').toLowerCase();\n}\n\nfunction normalizeService(service) {\n let filter = ['domains', 'aliases'];\n let response = {};\n\n Object.keys(service).forEach(key => {\n if (filter.indexOf(key) < 0) {\n response[key] = service[key];\n }\n });\n\n return response;\n}\n\n/**\n * Resolves SMTP config for given key. Key can be a name (like 'Gmail'), alias (like 'Google Mail') or\n * an email address (like 'test@googlemail.com').\n *\n * @param {String} key [description]\n * @returns {Object} SMTP config or false if not found\n */\nmodule.exports = function (key) {\n key = normalizeKey(key.split('@').pop());\n return normalized[key] || false;\n};\n","'use strict';\n\nconst Stream = require('stream').Stream;\nconst nmfetch = require('../fetch');\nconst crypto = require('crypto');\nconst shared = require('../shared');\n\n/**\n * XOAUTH2 access_token generator for Gmail.\n * Create client ID for web applications in Google API console to use it.\n * See Offline Access for receiving the needed refreshToken for an user\n * https://developers.google.com/accounts/docs/OAuth2WebServer#offline\n *\n * Usage for generating access tokens with a custom method using provisionCallback:\n * provisionCallback(user, renew, callback)\n * * user is the username to get the token for\n * * renew is a boolean that if true indicates that existing token failed and needs to be renewed\n * * callback is the callback to run with (error, accessToken [, expires])\n * * accessToken is a string\n * * expires is an optional expire time in milliseconds\n * If provisionCallback is used, then Nodemailer does not try to attempt generating the token by itself\n *\n * @constructor\n * @param {Object} options Client information for token generation\n * @param {String} options.user User e-mail address\n * @param {String} options.clientId Client ID value\n * @param {String} options.clientSecret Client secret value\n * @param {String} options.refreshToken Refresh token for an user\n * @param {String} options.accessUrl Endpoint for token generation, defaults to 'https://accounts.google.com/o/oauth2/token'\n * @param {String} options.accessToken An existing valid accessToken\n * @param {String} options.privateKey Private key for JSW\n * @param {Number} options.expires Optional Access Token expire time in ms\n * @param {Number} options.timeout Optional TTL for Access Token in seconds\n * @param {Function} options.provisionCallback Function to run when a new access token is required\n */\nclass XOAuth2 extends Stream {\n constructor(options, logger) {\n super();\n\n this.options = options || {};\n\n if (options && options.serviceClient) {\n if (!options.privateKey || !options.user) {\n setImmediate(() => this.emit('error', new Error('Options \"privateKey\" and \"user\" are required for service account!')));\n return;\n }\n\n let serviceRequestTimeout = Math.min(Math.max(Number(this.options.serviceRequestTimeout) || 0, 0), 3600);\n this.options.serviceRequestTimeout = serviceRequestTimeout || 5 * 60;\n }\n\n this.logger = shared.getLogger(\n {\n logger\n },\n {\n component: this.options.component || 'OAuth2'\n }\n );\n\n this.provisionCallback = typeof this.options.provisionCallback === 'function' ? this.options.provisionCallback : false;\n\n this.options.accessUrl = this.options.accessUrl || 'https://accounts.google.com/o/oauth2/token';\n this.options.customHeaders = this.options.customHeaders || {};\n this.options.customParams = this.options.customParams || {};\n\n this.accessToken = this.options.accessToken || false;\n\n if (this.options.expires && Number(this.options.expires)) {\n this.expires = this.options.expires;\n } else {\n let timeout = Math.max(Number(this.options.timeout) || 0, 0);\n this.expires = (timeout && Date.now() + timeout * 1000) || 0;\n }\n }\n\n /**\n * Returns or generates (if previous has expired) a XOAuth2 token\n *\n * @param {Boolean} renew If false then use cached access token (if available)\n * @param {Function} callback Callback function with error object and token string\n */\n getToken(renew, callback) {\n if (!renew && this.accessToken && (!this.expires || this.expires > Date.now())) {\n return callback(null, this.accessToken);\n }\n\n let generateCallback = (...args) => {\n if (args[0]) {\n this.logger.error(\n {\n err: args[0],\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'renew'\n },\n 'Failed generating new Access Token for %s',\n this.options.user\n );\n } else {\n this.logger.info(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'renew'\n },\n 'Generated new Access Token for %s',\n this.options.user\n );\n }\n callback(...args);\n };\n\n if (this.provisionCallback) {\n this.provisionCallback(this.options.user, !!renew, (err, accessToken, expires) => {\n if (!err && accessToken) {\n this.accessToken = accessToken;\n this.expires = expires || 0;\n }\n generateCallback(err, accessToken);\n });\n } else {\n this.generateToken(generateCallback);\n }\n }\n\n /**\n * Updates token values\n *\n * @param {String} accessToken New access token\n * @param {Number} timeout Access token lifetime in seconds\n *\n * Emits 'token': { user: User email-address, accessToken: the new accessToken, timeout: TTL in seconds}\n */\n updateToken(accessToken, timeout) {\n this.accessToken = accessToken;\n timeout = Math.max(Number(timeout) || 0, 0);\n this.expires = (timeout && Date.now() + timeout * 1000) || 0;\n\n this.emit('token', {\n user: this.options.user,\n accessToken: accessToken || '',\n expires: this.expires\n });\n }\n\n /**\n * Generates a new XOAuth2 token with the credentials provided at initialization\n *\n * @param {Function} callback Callback function with error object and token string\n */\n generateToken(callback) {\n let urlOptions;\n let loggedUrlOptions;\n if (this.options.serviceClient) {\n // service account - https://developers.google.com/identity/protocols/OAuth2ServiceAccount\n let iat = Math.floor(Date.now() / 1000); // unix time\n let tokenData = {\n iss: this.options.serviceClient,\n scope: this.options.scope || 'https://mail.google.com/',\n sub: this.options.user,\n aud: this.options.accessUrl,\n iat,\n exp: iat + this.options.serviceRequestTimeout\n };\n let token;\n try {\n token = this.jwtSignRS256(tokenData);\n } catch (err) {\n return callback(new Error('Can\\x27t generate token. Check your auth options'));\n }\n\n urlOptions = {\n grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n assertion: token\n };\n\n loggedUrlOptions = {\n grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n assertion: tokenData\n };\n } else {\n if (!this.options.refreshToken) {\n return callback(new Error('Can\\x27t create new access token for user'));\n }\n\n // web app - https://developers.google.com/identity/protocols/OAuth2WebServer\n urlOptions = {\n client_id: this.options.clientId || '',\n client_secret: this.options.clientSecret || '',\n refresh_token: this.options.refreshToken,\n grant_type: 'refresh_token'\n };\n\n loggedUrlOptions = {\n client_id: this.options.clientId || '',\n client_secret: (this.options.clientSecret || '').substr(0, 6) + '...',\n refresh_token: (this.options.refreshToken || '').substr(0, 6) + '...',\n grant_type: 'refresh_token'\n };\n }\n\n Object.keys(this.options.customParams).forEach(key => {\n urlOptions[key] = this.options.customParams[key];\n loggedUrlOptions[key] = this.options.customParams[key];\n });\n\n this.logger.debug(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'generate'\n },\n 'Requesting token using: %s',\n JSON.stringify(loggedUrlOptions)\n );\n\n this.postRequest(this.options.accessUrl, urlOptions, this.options, (error, body) => {\n let data;\n\n if (error) {\n return callback(error);\n }\n\n try {\n data = JSON.parse(body.toString());\n } catch (E) {\n return callback(E);\n }\n\n if (!data || typeof data !== 'object') {\n this.logger.debug(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'post'\n },\n 'Response: %s',\n (body || '').toString()\n );\n return callback(new Error('Invalid authentication response'));\n }\n\n let logData = {};\n Object.keys(data).forEach(key => {\n if (key !== 'access_token') {\n logData[key] = data[key];\n } else {\n logData[key] = (data[key] || '').toString().substr(0, 6) + '...';\n }\n });\n\n this.logger.debug(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'post'\n },\n 'Response: %s',\n JSON.stringify(logData)\n );\n\n if (data.error) {\n // Error Response : https://tools.ietf.org/html/rfc6749#section-5.2\n let errorMessage = data.error;\n if (data.error_description) {\n errorMessage += ': ' + data.error_description;\n }\n if (data.error_uri) {\n errorMessage += ' (' + data.error_uri + ')';\n }\n return callback(new Error(errorMessage));\n }\n\n if (data.access_token) {\n this.updateToken(data.access_token, data.expires_in);\n return callback(null, this.accessToken);\n }\n\n return callback(new Error('No access token'));\n });\n }\n\n /**\n * Converts an access_token and user id into a base64 encoded XOAuth2 token\n *\n * @param {String} [accessToken] Access token string\n * @return {String} Base64 encoded token for IMAP or SMTP login\n */\n buildXOAuth2Token(accessToken) {\n let authData = ['user=' + (this.options.user || ''), 'auth=Bearer ' + (accessToken || this.accessToken), '', ''];\n return Buffer.from(authData.join('\\x01'), 'utf-8').toString('base64');\n }\n\n /**\n * Custom POST request handler.\n * This is only needed to keep paths short in Windows – usually this module\n * is a dependency of a dependency and if it tries to require something\n * like the request module the paths get way too long to handle for Windows.\n * As we do only a simple POST request we do not actually require complicated\n * logic support (no redirects, no nothing) anyway.\n *\n * @param {String} url Url to POST to\n * @param {String|Buffer} payload Payload to POST\n * @param {Function} callback Callback function with (err, buff)\n */\n postRequest(url, payload, params, callback) {\n let returned = false;\n\n let chunks = [];\n let chunklen = 0;\n\n let req = nmfetch(url, {\n method: 'post',\n headers: params.customHeaders,\n body: payload,\n allowErrorResponse: true\n });\n\n req.on('readable', () => {\n let chunk;\n while ((chunk = req.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n req.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(err);\n });\n\n req.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(null, Buffer.concat(chunks, chunklen));\n });\n }\n\n /**\n * Encodes a buffer or a string into Base64url format\n *\n * @param {Buffer|String} data The data to convert\n * @return {String} The encoded string\n */\n toBase64URL(data) {\n if (typeof data === 'string') {\n data = Buffer.from(data);\n }\n\n return data\n .toString('base64')\n .replace(/[=]+/g, '') // remove '='s\n .replace(/\\+/g, '-') // '+' → '-'\n .replace(/\\//g, '_'); // '/' → '_'\n }\n\n /**\n * Creates a JSON Web Token signed with RS256 (SHA256 + RSA)\n *\n * @param {Object} payload The payload to include in the generated token\n * @return {String} The generated and signed token\n */\n jwtSignRS256(payload) {\n payload = ['{\"alg\":\"RS256\",\"typ\":\"JWT\"}', JSON.stringify(payload)].map(val => this.toBase64URL(val)).join('.');\n let signature = crypto.createSign('RSA-SHA256').update(payload).sign(this.options.privateKey);\n return payload + '.' + this.toBase64URL(signature);\n }\n}\n\nmodule.exports = XOAuth2;\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","'use strict';\n\nvar parseUrl = require('url').parse;\n\nvar DEFAULT_PORTS = {\n ftp: 21,\n gopher: 70,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443,\n};\n\nvar stringEndsWith = String.prototype.endsWith || function(s) {\n return s.length <= this.length &&\n this.indexOf(s, this.length - s.length) !== -1;\n};\n\n/**\n * @param {string|object} url - The URL, or the result from url.parse.\n * @return {string} The URL of the proxy that should handle the request to the\n * given URL. If no proxy is set, this will be an empty string.\n */\nfunction getProxyForUrl(url) {\n var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {};\n var proto = parsedUrl.protocol;\n var hostname = parsedUrl.host;\n var port = parsedUrl.port;\n if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') {\n return ''; // Don't proxy URLs without a valid scheme or host.\n }\n\n proto = proto.split(':', 1)[0];\n // Stripping ports in this way instead of using parsedUrl.hostname to make\n // sure that the brackets around IPv6 addresses are kept.\n hostname = hostname.replace(/:\\d*$/, '');\n port = parseInt(port) || DEFAULT_PORTS[proto] || 0;\n if (!shouldProxy(hostname, port)) {\n return ''; // Don't proxy URLs that match NO_PROXY.\n }\n\n var proxy =\n getEnv('npm_config_' + proto + '_proxy') ||\n getEnv(proto + '_proxy') ||\n getEnv('npm_config_proxy') ||\n getEnv('all_proxy');\n if (proxy && proxy.indexOf('://') === -1) {\n // Missing scheme in proxy, default to the requested URL's scheme.\n proxy = proto + '://' + proxy;\n }\n return proxy;\n}\n\n/**\n * Determines whether a given URL should be proxied.\n *\n * @param {string} hostname - The host name of the URL.\n * @param {number} port - The effective port of the URL.\n * @returns {boolean} Whether the given URL should be proxied.\n * @private\n */\nfunction shouldProxy(hostname, port) {\n var NO_PROXY =\n (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase();\n if (!NO_PROXY) {\n return true; // Always proxy if NO_PROXY is not set.\n }\n if (NO_PROXY === '*') {\n return false; // Never proxy if wildcard is set.\n }\n\n return NO_PROXY.split(/[,\\s]/).every(function(proxy) {\n if (!proxy) {\n return true; // Skip zero-length hosts.\n }\n var parsedProxy = proxy.match(/^(.+):(\\d+)$/);\n var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;\n var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;\n if (parsedProxyPort && parsedProxyPort !== port) {\n return true; // Skip if ports don't match.\n }\n\n if (!/^[.*]/.test(parsedProxyHostname)) {\n // No wildcards, so stop proxying if there is an exact match.\n return hostname !== parsedProxyHostname;\n }\n\n if (parsedProxyHostname.charAt(0) === '*') {\n // Remove leading wildcard.\n parsedProxyHostname = parsedProxyHostname.slice(1);\n }\n // Stop proxying if the hostname ends with the no_proxy host.\n return !stringEndsWith.call(hostname, parsedProxyHostname);\n });\n}\n\n/**\n * Get the value for an environment variable.\n *\n * @param {string} key - The name of the environment variable.\n * @return {string} The value of the environment variable.\n * @private\n */\nfunction getEnv(key) {\n return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';\n}\n\nexports.getProxyForUrl = getProxyForUrl;\n","/* eslint-disable node/no-deprecated-api */\n\n'use strict'\n\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\nvar safer = {}\n\nvar key\n\nfor (key in buffer) {\n if (!buffer.hasOwnProperty(key)) continue\n if (key === 'SlowBuffer' || key === 'Buffer') continue\n safer[key] = buffer[key]\n}\n\nvar Safer = safer.Buffer = {}\nfor (key in Buffer) {\n if (!Buffer.hasOwnProperty(key)) continue\n if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue\n Safer[key] = Buffer[key]\n}\n\nsafer.Buffer.prototype = Buffer.prototype\n\nif (!Safer.from || Safer.from === Uint8Array.from) {\n Safer.from = function (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('The \"value\" argument must not be of type number. Received type ' + typeof value)\n }\n if (value && typeof value.length === 'undefined') {\n throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)\n }\n return Buffer(value, encodingOrOffset, length)\n }\n}\n\nif (!Safer.alloc) {\n Safer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('The \"size\" argument must be of type number. Received type ' + typeof size)\n }\n if (size < 0 || size >= 2 * (1 << 30)) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n var buf = Buffer(size)\n if (!fill || fill.length === 0) {\n buf.fill(0)\n } else if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n return buf\n }\n}\n\nif (!safer.kStringMaxLength) {\n try {\n safer.kStringMaxLength = process.binding('buffer').kStringMaxLength\n } catch (e) {\n // we can't determine kStringMaxLength in environments where process.binding\n // is unsupported, so let's not set it\n }\n}\n\nif (!safer.constants) {\n safer.constants = {\n MAX_LENGTH: safer.kMaxLength\n }\n if (safer.kStringMaxLength) {\n safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength\n }\n}\n\nmodule.exports = safer\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","\"use strict\";\n\nvar punycode = require(\"punycode\");\nvar mappingTable = require(\"./lib/mappingTable.json\");\n\nvar PROCESSING_OPTIONS = {\n TRANSITIONAL: 0,\n NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n return str.split('\\u0000').map(function (s) { return s.normalize('NFC'); }).join('\\u0000');\n}\n\nfunction findStatus(val) {\n var start = 0;\n var end = mappingTable.length - 1;\n\n while (start <= end) {\n var mid = Math.floor((start + end) / 2);\n\n var target = mappingTable[mid];\n if (target[0][0] <= val && target[0][1] >= val) {\n return target;\n } else if (target[0][0] > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n return string\n // replace every surrogate pair with a BMP symbol\n .replace(regexAstralSymbols, '_')\n // then get the length\n .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n var hasError = false;\n var processed = \"\";\n\n var len = countSymbols(domain_name);\n for (var i = 0; i < len; ++i) {\n var codePoint = domain_name.codePointAt(i);\n var status = findStatus(codePoint);\n\n switch (status[1]) {\n case \"disallowed\":\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n break;\n case \"ignored\":\n break;\n case \"mapped\":\n processed += String.fromCodePoint.apply(String, status[2]);\n break;\n case \"deviation\":\n if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n processed += String.fromCodePoint.apply(String, status[2]);\n } else {\n processed += String.fromCodePoint(codePoint);\n }\n break;\n case \"valid\":\n processed += String.fromCodePoint(codePoint);\n break;\n case \"disallowed_STD3_mapped\":\n if (useSTD3) {\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n } else {\n processed += String.fromCodePoint.apply(String, status[2]);\n }\n break;\n case \"disallowed_STD3_valid\":\n if (useSTD3) {\n hasError = true;\n }\n\n processed += String.fromCodePoint(codePoint);\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n if (label.substr(0, 4) === \"xn--\") {\n label = punycode.toUnicode(label);\n processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n }\n\n var error = false;\n\n if (normalize(label) !== label ||\n (label[3] === \"-\" && label[4] === \"-\") ||\n label[0] === \"-\" || label[label.length - 1] === \"-\" ||\n label.indexOf(\".\") !== -1 ||\n label.search(combiningMarksRegex) === 0) {\n error = true;\n }\n\n var len = countSymbols(label);\n for (var i = 0; i < len; ++i) {\n var status = findStatus(label.codePointAt(i));\n if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== \"valid\") ||\n (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n status[1] !== \"valid\" && status[1] !== \"deviation\")) {\n error = true;\n break;\n }\n }\n\n return {\n label: label,\n error: error\n };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n var result = mapChars(domain_name, useSTD3, processing_option);\n result.string = normalize(result.string);\n\n var labels = result.string.split(\".\");\n for (var i = 0; i < labels.length; ++i) {\n try {\n var validation = validateLabel(labels[i]);\n labels[i] = validation.label;\n result.error = result.error || validation.error;\n } catch(e) {\n result.error = true;\n }\n }\n\n return {\n string: labels.join(\".\"),\n error: result.error\n };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n var result = processing(domain_name, useSTD3, processing_option);\n var labels = result.string.split(\".\");\n labels = labels.map(function(l) {\n try {\n return punycode.toASCII(l);\n } catch(e) {\n result.error = true;\n return l;\n }\n });\n\n if (verifyDnsLength) {\n var total = labels.slice(0, labels.length - 1).join(\".\").length;\n if (total.length > 253 || total.length === 0) {\n result.error = true;\n }\n\n for (var i=0; i < labels.length; ++i) {\n if (labels.length > 63 || labels.length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) return null;\n return labels.join(\".\");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n return {\n domain: result.string,\n error: result.error\n };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","'use strict'\n\nconst Client = require('./lib/client')\nconst Dispatcher = require('./lib/dispatcher')\nconst errors = require('./lib/core/errors')\nconst Pool = require('./lib/pool')\nconst BalancedPool = require('./lib/balanced-pool')\nconst Agent = require('./lib/agent')\nconst util = require('./lib/core/util')\nconst { InvalidArgumentError } = errors\nconst api = require('./lib/api')\nconst buildConnector = require('./lib/core/connect')\nconst MockClient = require('./lib/mock/mock-client')\nconst MockAgent = require('./lib/mock/mock-agent')\nconst MockPool = require('./lib/mock/mock-pool')\nconst mockErrors = require('./lib/mock/mock-errors')\nconst ProxyAgent = require('./lib/proxy-agent')\nconst RetryHandler = require('./lib/handler/RetryHandler')\nconst { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')\nconst DecoratorHandler = require('./lib/handler/DecoratorHandler')\nconst RedirectHandler = require('./lib/handler/RedirectHandler')\nconst createRedirectInterceptor = require('./lib/interceptor/redirectInterceptor')\n\nlet hasCrypto\ntry {\n require('crypto')\n hasCrypto = true\n} catch {\n hasCrypto = false\n}\n\nObject.assign(Dispatcher.prototype, api)\n\nmodule.exports.Dispatcher = Dispatcher\nmodule.exports.Client = Client\nmodule.exports.Pool = Pool\nmodule.exports.BalancedPool = BalancedPool\nmodule.exports.Agent = Agent\nmodule.exports.ProxyAgent = ProxyAgent\nmodule.exports.RetryHandler = RetryHandler\n\nmodule.exports.DecoratorHandler = DecoratorHandler\nmodule.exports.RedirectHandler = RedirectHandler\nmodule.exports.createRedirectInterceptor = createRedirectInterceptor\n\nmodule.exports.buildConnector = buildConnector\nmodule.exports.errors = errors\n\nfunction makeDispatcher (fn) {\n return (url, opts, handler) => {\n if (typeof opts === 'function') {\n handler = opts\n opts = null\n }\n\n if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) {\n throw new InvalidArgumentError('invalid url')\n }\n\n if (opts != null && typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (opts && opts.path != null) {\n if (typeof opts.path !== 'string') {\n throw new InvalidArgumentError('invalid opts.path')\n }\n\n let path = opts.path\n if (!opts.path.startsWith('/')) {\n path = `/${path}`\n }\n\n url = new URL(util.parseOrigin(url).origin + path)\n } else {\n if (!opts) {\n opts = typeof url === 'object' ? url : {}\n }\n\n url = util.parseURL(url)\n }\n\n const { agent, dispatcher = getGlobalDispatcher() } = opts\n\n if (agent) {\n throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')\n }\n\n return fn.call(dispatcher, {\n ...opts,\n origin: url.origin,\n path: url.search ? `${url.pathname}${url.search}` : url.pathname,\n method: opts.method || (opts.body ? 'PUT' : 'GET')\n }, handler)\n }\n}\n\nmodule.exports.setGlobalDispatcher = setGlobalDispatcher\nmodule.exports.getGlobalDispatcher = getGlobalDispatcher\n\nif (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) {\n let fetchImpl = null\n module.exports.fetch = async function fetch (resource) {\n if (!fetchImpl) {\n fetchImpl = require('./lib/fetch').fetch\n }\n\n try {\n return await fetchImpl(...arguments)\n } catch (err) {\n if (typeof err === 'object') {\n Error.captureStackTrace(err, this)\n }\n\n throw err\n }\n }\n module.exports.Headers = require('./lib/fetch/headers').Headers\n module.exports.Response = require('./lib/fetch/response').Response\n module.exports.Request = require('./lib/fetch/request').Request\n module.exports.FormData = require('./lib/fetch/formdata').FormData\n module.exports.File = require('./lib/fetch/file').File\n module.exports.FileReader = require('./lib/fileapi/filereader').FileReader\n\n const { setGlobalOrigin, getGlobalOrigin } = require('./lib/fetch/global')\n\n module.exports.setGlobalOrigin = setGlobalOrigin\n module.exports.getGlobalOrigin = getGlobalOrigin\n\n const { CacheStorage } = require('./lib/cache/cachestorage')\n const { kConstruct } = require('./lib/cache/symbols')\n\n // Cache & CacheStorage are tightly coupled with fetch. Even if it may run\n // in an older version of Node, it doesn't have any use without fetch.\n module.exports.caches = new CacheStorage(kConstruct)\n}\n\nif (util.nodeMajor >= 16) {\n const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/cookies')\n\n module.exports.deleteCookie = deleteCookie\n module.exports.getCookies = getCookies\n module.exports.getSetCookies = getSetCookies\n module.exports.setCookie = setCookie\n\n const { parseMIMEType, serializeAMimeType } = require('./lib/fetch/dataURL')\n\n module.exports.parseMIMEType = parseMIMEType\n module.exports.serializeAMimeType = serializeAMimeType\n}\n\nif (util.nodeMajor >= 18 && hasCrypto) {\n const { WebSocket } = require('./lib/websocket/websocket')\n\n module.exports.WebSocket = WebSocket\n}\n\nmodule.exports.request = makeDispatcher(api.request)\nmodule.exports.stream = makeDispatcher(api.stream)\nmodule.exports.pipeline = makeDispatcher(api.pipeline)\nmodule.exports.connect = makeDispatcher(api.connect)\nmodule.exports.upgrade = makeDispatcher(api.upgrade)\n\nmodule.exports.MockClient = MockClient\nmodule.exports.MockPool = MockPool\nmodule.exports.MockAgent = MockAgent\nmodule.exports.mockErrors = mockErrors\n","'use strict'\n\nconst { InvalidArgumentError } = require('./core/errors')\nconst { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require('./core/symbols')\nconst DispatcherBase = require('./dispatcher-base')\nconst Pool = require('./pool')\nconst Client = require('./client')\nconst util = require('./core/util')\nconst createRedirectInterceptor = require('./interceptor/redirectInterceptor')\nconst { WeakRef, FinalizationRegistry } = require('./compat/dispatcher-weakref')()\n\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kMaxRedirections = Symbol('maxRedirections')\nconst kOnDrain = Symbol('onDrain')\nconst kFactory = Symbol('factory')\nconst kFinalizer = Symbol('finalizer')\nconst kOptions = Symbol('options')\n\nfunction defaultFactory (origin, opts) {\n return opts && opts.connections === 1\n ? new Client(origin, opts)\n : new Pool(origin, opts)\n}\n\nclass Agent extends DispatcherBase {\n constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {\n super()\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (!Number.isInteger(maxRedirections) || maxRedirections < 0) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n if (connect && typeof connect !== 'function') {\n connect = { ...connect }\n }\n\n this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent)\n ? options.interceptors.Agent\n : [createRedirectInterceptor({ maxRedirections })]\n\n this[kOptions] = { ...util.deepClone(options), connect }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kMaxRedirections] = maxRedirections\n this[kFactory] = factory\n this[kClients] = new Map()\n this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => {\n const ref = this[kClients].get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this[kClients].delete(key)\n }\n })\n\n const agent = this\n\n this[kOnDrain] = (origin, targets) => {\n agent.emit('drain', origin, [agent, ...targets])\n }\n\n this[kOnConnect] = (origin, targets) => {\n agent.emit('connect', origin, [agent, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n agent.emit('disconnect', origin, [agent, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n agent.emit('connectionError', origin, [agent, ...targets], err)\n }\n }\n\n get [kRunning] () {\n let ret = 0\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore next: gc is undeterministic */\n if (client) {\n ret += client[kRunning]\n }\n }\n return ret\n }\n\n [kDispatch] (opts, handler) {\n let key\n if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {\n key = String(opts.origin)\n } else {\n throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')\n }\n\n const ref = this[kClients].get(key)\n\n let dispatcher = ref ? ref.deref() : null\n if (!dispatcher) {\n dispatcher = this[kFactory](opts.origin, this[kOptions])\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].set(key, new WeakRef(dispatcher))\n this[kFinalizer].register(dispatcher, key)\n }\n\n return dispatcher.dispatch(opts, handler)\n }\n\n async [kClose] () {\n const closePromises = []\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore else: gc is undeterministic */\n if (client) {\n closePromises.push(client.close())\n }\n }\n\n await Promise.all(closePromises)\n }\n\n async [kDestroy] (err) {\n const destroyPromises = []\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore else: gc is undeterministic */\n if (client) {\n destroyPromises.push(client.destroy(err))\n }\n }\n\n await Promise.all(destroyPromises)\n }\n}\n\nmodule.exports = Agent\n","const { addAbortListener } = require('../core/util')\nconst { RequestAbortedError } = require('../core/errors')\n\nconst kListener = Symbol('kListener')\nconst kSignal = Symbol('kSignal')\n\nfunction abort (self) {\n if (self.abort) {\n self.abort()\n } else {\n self.onError(new RequestAbortedError())\n }\n}\n\nfunction addSignal (self, signal) {\n self[kSignal] = null\n self[kListener] = null\n\n if (!signal) {\n return\n }\n\n if (signal.aborted) {\n abort(self)\n return\n }\n\n self[kSignal] = signal\n self[kListener] = () => {\n abort(self)\n }\n\n addAbortListener(self[kSignal], self[kListener])\n}\n\nfunction removeSignal (self) {\n if (!self[kSignal]) {\n return\n }\n\n if ('removeEventListener' in self[kSignal]) {\n self[kSignal].removeEventListener('abort', self[kListener])\n } else {\n self[kSignal].removeListener('abort', self[kListener])\n }\n\n self[kSignal] = null\n self[kListener] = null\n}\n\nmodule.exports = {\n addSignal,\n removeSignal\n}\n","'use strict'\n\nconst { AsyncResource } = require('async_hooks')\nconst { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass ConnectHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_CONNECT')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.callback = callback\n this.abort = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders () {\n throw new SocketError('bad connect', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n\n let headers = rawHeaders\n // Indicates is an HTTP2Session\n if (headers != null) {\n headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n }\n\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction connect (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n connect.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const connectHandler = new ConnectHandler(opts, callback)\n this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = connect\n","'use strict'\n\nconst {\n Readable,\n Duplex,\n PassThrough\n} = require('stream')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('assert')\n\nconst kResume = Symbol('resume')\n\nclass PipelineRequest extends Readable {\n constructor () {\n super({ autoDestroy: true })\n\n this[kResume] = null\n }\n\n _read () {\n const { [kResume]: resume } = this\n\n if (resume) {\n this[kResume] = null\n resume()\n }\n }\n\n _destroy (err, callback) {\n this._read()\n\n callback(err)\n }\n}\n\nclass PipelineResponse extends Readable {\n constructor (resume) {\n super({ autoDestroy: true })\n this[kResume] = resume\n }\n\n _read () {\n this[kResume]()\n }\n\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n callback(err)\n }\n}\n\nclass PipelineHandler extends AsyncResource {\n constructor (opts, handler) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof handler !== 'function') {\n throw new InvalidArgumentError('invalid handler')\n }\n\n const { signal, method, opaque, onInfo, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_PIPELINE')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.handler = handler\n this.abort = null\n this.context = null\n this.onInfo = onInfo || null\n\n this.req = new PipelineRequest().on('error', util.nop)\n\n this.ret = new Duplex({\n readableObjectMode: opts.objectMode,\n autoDestroy: true,\n read: () => {\n const { body } = this\n\n if (body && body.resume) {\n body.resume()\n }\n },\n write: (chunk, encoding, callback) => {\n const { req } = this\n\n if (req.push(chunk, encoding) || req._readableState.destroyed) {\n callback()\n } else {\n req[kResume] = callback\n }\n },\n destroy: (err, callback) => {\n const { body, req, res, ret, abort } = this\n\n if (!err && !ret._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (abort && err) {\n abort()\n }\n\n util.destroy(body, err)\n util.destroy(req, err)\n util.destroy(res, err)\n\n removeSignal(this)\n\n callback(err)\n }\n }).on('prefinish', () => {\n const { req } = this\n\n // Node < 15 does not call _final in same tick.\n req.push(null)\n })\n\n this.res = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n const { ret, res } = this\n\n assert(!res, 'pipeline cannot be retried')\n\n if (ret.destroyed) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume) {\n const { opaque, handler, context } = this\n\n if (statusCode < 200) {\n if (this.onInfo) {\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.res = new PipelineResponse(resume)\n\n let body\n try {\n this.handler = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n body = this.runInAsyncScope(handler, null, {\n statusCode,\n headers,\n opaque,\n body: this.res,\n context\n })\n } catch (err) {\n this.res.on('error', util.nop)\n throw err\n }\n\n if (!body || typeof body.on !== 'function') {\n throw new InvalidReturnValueError('expected Readable')\n }\n\n body\n .on('data', (chunk) => {\n const { ret, body } = this\n\n if (!ret.push(chunk) && body.pause) {\n body.pause()\n }\n })\n .on('error', (err) => {\n const { ret } = this\n\n util.destroy(ret, err)\n })\n .on('end', () => {\n const { ret } = this\n\n ret.push(null)\n })\n .on('close', () => {\n const { ret } = this\n\n if (!ret._readableState.ended) {\n util.destroy(ret, new RequestAbortedError())\n }\n })\n\n this.body = body\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n res.push(null)\n }\n\n onError (err) {\n const { ret } = this\n this.handler = null\n util.destroy(ret, err)\n }\n}\n\nfunction pipeline (opts, handler) {\n try {\n const pipelineHandler = new PipelineHandler(opts, handler)\n this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)\n return pipelineHandler.ret\n } catch (err) {\n return new PassThrough().destroy(err)\n }\n}\n\nmodule.exports = pipeline\n","'use strict'\n\nconst Readable = require('./readable')\nconst {\n InvalidArgumentError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass RequestHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) {\n throw new InvalidArgumentError('invalid highWaterMark')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_REQUEST')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.res = null\n this.abort = null\n this.body = body\n this.trailers = {}\n this.context = null\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError\n this.highWaterMark = highWaterMark\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n const body = new Readable({ resume, abort, contentType, highWaterMark })\n\n this.callback = null\n this.res = body\n if (callback !== null) {\n if (this.throwOnError && statusCode >= 400) {\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body, contentType, statusCode, statusMessage, headers }\n )\n } else {\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n trailers: this.trailers,\n opaque,\n body,\n context\n })\n }\n }\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n util.parseHeaders(trailers, this.trailers)\n\n res.push(null)\n }\n\n onError (err) {\n const { res, callback, body, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n // TODO: Does this need queueMicrotask?\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (res) {\n this.res = null\n // Ensure all queued handlers are invoked before destroying res.\n queueMicrotask(() => {\n util.destroy(res, err)\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction request (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n request.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new RequestHandler(opts, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = request\nmodule.exports.RequestHandler = RequestHandler\n","'use strict'\n\nconst { finished, PassThrough } = require('stream')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass StreamHandler extends AsyncResource {\n constructor (opts, factory, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('invalid factory')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_STREAM')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.factory = factory\n this.callback = callback\n this.res = null\n this.abort = null\n this.context = null\n this.trailers = null\n this.body = body\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError || false\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { factory, opaque, context, callback, responseHeaders } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.factory = null\n\n let res\n\n if (this.throwOnError && statusCode >= 400) {\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n res = new PassThrough()\n\n this.callback = null\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body: res, contentType, statusCode, statusMessage, headers }\n )\n } else {\n if (factory === null) {\n return\n }\n\n res = this.runInAsyncScope(factory, null, {\n statusCode,\n headers,\n opaque,\n context\n })\n\n if (\n !res ||\n typeof res.write !== 'function' ||\n typeof res.end !== 'function' ||\n typeof res.on !== 'function'\n ) {\n throw new InvalidReturnValueError('expected Writable')\n }\n\n // TODO: Avoid finished. It registers an unnecessary amount of listeners.\n finished(res, { readable: false }, (err) => {\n const { callback, res, opaque, trailers, abort } = this\n\n this.res = null\n if (err || !res.readable) {\n util.destroy(res, err)\n }\n\n this.callback = null\n this.runInAsyncScope(callback, null, err || null, { opaque, trailers })\n\n if (err) {\n abort()\n }\n })\n }\n\n res.on('drain', resume)\n\n this.res = res\n\n const needDrain = res.writableNeedDrain !== undefined\n ? res.writableNeedDrain\n : res._writableState && res._writableState.needDrain\n\n return needDrain !== true\n }\n\n onData (chunk) {\n const { res } = this\n\n return res ? res.write(chunk) : true\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n if (!res) {\n return\n }\n\n this.trailers = util.parseHeaders(trailers)\n\n res.end()\n }\n\n onError (err) {\n const { res, callback, opaque, body } = this\n\n removeSignal(this)\n\n this.factory = null\n\n if (res) {\n this.res = null\n util.destroy(res, err)\n } else if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction stream (opts, factory, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n stream.call(this, opts, factory, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new StreamHandler(opts, factory, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = stream\n","'use strict'\n\nconst { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')\nconst { AsyncResource } = require('async_hooks')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('assert')\n\nclass UpgradeHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_UPGRADE')\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.abort = null\n this.context = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = null\n }\n\n onHeaders () {\n throw new SocketError('bad upgrade', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n assert.strictEqual(statusCode, 101)\n\n removeSignal(this)\n\n this.callback = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.runInAsyncScope(callback, null, null, {\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction upgrade (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n upgrade.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const upgradeHandler = new UpgradeHandler(opts, callback)\n this.dispatch({\n ...opts,\n method: opts.method || 'GET',\n upgrade: opts.protocol || 'Websocket'\n }, upgradeHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = upgrade\n","'use strict'\n\nmodule.exports.request = require('./api-request')\nmodule.exports.stream = require('./api-stream')\nmodule.exports.pipeline = require('./api-pipeline')\nmodule.exports.upgrade = require('./api-upgrade')\nmodule.exports.connect = require('./api-connect')\n","// Ported from https://github.com/nodejs/undici/pull/907\n\n'use strict'\n\nconst assert = require('assert')\nconst { Readable } = require('stream')\nconst { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require('../core/errors')\nconst util = require('../core/util')\nconst { ReadableStreamFrom, toUSVString } = require('../core/util')\n\nlet Blob\n\nconst kConsume = Symbol('kConsume')\nconst kReading = Symbol('kReading')\nconst kBody = Symbol('kBody')\nconst kAbort = Symbol('abort')\nconst kContentType = Symbol('kContentType')\n\nconst noop = () => {}\n\nmodule.exports = class BodyReadable extends Readable {\n constructor ({\n resume,\n abort,\n contentType = '',\n highWaterMark = 64 * 1024 // Same as nodejs fs streams.\n }) {\n super({\n autoDestroy: true,\n read: resume,\n highWaterMark\n })\n\n this._readableState.dataEmitted = false\n\n this[kAbort] = abort\n this[kConsume] = null\n this[kBody] = null\n this[kContentType] = contentType\n\n // Is stream being consumed through Readable API?\n // This is an optimization so that we avoid checking\n // for 'data' and 'readable' listeners in the hot path\n // inside push().\n this[kReading] = false\n }\n\n destroy (err) {\n if (this.destroyed) {\n // Node < 16\n return this\n }\n\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (err) {\n this[kAbort]()\n }\n\n return super.destroy(err)\n }\n\n emit (ev, ...args) {\n if (ev === 'data') {\n // Node < 16.7\n this._readableState.dataEmitted = true\n } else if (ev === 'error') {\n // Node < 16\n this._readableState.errorEmitted = true\n }\n return super.emit(ev, ...args)\n }\n\n on (ev, ...args) {\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = true\n }\n return super.on(ev, ...args)\n }\n\n addListener (ev, ...args) {\n return this.on(ev, ...args)\n }\n\n off (ev, ...args) {\n const ret = super.off(ev, ...args)\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = (\n this.listenerCount('data') > 0 ||\n this.listenerCount('readable') > 0\n )\n }\n return ret\n }\n\n removeListener (ev, ...args) {\n return this.off(ev, ...args)\n }\n\n push (chunk) {\n if (this[kConsume] && chunk !== null && this.readableLength === 0) {\n consumePush(this[kConsume], chunk)\n return this[kReading] ? super.push(chunk) : true\n }\n return super.push(chunk)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-text\n async text () {\n return consume(this, 'text')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-json\n async json () {\n return consume(this, 'json')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-blob\n async blob () {\n return consume(this, 'blob')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-arraybuffer\n async arrayBuffer () {\n return consume(this, 'arrayBuffer')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-formdata\n async formData () {\n // TODO: Implement.\n throw new NotSupportedError()\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-bodyused\n get bodyUsed () {\n return util.isDisturbed(this)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-body\n get body () {\n if (!this[kBody]) {\n this[kBody] = ReadableStreamFrom(this)\n if (this[kConsume]) {\n // TODO: Is this the best way to force a lock?\n this[kBody].getReader() // Ensure stream is locked.\n assert(this[kBody].locked)\n }\n }\n return this[kBody]\n }\n\n dump (opts) {\n let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144\n const signal = opts && opts.signal\n\n if (signal) {\n try {\n if (typeof signal !== 'object' || !('aborted' in signal)) {\n throw new InvalidArgumentError('signal must be an AbortSignal')\n }\n util.throwIfAborted(signal)\n } catch (err) {\n return Promise.reject(err)\n }\n }\n\n if (this.closed) {\n return Promise.resolve(null)\n }\n\n return new Promise((resolve, reject) => {\n const signalListenerCleanup = signal\n ? util.addAbortListener(signal, () => {\n this.destroy()\n })\n : noop\n\n this\n .on('close', function () {\n signalListenerCleanup()\n if (signal && signal.aborted) {\n reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' }))\n } else {\n resolve(null)\n }\n })\n .on('error', noop)\n .on('data', function (chunk) {\n limit -= chunk.length\n if (limit <= 0) {\n this.destroy()\n }\n })\n .resume()\n })\n }\n}\n\n// https://streams.spec.whatwg.org/#readablestream-locked\nfunction isLocked (self) {\n // Consume is an implicit lock.\n return (self[kBody] && self[kBody].locked === true) || self[kConsume]\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction isUnusable (self) {\n return util.isDisturbed(self) || isLocked(self)\n}\n\nasync function consume (stream, type) {\n if (isUnusable(stream)) {\n throw new TypeError('unusable')\n }\n\n assert(!stream[kConsume])\n\n return new Promise((resolve, reject) => {\n stream[kConsume] = {\n type,\n stream,\n resolve,\n reject,\n length: 0,\n body: []\n }\n\n stream\n .on('error', function (err) {\n consumeFinish(this[kConsume], err)\n })\n .on('close', function () {\n if (this[kConsume].body !== null) {\n consumeFinish(this[kConsume], new RequestAbortedError())\n }\n })\n\n process.nextTick(consumeStart, stream[kConsume])\n })\n}\n\nfunction consumeStart (consume) {\n if (consume.body === null) {\n return\n }\n\n const { _readableState: state } = consume.stream\n\n for (const chunk of state.buffer) {\n consumePush(consume, chunk)\n }\n\n if (state.endEmitted) {\n consumeEnd(this[kConsume])\n } else {\n consume.stream.on('end', function () {\n consumeEnd(this[kConsume])\n })\n }\n\n consume.stream.resume()\n\n while (consume.stream.read() != null) {\n // Loop\n }\n}\n\nfunction consumeEnd (consume) {\n const { type, body, resolve, stream, length } = consume\n\n try {\n if (type === 'text') {\n resolve(toUSVString(Buffer.concat(body)))\n } else if (type === 'json') {\n resolve(JSON.parse(Buffer.concat(body)))\n } else if (type === 'arrayBuffer') {\n const dst = new Uint8Array(length)\n\n let pos = 0\n for (const buf of body) {\n dst.set(buf, pos)\n pos += buf.byteLength\n }\n\n resolve(dst.buffer)\n } else if (type === 'blob') {\n if (!Blob) {\n Blob = require('buffer').Blob\n }\n resolve(new Blob(body, { type: stream[kContentType] }))\n }\n\n consumeFinish(consume)\n } catch (err) {\n stream.destroy(err)\n }\n}\n\nfunction consumePush (consume, chunk) {\n consume.length += chunk.length\n consume.body.push(chunk)\n}\n\nfunction consumeFinish (consume, err) {\n if (consume.body === null) {\n return\n }\n\n if (err) {\n consume.reject(err)\n } else {\n consume.resolve()\n }\n\n consume.type = null\n consume.stream = null\n consume.resolve = null\n consume.reject = null\n consume.length = 0\n consume.body = null\n}\n","const assert = require('assert')\nconst {\n ResponseStatusCodeError\n} = require('../core/errors')\nconst { toUSVString } = require('../core/util')\n\nasync function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) {\n assert(body)\n\n let chunks = []\n let limit = 0\n\n for await (const chunk of body) {\n chunks.push(chunk)\n limit += chunk.length\n if (limit > 128 * 1024) {\n chunks = null\n break\n }\n }\n\n if (statusCode === 204 || !contentType || !chunks) {\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))\n return\n }\n\n try {\n if (contentType.startsWith('application/json')) {\n const payload = JSON.parse(toUSVString(Buffer.concat(chunks)))\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))\n return\n }\n\n if (contentType.startsWith('text/')) {\n const payload = toUSVString(Buffer.concat(chunks))\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))\n return\n }\n } catch (err) {\n // Process in a fallback if error\n }\n\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))\n}\n\nmodule.exports = { getResolveErrorBodyCallback }\n","'use strict'\n\nconst {\n BalancedPoolMissingUpstreamError,\n InvalidArgumentError\n} = require('./core/errors')\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Pool = require('./pool')\nconst { kUrl, kInterceptors } = require('./core/symbols')\nconst { parseOrigin } = require('./core/util')\nconst kFactory = Symbol('factory')\n\nconst kOptions = Symbol('options')\nconst kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')\nconst kCurrentWeight = Symbol('kCurrentWeight')\nconst kIndex = Symbol('kIndex')\nconst kWeight = Symbol('kWeight')\nconst kMaxWeightPerServer = Symbol('kMaxWeightPerServer')\nconst kErrorPenalty = Symbol('kErrorPenalty')\n\nfunction getGreatestCommonDivisor (a, b) {\n if (b === 0) return a\n return getGreatestCommonDivisor(b, a % b)\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass BalancedPool extends PoolBase {\n constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {\n super()\n\n this[kOptions] = opts\n this[kIndex] = -1\n this[kCurrentWeight] = 0\n\n this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100\n this[kErrorPenalty] = this[kOptions].errorPenalty || 15\n\n if (!Array.isArray(upstreams)) {\n upstreams = [upstreams]\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool)\n ? opts.interceptors.BalancedPool\n : []\n this[kFactory] = factory\n\n for (const upstream of upstreams) {\n this.addUpstream(upstream)\n }\n this._updateBalancedPoolStats()\n }\n\n addUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n if (this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))) {\n return this\n }\n const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]))\n\n this[kAddClient](pool)\n pool.on('connect', () => {\n pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])\n })\n\n pool.on('connectionError', () => {\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n })\n\n pool.on('disconnect', (...args) => {\n const err = args[2]\n if (err && err.code === 'UND_ERR_SOCKET') {\n // decrease the weight of the pool.\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n }\n })\n\n for (const client of this[kClients]) {\n client[kWeight] = this[kMaxWeightPerServer]\n }\n\n this._updateBalancedPoolStats()\n\n return this\n }\n\n _updateBalancedPoolStats () {\n this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0)\n }\n\n removeUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n const pool = this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n\n if (pool) {\n this[kRemoveClient](pool)\n }\n\n return this\n }\n\n get upstreams () {\n return this[kClients]\n .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)\n .map((p) => p[kUrl].origin)\n }\n\n [kGetDispatcher] () {\n // We validate that pools is greater than 0,\n // otherwise we would have to wait until an upstream\n // is added, which might never happen.\n if (this[kClients].length === 0) {\n throw new BalancedPoolMissingUpstreamError()\n }\n\n const dispatcher = this[kClients].find(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n\n if (!dispatcher) {\n return\n }\n\n const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)\n\n if (allClientsBusy) {\n return\n }\n\n let counter = 0\n\n let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])\n\n while (counter++ < this[kClients].length) {\n this[kIndex] = (this[kIndex] + 1) % this[kClients].length\n const pool = this[kClients][this[kIndex]]\n\n // find pool index with the largest weight\n if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {\n maxWeightIndex = this[kIndex]\n }\n\n // decrease the current weight every `this[kClients].length`.\n if (this[kIndex] === 0) {\n // Set the current weight to the next lower weight.\n this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]\n\n if (this[kCurrentWeight] <= 0) {\n this[kCurrentWeight] = this[kMaxWeightPerServer]\n }\n }\n if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {\n return pool\n }\n }\n\n this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]\n this[kIndex] = maxWeightIndex\n return this[kClients][maxWeightIndex]\n }\n}\n\nmodule.exports = BalancedPool\n","'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { urlEquals, fieldValues: getFieldValues } = require('./util')\nconst { kEnumerableProperty, isDisturbed } = require('../core/util')\nconst { kHeadersList } = require('../core/symbols')\nconst { webidl } = require('../fetch/webidl')\nconst { Response, cloneResponse } = require('../fetch/response')\nconst { Request } = require('../fetch/request')\nconst { kState, kHeaders, kGuard, kRealm } = require('../fetch/symbols')\nconst { fetching } = require('../fetch/index')\nconst { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util')\nconst assert = require('assert')\nconst { getGlobalDispatcher } = require('../global')\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation\n * @typedef {Object} CacheBatchOperation\n * @property {'delete' | 'put'} type\n * @property {any} request\n * @property {any} response\n * @property {import('../../types/cache').CacheQueryOptions} options\n */\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list\n * @typedef {[any, any][]} requestResponseList\n */\n\nclass Cache {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list\n * @type {requestResponseList}\n */\n #relevantRequestResponseList\n\n constructor () {\n if (arguments[0] !== kConstruct) {\n webidl.illegalConstructor()\n }\n\n this.#relevantRequestResponseList = arguments[1]\n }\n\n async match (request, options = {}) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' })\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n const p = await this.matchAll(request, options)\n\n if (p.length === 0) {\n return\n }\n\n return p[0]\n }\n\n async matchAll (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') {\n // 2.2.1\n r = new Request(request)[kState]\n }\n }\n\n // 5.\n // 5.1\n const responses = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n responses.push(requestResponse[1])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n responses.push(requestResponse[1])\n }\n }\n\n // 5.4\n // We don't implement CORs so we don't need to loop over the responses, yay!\n\n // 5.5.1\n const responseList = []\n\n // 5.5.2\n for (const response of responses) {\n // 5.5.2.1\n const responseObject = new Response(response.body?.source ?? null)\n const body = responseObject[kState].body\n responseObject[kState] = response\n responseObject[kState].body = body\n responseObject[kHeaders][kHeadersList] = response.headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n\n responseList.push(responseObject)\n }\n\n // 6.\n return Object.freeze(responseList)\n }\n\n async add (request) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' })\n\n request = webidl.converters.RequestInfo(request)\n\n // 1.\n const requests = [request]\n\n // 2.\n const responseArrayPromise = this.addAll(requests)\n\n // 3.\n return await responseArrayPromise\n }\n\n async addAll (requests) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' })\n\n requests = webidl.converters['sequence'](requests)\n\n // 1.\n const responsePromises = []\n\n // 2.\n const requestList = []\n\n // 3.\n for (const request of requests) {\n if (typeof request === 'string') {\n continue\n }\n\n // 3.1\n const r = request[kState]\n\n // 3.2\n if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Expected http/s scheme when method is not GET.'\n })\n }\n }\n\n // 4.\n /** @type {ReturnType[]} */\n const fetchControllers = []\n\n // 5.\n for (const request of requests) {\n // 5.1\n const r = new Request(request)[kState]\n\n // 5.2\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Expected http/s scheme.'\n })\n }\n\n // 5.4\n r.initiator = 'fetch'\n r.destination = 'subresource'\n\n // 5.5\n requestList.push(r)\n\n // 5.6\n const responsePromise = createDeferredPromise()\n\n // 5.7\n fetchControllers.push(fetching({\n request: r,\n dispatcher: getGlobalDispatcher(),\n processResponse (response) {\n // 1.\n if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Received an invalid status code or the request failed.'\n }))\n } else if (response.headersList.contains('vary')) { // 2.\n // 2.1\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n // 2.2\n for (const fieldValue of fieldValues) {\n // 2.2.1\n if (fieldValue === '*') {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'invalid vary field value'\n }))\n\n for (const controller of fetchControllers) {\n controller.abort()\n }\n\n return\n }\n }\n }\n },\n processResponseEndOfBody (response) {\n // 1.\n if (response.aborted) {\n responsePromise.reject(new DOMException('aborted', 'AbortError'))\n return\n }\n\n // 2.\n responsePromise.resolve(response)\n }\n }))\n\n // 5.8\n responsePromises.push(responsePromise.promise)\n }\n\n // 6.\n const p = Promise.all(responsePromises)\n\n // 7.\n const responses = await p\n\n // 7.1\n const operations = []\n\n // 7.2\n let index = 0\n\n // 7.3\n for (const response of responses) {\n // 7.3.1\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 7.3.2\n request: requestList[index], // 7.3.3\n response // 7.3.4\n }\n\n operations.push(operation) // 7.3.5\n\n index++ // 7.3.6\n }\n\n // 7.5\n const cacheJobPromise = createDeferredPromise()\n\n // 7.6.1\n let errorData = null\n\n // 7.6.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 7.6.3\n queueMicrotask(() => {\n // 7.6.3.1\n if (errorData === null) {\n cacheJobPromise.resolve(undefined)\n } else {\n // 7.6.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n // 7.7\n return cacheJobPromise.promise\n }\n\n async put (request, response) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' })\n\n request = webidl.converters.RequestInfo(request)\n response = webidl.converters.Response(response)\n\n // 1.\n let innerRequest = null\n\n // 2.\n if (request instanceof Request) {\n innerRequest = request[kState]\n } else { // 3.\n innerRequest = new Request(request)[kState]\n }\n\n // 4.\n if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Expected an http/s scheme when method is not GET'\n })\n }\n\n // 5.\n const innerResponse = response[kState]\n\n // 6.\n if (innerResponse.status === 206) {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Got 206 status'\n })\n }\n\n // 7.\n if (innerResponse.headersList.contains('vary')) {\n // 7.1.\n const fieldValues = getFieldValues(innerResponse.headersList.get('vary'))\n\n // 7.2.\n for (const fieldValue of fieldValues) {\n // 7.2.1\n if (fieldValue === '*') {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Got * vary field value'\n })\n }\n }\n }\n\n // 8.\n if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Response body is locked or disturbed'\n })\n }\n\n // 9.\n const clonedResponse = cloneResponse(innerResponse)\n\n // 10.\n const bodyReadPromise = createDeferredPromise()\n\n // 11.\n if (innerResponse.body != null) {\n // 11.1\n const stream = innerResponse.body.stream\n\n // 11.2\n const reader = stream.getReader()\n\n // 11.3\n readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject)\n } else {\n bodyReadPromise.resolve(undefined)\n }\n\n // 12.\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n // 13.\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 14.\n request: innerRequest, // 15.\n response: clonedResponse // 16.\n }\n\n // 17.\n operations.push(operation)\n\n // 19.\n const bytes = await bodyReadPromise.promise\n\n if (clonedResponse.body != null) {\n clonedResponse.body.source = bytes\n }\n\n // 19.1\n const cacheJobPromise = createDeferredPromise()\n\n // 19.2.1\n let errorData = null\n\n // 19.2.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 19.2.3\n queueMicrotask(() => {\n // 19.2.3.1\n if (errorData === null) {\n cacheJobPromise.resolve()\n } else { // 19.2.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n async delete (request, options = {}) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' })\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n /**\n * @type {Request}\n */\n let r = null\n\n if (request instanceof Request) {\n r = request[kState]\n\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return false\n }\n } else {\n assert(typeof request === 'string')\n\n r = new Request(request)[kState]\n }\n\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'delete',\n request: r,\n options\n }\n\n operations.push(operation)\n\n const cacheJobPromise = createDeferredPromise()\n\n let errorData = null\n let requestResponses\n\n try {\n requestResponses = this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n queueMicrotask(() => {\n if (errorData === null) {\n cacheJobPromise.resolve(!!requestResponses?.length)\n } else {\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys\n * @param {any} request\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @returns {readonly Request[]}\n */\n async keys (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n // 2.1\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') { // 2.2\n r = new Request(request)[kState]\n }\n }\n\n // 4.\n const promise = createDeferredPromise()\n\n // 5.\n // 5.1\n const requests = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n // 5.2.1.1\n requests.push(requestResponse[0])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n // 5.3.2.1\n requests.push(requestResponse[0])\n }\n }\n\n // 5.4\n queueMicrotask(() => {\n // 5.4.1\n const requestList = []\n\n // 5.4.2\n for (const request of requests) {\n const requestObject = new Request('https://a')\n requestObject[kState] = request\n requestObject[kHeaders][kHeadersList] = request.headersList\n requestObject[kHeaders][kGuard] = 'immutable'\n requestObject[kRealm] = request.client\n\n // 5.4.2.1\n requestList.push(requestObject)\n }\n\n // 5.4.3\n promise.resolve(Object.freeze(requestList))\n })\n\n return promise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm\n * @param {CacheBatchOperation[]} operations\n * @returns {requestResponseList}\n */\n #batchCacheOperations (operations) {\n // 1.\n const cache = this.#relevantRequestResponseList\n\n // 2.\n const backupCache = [...cache]\n\n // 3.\n const addedItems = []\n\n // 4.1\n const resultList = []\n\n try {\n // 4.2\n for (const operation of operations) {\n // 4.2.1\n if (operation.type !== 'delete' && operation.type !== 'put') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'operation type does not match \"delete\" or \"put\"'\n })\n }\n\n // 4.2.2\n if (operation.type === 'delete' && operation.response != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'delete operation should not have an associated response'\n })\n }\n\n // 4.2.3\n if (this.#queryCache(operation.request, operation.options, addedItems).length) {\n throw new DOMException('???', 'InvalidStateError')\n }\n\n // 4.2.4\n let requestResponses\n\n // 4.2.5\n if (operation.type === 'delete') {\n // 4.2.5.1\n requestResponses = this.#queryCache(operation.request, operation.options)\n\n // TODO: the spec is wrong, this is needed to pass WPTs\n if (requestResponses.length === 0) {\n return []\n }\n\n // 4.2.5.2\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.5.2.1\n cache.splice(idx, 1)\n }\n } else if (operation.type === 'put') { // 4.2.6\n // 4.2.6.1\n if (operation.response == null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'put operation should have an associated response'\n })\n }\n\n // 4.2.6.2\n const r = operation.request\n\n // 4.2.6.3\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'expected http or https scheme'\n })\n }\n\n // 4.2.6.4\n if (r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'not get method'\n })\n }\n\n // 4.2.6.5\n if (operation.options != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'options must not be defined'\n })\n }\n\n // 4.2.6.6\n requestResponses = this.#queryCache(operation.request)\n\n // 4.2.6.7\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.6.7.1\n cache.splice(idx, 1)\n }\n\n // 4.2.6.8\n cache.push([operation.request, operation.response])\n\n // 4.2.6.10\n addedItems.push([operation.request, operation.response])\n }\n\n // 4.2.7\n resultList.push([operation.request, operation.response])\n }\n\n // 4.3\n return resultList\n } catch (e) { // 5.\n // 5.1\n this.#relevantRequestResponseList.length = 0\n\n // 5.2\n this.#relevantRequestResponseList = backupCache\n\n // 5.3\n throw e\n }\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#query-cache\n * @param {any} requestQuery\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @param {requestResponseList} targetStorage\n * @returns {requestResponseList}\n */\n #queryCache (requestQuery, options, targetStorage) {\n /** @type {requestResponseList} */\n const resultList = []\n\n const storage = targetStorage ?? this.#relevantRequestResponseList\n\n for (const requestResponse of storage) {\n const [cachedRequest, cachedResponse] = requestResponse\n if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) {\n resultList.push(requestResponse)\n }\n }\n\n return resultList\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm\n * @param {any} requestQuery\n * @param {any} request\n * @param {any | null} response\n * @param {import('../../types/cache').CacheQueryOptions | undefined} options\n * @returns {boolean}\n */\n #requestMatchesCachedItem (requestQuery, request, response = null, options) {\n // if (options?.ignoreMethod === false && request.method === 'GET') {\n // return false\n // }\n\n const queryURL = new URL(requestQuery.url)\n\n const cachedURL = new URL(request.url)\n\n if (options?.ignoreSearch) {\n cachedURL.search = ''\n\n queryURL.search = ''\n }\n\n if (!urlEquals(queryURL, cachedURL, true)) {\n return false\n }\n\n if (\n response == null ||\n options?.ignoreVary ||\n !response.headersList.contains('vary')\n ) {\n return true\n }\n\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n for (const fieldValue of fieldValues) {\n if (fieldValue === '*') {\n return false\n }\n\n const requestValue = request.headersList.get(fieldValue)\n const queryValue = requestQuery.headersList.get(fieldValue)\n\n // If one has the header and the other doesn't, or one has\n // a different value than the other, return false\n if (requestValue !== queryValue) {\n return false\n }\n }\n\n return true\n }\n}\n\nObject.defineProperties(Cache.prototype, {\n [Symbol.toStringTag]: {\n value: 'Cache',\n configurable: true\n },\n match: kEnumerableProperty,\n matchAll: kEnumerableProperty,\n add: kEnumerableProperty,\n addAll: kEnumerableProperty,\n put: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nconst cacheQueryOptionConverters = [\n {\n key: 'ignoreSearch',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'ignoreMethod',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'ignoreVary',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n]\n\nwebidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters)\n\nwebidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([\n ...cacheQueryOptionConverters,\n {\n key: 'cacheName',\n converter: webidl.converters.DOMString\n }\n])\n\nwebidl.converters.Response = webidl.interfaceConverter(Response)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.RequestInfo\n)\n\nmodule.exports = {\n Cache\n}\n","'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { Cache } = require('./cache')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\n\nclass CacheStorage {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map\n * @type {Map}\n */\n async has (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n // 2.1.1\n // 2.2\n return this.#caches.has(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open\n * @param {string} cacheName\n * @returns {Promise}\n */\n async open (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n // 2.1\n if (this.#caches.has(cacheName)) {\n // await caches.open('v1') !== await caches.open('v1')\n\n // 2.1.1\n const cache = this.#caches.get(cacheName)\n\n // 2.1.1.1\n return new Cache(kConstruct, cache)\n }\n\n // 2.2\n const cache = []\n\n // 2.3\n this.#caches.set(cacheName, cache)\n\n // 2.4\n return new Cache(kConstruct, cache)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete\n * @param {string} cacheName\n * @returns {Promise}\n */\n async delete (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n return this.#caches.delete(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys\n * @returns {string[]}\n */\n async keys () {\n webidl.brandCheck(this, CacheStorage)\n\n // 2.1\n const keys = this.#caches.keys()\n\n // 2.2\n return [...keys]\n }\n}\n\nObject.defineProperties(CacheStorage.prototype, {\n [Symbol.toStringTag]: {\n value: 'CacheStorage',\n configurable: true\n },\n match: kEnumerableProperty,\n has: kEnumerableProperty,\n open: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nmodule.exports = {\n CacheStorage\n}\n","'use strict'\n\nmodule.exports = {\n kConstruct: require('../core/symbols').kConstruct\n}\n","'use strict'\n\nconst assert = require('assert')\nconst { URLSerializer } = require('../fetch/dataURL')\nconst { isValidHeaderName } = require('../fetch/util')\n\n/**\n * @see https://url.spec.whatwg.org/#concept-url-equals\n * @param {URL} A\n * @param {URL} B\n * @param {boolean | undefined} excludeFragment\n * @returns {boolean}\n */\nfunction urlEquals (A, B, excludeFragment = false) {\n const serializedA = URLSerializer(A, excludeFragment)\n\n const serializedB = URLSerializer(B, excludeFragment)\n\n return serializedA === serializedB\n}\n\n/**\n * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262\n * @param {string} header\n */\nfunction fieldValues (header) {\n assert(header !== null)\n\n const values = []\n\n for (let value of header.split(',')) {\n value = value.trim()\n\n if (!value.length) {\n continue\n } else if (!isValidHeaderName(value)) {\n continue\n }\n\n values.push(value)\n }\n\n return values\n}\n\nmodule.exports = {\n urlEquals,\n fieldValues\n}\n","// @ts-check\n\n'use strict'\n\n/* global WebAssembly */\n\nconst assert = require('assert')\nconst net = require('net')\nconst http = require('http')\nconst { pipeline } = require('stream')\nconst util = require('./core/util')\nconst timers = require('./timers')\nconst Request = require('./core/request')\nconst DispatcherBase = require('./dispatcher-base')\nconst {\n RequestContentLengthMismatchError,\n ResponseContentLengthMismatchError,\n InvalidArgumentError,\n RequestAbortedError,\n HeadersTimeoutError,\n HeadersOverflowError,\n SocketError,\n InformationalError,\n BodyTimeoutError,\n HTTPParserError,\n ResponseExceededMaxSizeError,\n ClientDestroyedError\n} = require('./core/errors')\nconst buildConnector = require('./core/connect')\nconst {\n kUrl,\n kReset,\n kServerName,\n kClient,\n kBusy,\n kParser,\n kConnect,\n kBlocking,\n kResuming,\n kRunning,\n kPending,\n kSize,\n kWriting,\n kQueue,\n kConnected,\n kConnecting,\n kNeedDrain,\n kNoRef,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kSocket,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kConnector,\n kMaxRedirections,\n kMaxRequests,\n kCounter,\n kClose,\n kDestroy,\n kDispatch,\n kInterceptors,\n kLocalAddress,\n kMaxResponseSize,\n kHTTPConnVersion,\n // HTTP2\n kHost,\n kHTTP2Session,\n kHTTP2SessionState,\n kHTTP2BuildRequest,\n kHTTP2CopyHeaders,\n kHTTP1BuildRequest\n} = require('./core/symbols')\n\n/** @type {import('http2')} */\nlet http2\ntry {\n http2 = require('http2')\n} catch {\n // @ts-ignore\n http2 = { constants: {} }\n}\n\nconst {\n constants: {\n HTTP2_HEADER_AUTHORITY,\n HTTP2_HEADER_METHOD,\n HTTP2_HEADER_PATH,\n HTTP2_HEADER_SCHEME,\n HTTP2_HEADER_CONTENT_LENGTH,\n HTTP2_HEADER_EXPECT,\n HTTP2_HEADER_STATUS\n }\n} = http2\n\n// Experimental\nlet h2ExperimentalWarned = false\n\nconst FastBuffer = Buffer[Symbol.species]\n\nconst kClosedResolve = Symbol('kClosedResolve')\n\nconst channels = {}\n\ntry {\n const diagnosticsChannel = require('diagnostics_channel')\n channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders')\n channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect')\n channels.connectError = diagnosticsChannel.channel('undici:client:connectError')\n channels.connected = diagnosticsChannel.channel('undici:client:connected')\n} catch {\n channels.sendHeaders = { hasSubscribers: false }\n channels.beforeConnect = { hasSubscribers: false }\n channels.connectError = { hasSubscribers: false }\n channels.connected = { hasSubscribers: false }\n}\n\n/**\n * @type {import('../types/client').default}\n */\nclass Client extends DispatcherBase {\n /**\n *\n * @param {string|URL} url\n * @param {import('../types/client').Client.Options} options\n */\n constructor (url, {\n interceptors,\n maxHeaderSize,\n headersTimeout,\n socketTimeout,\n requestTimeout,\n connectTimeout,\n bodyTimeout,\n idleTimeout,\n keepAlive,\n keepAliveTimeout,\n maxKeepAliveTimeout,\n keepAliveMaxTimeout,\n keepAliveTimeoutThreshold,\n socketPath,\n pipelining,\n tls,\n strictContentLength,\n maxCachedSessions,\n maxRedirections,\n connect,\n maxRequestsPerClient,\n localAddress,\n maxResponseSize,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n // h2\n allowH2,\n maxConcurrentStreams\n } = {}) {\n super()\n\n if (keepAlive !== undefined) {\n throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')\n }\n\n if (socketTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (requestTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (idleTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead')\n }\n\n if (maxKeepAliveTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead')\n }\n\n if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) {\n throw new InvalidArgumentError('invalid maxHeaderSize')\n }\n\n if (socketPath != null && typeof socketPath !== 'string') {\n throw new InvalidArgumentError('invalid socketPath')\n }\n\n if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {\n throw new InvalidArgumentError('invalid connectTimeout')\n }\n\n if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveTimeout')\n }\n\n if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveMaxTimeout')\n }\n\n if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {\n throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold')\n }\n\n if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('headersTimeout must be a positive integer or zero')\n }\n\n if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {\n throw new InvalidArgumentError('maxRequestsPerClient must be a positive number')\n }\n\n if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) {\n throw new InvalidArgumentError('localAddress must be valid string IP address')\n }\n\n if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {\n throw new InvalidArgumentError('maxResponseSize must be a positive number')\n }\n\n if (\n autoSelectFamilyAttemptTimeout != null &&\n (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)\n ) {\n throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number')\n }\n\n // h2\n if (allowH2 != null && typeof allowH2 !== 'boolean') {\n throw new InvalidArgumentError('allowH2 must be a valid boolean value')\n }\n\n if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) {\n throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client)\n ? interceptors.Client\n : [createRedirectInterceptor({ maxRedirections })]\n this[kUrl] = util.parseOrigin(url)\n this[kConnector] = connect\n this[kSocket] = null\n this[kPipelining] = pipelining != null ? pipelining : 1\n this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize\n this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout\n this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout\n this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold\n this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]\n this[kServerName] = null\n this[kLocalAddress] = localAddress != null ? localAddress : null\n this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\\r\\n`\n this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3\n this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3\n this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength\n this[kMaxRedirections] = maxRedirections\n this[kMaxRequests] = maxRequestsPerClient\n this[kClosedResolve] = null\n this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1\n this[kHTTPConnVersion] = 'h1'\n\n // HTTP/2\n this[kHTTP2Session] = null\n this[kHTTP2SessionState] = !allowH2\n ? null\n : {\n // streams: null, // Fixed queue of streams - For future support of `push`\n openStreams: 0, // Keep track of them to decide wether or not unref the session\n maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server\n }\n this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}`\n\n // kQueue is built up of 3 sections separated by\n // the kRunningIdx and kPendingIdx indices.\n // | complete | running | pending |\n // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length\n // kRunningIdx points to the first running element.\n // kPendingIdx points to the first pending element.\n // This implements a fast queue with an amortized\n // time of O(1).\n\n this[kQueue] = []\n this[kRunningIdx] = 0\n this[kPendingIdx] = 0\n }\n\n get pipelining () {\n return this[kPipelining]\n }\n\n set pipelining (value) {\n this[kPipelining] = value\n resume(this, true)\n }\n\n get [kPending] () {\n return this[kQueue].length - this[kPendingIdx]\n }\n\n get [kRunning] () {\n return this[kPendingIdx] - this[kRunningIdx]\n }\n\n get [kSize] () {\n return this[kQueue].length - this[kRunningIdx]\n }\n\n get [kConnected] () {\n return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed\n }\n\n get [kBusy] () {\n const socket = this[kSocket]\n return (\n (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) ||\n (this[kSize] >= (this[kPipelining] || 1)) ||\n this[kPending] > 0\n )\n }\n\n /* istanbul ignore: only used for test */\n [kConnect] (cb) {\n connect(this)\n this.once('connect', cb)\n }\n\n [kDispatch] (opts, handler) {\n const origin = opts.origin || this[kUrl].origin\n\n const request = this[kHTTPConnVersion] === 'h2'\n ? Request[kHTTP2BuildRequest](origin, opts, handler)\n : Request[kHTTP1BuildRequest](origin, opts, handler)\n\n this[kQueue].push(request)\n if (this[kResuming]) {\n // Do nothing.\n } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {\n // Wait a tick in case stream/iterator is ended in the same tick.\n this[kResuming] = 1\n process.nextTick(resume, this)\n } else {\n resume(this, true)\n }\n\n if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {\n this[kNeedDrain] = 2\n }\n\n return this[kNeedDrain] < 2\n }\n\n async [kClose] () {\n // TODO: for H2 we need to gracefully flush the remaining enqueued\n // request and close each stream.\n return new Promise((resolve) => {\n if (!this[kSize]) {\n resolve(null)\n } else {\n this[kClosedResolve] = resolve\n }\n })\n }\n\n async [kDestroy] (err) {\n return new Promise((resolve) => {\n const requests = this[kQueue].splice(this[kPendingIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(this, request, err)\n }\n\n const callback = () => {\n if (this[kClosedResolve]) {\n // TODO (fix): Should we error here with ClientDestroyedError?\n this[kClosedResolve]()\n this[kClosedResolve] = null\n }\n resolve()\n }\n\n if (this[kHTTP2Session] != null) {\n util.destroy(this[kHTTP2Session], err)\n this[kHTTP2Session] = null\n this[kHTTP2SessionState] = null\n }\n\n if (!this[kSocket]) {\n queueMicrotask(callback)\n } else {\n util.destroy(this[kSocket].on('close', callback), err)\n }\n\n resume(this)\n })\n }\n}\n\nfunction onHttp2SessionError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kSocket][kError] = err\n\n onError(this[kClient], err)\n}\n\nfunction onHttp2FrameError (type, code, id) {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n\n if (id === 0) {\n this[kSocket][kError] = err\n onError(this[kClient], err)\n }\n}\n\nfunction onHttp2SessionEnd () {\n util.destroy(this, new SocketError('other side closed'))\n util.destroy(this[kSocket], new SocketError('other side closed'))\n}\n\nfunction onHTTP2GoAway (code) {\n const client = this[kClient]\n const err = new InformationalError(`HTTP/2: \"GOAWAY\" frame received with code ${code}`)\n client[kSocket] = null\n client[kHTTP2Session] = null\n\n if (client.destroyed) {\n assert(this[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(this, request, err)\n }\n } else if (client[kRunning] > 0) {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect',\n client[kUrl],\n [client],\n err\n )\n\n resume(client)\n}\n\nconst constants = require('./llhttp/constants')\nconst createRedirectInterceptor = require('./interceptor/redirectInterceptor')\nconst EMPTY_BUF = Buffer.alloc(0)\n\nasync function lazyllhttp () {\n const llhttpWasmData = process.env.JEST_WORKER_ID ? require('./llhttp/llhttp-wasm.js') : undefined\n\n let mod\n try {\n mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd-wasm.js'), 'base64'))\n } catch (e) {\n /* istanbul ignore next */\n\n // We could check if the error was caused by the simd option not\n // being enabled, but the occurring of this other error\n // * https://github.com/emscripten-core/emscripten/issues/11495\n // got me to remove that check to avoid breaking Node 12.\n mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp-wasm.js'), 'base64'))\n }\n\n return await WebAssembly.instantiate(mod, {\n env: {\n /* eslint-disable camelcase */\n\n wasm_on_url: (p, at, len) => {\n /* istanbul ignore next */\n return 0\n },\n wasm_on_status: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_begin: (p) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onMessageBegin() || 0\n },\n wasm_on_header_field: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_header_value: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0\n },\n wasm_on_body: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_complete: (p) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onMessageComplete() || 0\n }\n\n /* eslint-enable camelcase */\n }\n })\n}\n\nlet llhttpInstance = null\nlet llhttpPromise = lazyllhttp()\nllhttpPromise.catch()\n\nlet currentParser = null\nlet currentBufferRef = null\nlet currentBufferSize = 0\nlet currentBufferPtr = null\n\nconst TIMEOUT_HEADERS = 1\nconst TIMEOUT_BODY = 2\nconst TIMEOUT_IDLE = 3\n\nclass Parser {\n constructor (client, socket, { exports }) {\n assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0)\n\n this.llhttp = exports\n this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)\n this.client = client\n this.socket = socket\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n this.statusCode = null\n this.statusText = ''\n this.upgrade = false\n this.headers = []\n this.headersSize = 0\n this.headersMaxSize = client[kMaxHeadersSize]\n this.shouldKeepAlive = false\n this.paused = false\n this.resume = this.resume.bind(this)\n\n this.bytesRead = 0\n\n this.keepAlive = ''\n this.contentLength = ''\n this.connection = ''\n this.maxResponseSize = client[kMaxResponseSize]\n }\n\n setTimeout (value, type) {\n this.timeoutType = type\n if (value !== this.timeoutValue) {\n timers.clearTimeout(this.timeout)\n if (value) {\n this.timeout = timers.setTimeout(onParserTimeout, value, this)\n // istanbul ignore else: only for jest\n if (this.timeout.unref) {\n this.timeout.unref()\n }\n } else {\n this.timeout = null\n }\n this.timeoutValue = value\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n }\n\n resume () {\n if (this.socket.destroyed || !this.paused) {\n return\n }\n\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_resume(this.ptr)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.paused = false\n this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.\n this.readMore()\n }\n\n readMore () {\n while (!this.paused && this.ptr) {\n const chunk = this.socket.read()\n if (chunk === null) {\n break\n }\n this.execute(chunk)\n }\n }\n\n execute (data) {\n assert(this.ptr != null)\n assert(currentParser == null)\n assert(!this.paused)\n\n const { socket, llhttp } = this\n\n if (data.length > currentBufferSize) {\n if (currentBufferPtr) {\n llhttp.free(currentBufferPtr)\n }\n currentBufferSize = Math.ceil(data.length / 4096) * 4096\n currentBufferPtr = llhttp.malloc(currentBufferSize)\n }\n\n new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data)\n\n // Call `execute` on the wasm parser.\n // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,\n // and finally the length of bytes to parse.\n // The return value is an error code or `constants.ERROR.OK`.\n try {\n let ret\n\n try {\n currentBufferRef = data\n currentParser = this\n ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length)\n /* eslint-disable-next-line no-useless-catch */\n } catch (err) {\n /* istanbul ignore next: difficult to make a test case for */\n throw err\n } finally {\n currentParser = null\n currentBufferRef = null\n }\n\n const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr\n\n if (ret === constants.ERROR.PAUSED_UPGRADE) {\n this.onUpgrade(data.slice(offset))\n } else if (ret === constants.ERROR.PAUSED) {\n this.paused = true\n socket.unshift(data.slice(offset))\n } else if (ret !== constants.ERROR.OK) {\n const ptr = llhttp.llhttp_get_error_reason(this.ptr)\n let message = ''\n /* istanbul ignore else: difficult to make a test case for */\n if (ptr) {\n const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)\n message =\n 'Response does not match the HTTP/1.1 protocol (' +\n Buffer.from(llhttp.memory.buffer, ptr, len).toString() +\n ')'\n }\n throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset))\n }\n } catch (err) {\n util.destroy(socket, err)\n }\n }\n\n destroy () {\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_free(this.ptr)\n this.ptr = null\n\n timers.clearTimeout(this.timeout)\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n\n this.paused = false\n }\n\n onStatus (buf) {\n this.statusText = buf.toString()\n }\n\n onMessageBegin () {\n const { socket, client } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n if (!request) {\n return -1\n }\n }\n\n onHeaderField (buf) {\n const len = this.headers.length\n\n if ((len & 1) === 0) {\n this.headers.push(buf)\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n this.trackHeader(buf.length)\n }\n\n onHeaderValue (buf) {\n let len = this.headers.length\n\n if ((len & 1) === 1) {\n this.headers.push(buf)\n len += 1\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n const key = this.headers[len - 2]\n if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') {\n this.keepAlive += buf.toString()\n } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') {\n this.connection += buf.toString()\n } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') {\n this.contentLength += buf.toString()\n }\n\n this.trackHeader(buf.length)\n }\n\n trackHeader (len) {\n this.headersSize += len\n if (this.headersSize >= this.headersMaxSize) {\n util.destroy(this.socket, new HeadersOverflowError())\n }\n }\n\n onUpgrade (head) {\n const { upgrade, client, socket, headers, statusCode } = this\n\n assert(upgrade)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(!socket.destroyed)\n assert(socket === client[kSocket])\n assert(!this.paused)\n assert(request.upgrade || request.method === 'CONNECT')\n\n this.statusCode = null\n this.statusText = ''\n this.shouldKeepAlive = null\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n socket.unshift(head)\n\n socket[kParser].destroy()\n socket[kParser] = null\n\n socket[kClient] = null\n socket[kError] = null\n socket\n .removeListener('error', onSocketError)\n .removeListener('readable', onSocketReadable)\n .removeListener('end', onSocketEnd)\n .removeListener('close', onSocketClose)\n\n client[kSocket] = null\n client[kQueue][client[kRunningIdx]++] = null\n client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))\n\n try {\n request.onUpgrade(statusCode, headers, socket)\n } catch (err) {\n util.destroy(socket, err)\n }\n\n resume(client)\n }\n\n onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {\n const { client, socket, headers, statusText } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n\n /* istanbul ignore next: difficult to make a test case for */\n if (!request) {\n return -1\n }\n\n assert(!this.upgrade)\n assert(this.statusCode < 200)\n\n if (statusCode === 100) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n /* this can only happen if server is misbehaving */\n if (upgrade && !request.upgrade) {\n util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))\n return -1\n }\n\n assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS)\n\n this.statusCode = statusCode\n this.shouldKeepAlive = (\n shouldKeepAlive ||\n // Override llhttp value which does not allow keepAlive for HEAD.\n (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')\n )\n\n if (this.statusCode >= 200) {\n const bodyTimeout = request.bodyTimeout != null\n ? request.bodyTimeout\n : client[kBodyTimeout]\n this.setTimeout(bodyTimeout, TIMEOUT_BODY)\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n if (request.method === 'CONNECT') {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n if (upgrade) {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n if (this.shouldKeepAlive && client[kPipelining]) {\n const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null\n\n if (keepAliveTimeout != null) {\n const timeout = Math.min(\n keepAliveTimeout - client[kKeepAliveTimeoutThreshold],\n client[kKeepAliveMaxTimeout]\n )\n if (timeout <= 0) {\n socket[kReset] = true\n } else {\n client[kKeepAliveTimeoutValue] = timeout\n }\n } else {\n client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]\n }\n } else {\n // Stop more requests from being dispatched.\n socket[kReset] = true\n }\n\n const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false\n\n if (request.aborted) {\n return -1\n }\n\n if (request.method === 'HEAD') {\n return 1\n }\n\n if (statusCode < 200) {\n return 1\n }\n\n if (socket[kBlocking]) {\n socket[kBlocking] = false\n resume(client)\n }\n\n return pause ? constants.ERROR.PAUSED : 0\n }\n\n onBody (buf) {\n const { client, socket, statusCode, maxResponseSize } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert.strictEqual(this.timeoutType, TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n assert(statusCode >= 200)\n\n if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {\n util.destroy(socket, new ResponseExceededMaxSizeError())\n return -1\n }\n\n this.bytesRead += buf.length\n\n if (request.onData(buf) === false) {\n return constants.ERROR.PAUSED\n }\n }\n\n onMessageComplete () {\n const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this\n\n if (socket.destroyed && (!statusCode || shouldKeepAlive)) {\n return -1\n }\n\n if (upgrade) {\n return\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(statusCode >= 100)\n\n this.statusCode = null\n this.statusText = ''\n this.bytesRead = 0\n this.contentLength = ''\n this.keepAlive = ''\n this.connection = ''\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n if (statusCode < 200) {\n return\n }\n\n /* istanbul ignore next: should be handled by llhttp? */\n if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {\n util.destroy(socket, new ResponseContentLengthMismatchError())\n return -1\n }\n\n request.onComplete(headers)\n\n client[kQueue][client[kRunningIdx]++] = null\n\n if (socket[kWriting]) {\n assert.strictEqual(client[kRunning], 0)\n // Response completed before request.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (!shouldKeepAlive) {\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (socket[kReset] && client[kRunning] === 0) {\n // Destroy socket once all requests have completed.\n // The request at the tail of the pipeline is the one\n // that requested reset and no further requests should\n // have been queued since then.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (client[kPipelining] === 1) {\n // We must wait a full event loop cycle to reuse this socket to make sure\n // that non-spec compliant servers are not closing the connection even if they\n // said they won't.\n setImmediate(resume, client)\n } else {\n resume(client)\n }\n }\n}\n\nfunction onParserTimeout (parser) {\n const { socket, timeoutType, client } = parser\n\n /* istanbul ignore else */\n if (timeoutType === TIMEOUT_HEADERS) {\n if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {\n assert(!parser.paused, 'cannot be paused while waiting for headers')\n util.destroy(socket, new HeadersTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_BODY) {\n if (!parser.paused) {\n util.destroy(socket, new BodyTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_IDLE) {\n assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])\n util.destroy(socket, new InformationalError('socket idle timeout'))\n }\n}\n\nfunction onSocketReadable () {\n const { [kParser]: parser } = this\n if (parser) {\n parser.readMore()\n }\n}\n\nfunction onSocketError (err) {\n const { [kClient]: client, [kParser]: parser } = this\n\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n if (client[kHTTPConnVersion] !== 'h2') {\n // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded\n // to the user.\n if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so for as a valid response.\n parser.onMessageComplete()\n return\n }\n }\n\n this[kError] = err\n\n onError(this[kClient], err)\n}\n\nfunction onError (client, err) {\n if (\n client[kRunning] === 0 &&\n err.code !== 'UND_ERR_INFO' &&\n err.code !== 'UND_ERR_SOCKET'\n ) {\n // Error is not caused by running request and not a recoverable\n // socket error.\n\n assert(client[kPendingIdx] === client[kRunningIdx])\n\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(client, request, err)\n }\n assert(client[kSize] === 0)\n }\n}\n\nfunction onSocketEnd () {\n const { [kParser]: parser, [kClient]: client } = this\n\n if (client[kHTTPConnVersion] !== 'h2') {\n if (parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n return\n }\n }\n\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n}\n\nfunction onSocketClose () {\n const { [kClient]: client, [kParser]: parser } = this\n\n if (client[kHTTPConnVersion] === 'h1' && parser) {\n if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n }\n\n this[kParser].destroy()\n this[kParser] = null\n }\n\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n client[kSocket] = null\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(client, request, err)\n }\n } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n resume(client)\n}\n\nasync function connect (client) {\n assert(!client[kConnecting])\n assert(!client[kSocket])\n\n let { host, hostname, protocol, port } = client[kUrl]\n\n // Resolve ipv6\n if (hostname[0] === '[') {\n const idx = hostname.indexOf(']')\n\n assert(idx !== -1)\n const ip = hostname.substring(1, idx)\n\n assert(net.isIP(ip))\n hostname = ip\n }\n\n client[kConnecting] = true\n\n if (channels.beforeConnect.hasSubscribers) {\n channels.beforeConnect.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector]\n })\n }\n\n try {\n const socket = await new Promise((resolve, reject) => {\n client[kConnector]({\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n }, (err, socket) => {\n if (err) {\n reject(err)\n } else {\n resolve(socket)\n }\n })\n })\n\n if (client.destroyed) {\n util.destroy(socket.on('error', () => {}), new ClientDestroyedError())\n return\n }\n\n client[kConnecting] = false\n\n assert(socket)\n\n const isH2 = socket.alpnProtocol === 'h2'\n if (isH2) {\n if (!h2ExperimentalWarned) {\n h2ExperimentalWarned = true\n process.emitWarning('H2 support is experimental, expect them to change at any time.', {\n code: 'UNDICI-H2'\n })\n }\n\n const session = http2.connect(client[kUrl], {\n createConnection: () => socket,\n peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams\n })\n\n client[kHTTPConnVersion] = 'h2'\n session[kClient] = client\n session[kSocket] = socket\n session.on('error', onHttp2SessionError)\n session.on('frameError', onHttp2FrameError)\n session.on('end', onHttp2SessionEnd)\n session.on('goaway', onHTTP2GoAway)\n session.on('close', onSocketClose)\n session.unref()\n\n client[kHTTP2Session] = session\n socket[kHTTP2Session] = session\n } else {\n if (!llhttpInstance) {\n llhttpInstance = await llhttpPromise\n llhttpPromise = null\n }\n\n socket[kNoRef] = false\n socket[kWriting] = false\n socket[kReset] = false\n socket[kBlocking] = false\n socket[kParser] = new Parser(client, socket, llhttpInstance)\n }\n\n socket[kCounter] = 0\n socket[kMaxRequests] = client[kMaxRequests]\n socket[kClient] = client\n socket[kError] = null\n\n socket\n .on('error', onSocketError)\n .on('readable', onSocketReadable)\n .on('end', onSocketEnd)\n .on('close', onSocketClose)\n\n client[kSocket] = socket\n\n if (channels.connected.hasSubscribers) {\n channels.connected.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n socket\n })\n }\n client.emit('connect', client[kUrl], [client])\n } catch (err) {\n if (client.destroyed) {\n return\n }\n\n client[kConnecting] = false\n\n if (channels.connectError.hasSubscribers) {\n channels.connectError.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n error: err\n })\n }\n\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n assert(client[kRunning] === 0)\n while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {\n const request = client[kQueue][client[kPendingIdx]++]\n errorRequest(client, request, err)\n }\n } else {\n onError(client, err)\n }\n\n client.emit('connectionError', client[kUrl], [client], err)\n }\n\n resume(client)\n}\n\nfunction emitDrain (client) {\n client[kNeedDrain] = 0\n client.emit('drain', client[kUrl], [client])\n}\n\nfunction resume (client, sync) {\n if (client[kResuming] === 2) {\n return\n }\n\n client[kResuming] = 2\n\n _resume(client, sync)\n client[kResuming] = 0\n\n if (client[kRunningIdx] > 256) {\n client[kQueue].splice(0, client[kRunningIdx])\n client[kPendingIdx] -= client[kRunningIdx]\n client[kRunningIdx] = 0\n }\n}\n\nfunction _resume (client, sync) {\n while (true) {\n if (client.destroyed) {\n assert(client[kPending] === 0)\n return\n }\n\n if (client[kClosedResolve] && !client[kSize]) {\n client[kClosedResolve]()\n client[kClosedResolve] = null\n return\n }\n\n const socket = client[kSocket]\n\n if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') {\n if (client[kSize] === 0) {\n if (!socket[kNoRef] && socket.unref) {\n socket.unref()\n socket[kNoRef] = true\n }\n } else if (socket[kNoRef] && socket.ref) {\n socket.ref()\n socket[kNoRef] = false\n }\n\n if (client[kSize] === 0) {\n if (socket[kParser].timeoutType !== TIMEOUT_IDLE) {\n socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE)\n }\n } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {\n if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {\n const request = client[kQueue][client[kRunningIdx]]\n const headersTimeout = request.headersTimeout != null\n ? request.headersTimeout\n : client[kHeadersTimeout]\n socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)\n }\n }\n }\n\n if (client[kBusy]) {\n client[kNeedDrain] = 2\n } else if (client[kNeedDrain] === 2) {\n if (sync) {\n client[kNeedDrain] = 1\n process.nextTick(emitDrain, client)\n } else {\n emitDrain(client)\n }\n continue\n }\n\n if (client[kPending] === 0) {\n return\n }\n\n if (client[kRunning] >= (client[kPipelining] || 1)) {\n return\n }\n\n const request = client[kQueue][client[kPendingIdx]]\n\n if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) {\n if (client[kRunning] > 0) {\n return\n }\n\n client[kServerName] = request.servername\n\n if (socket && socket.servername !== request.servername) {\n util.destroy(socket, new InformationalError('servername changed'))\n return\n }\n }\n\n if (client[kConnecting]) {\n return\n }\n\n if (!socket && !client[kHTTP2Session]) {\n connect(client)\n return\n }\n\n if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) {\n return\n }\n\n if (client[kRunning] > 0 && !request.idempotent) {\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return\n }\n\n if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {\n // Don't dispatch an upgrade until all preceding requests have completed.\n // A misbehaving server might upgrade the connection before all pipelined\n // request has completed.\n return\n }\n\n if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body))) {\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return\n }\n\n if (!request.aborted && write(client, request)) {\n client[kPendingIdx]++\n } else {\n client[kQueue].splice(client[kPendingIdx], 1)\n }\n }\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\nfunction write (client, request) {\n if (client[kHTTPConnVersion] === 'h2') {\n writeH2(client, client[kHTTP2Session], request)\n return\n }\n\n const { body, method, path, host, upgrade, headers, blocking, reset } = request\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n const bodyLength = util.bodyLength(body)\n\n let contentLength = bodyLength\n\n if (contentLength === null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 && !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n const socket = client[kSocket]\n\n try {\n request.onConnect((err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n errorRequest(client, request, err || new RequestAbortedError())\n\n util.destroy(socket, new InformationalError('aborted'))\n })\n } catch (err) {\n errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (method === 'HEAD') {\n // https://github.com/mcollina/undici/issues/258\n // Close after a HEAD request to interop with misbehaving servers\n // that may send a body in the response.\n\n socket[kReset] = true\n }\n\n if (upgrade || method === 'CONNECT') {\n // On CONNECT or upgrade, block pipeline from dispatching further\n // requests on this connection.\n\n socket[kReset] = true\n }\n\n if (reset != null) {\n socket[kReset] = reset\n }\n\n if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {\n socket[kReset] = true\n }\n\n if (blocking) {\n socket[kBlocking] = true\n }\n\n let header = `${method} ${path} HTTP/1.1\\r\\n`\n\n if (typeof host === 'string') {\n header += `host: ${host}\\r\\n`\n } else {\n header += client[kHostHeader]\n }\n\n if (upgrade) {\n header += `connection: upgrade\\r\\nupgrade: ${upgrade}\\r\\n`\n } else if (client[kPipelining] && !socket[kReset]) {\n header += 'connection: keep-alive\\r\\n'\n } else {\n header += 'connection: close\\r\\n'\n }\n\n if (headers) {\n header += headers\n }\n\n if (channels.sendHeaders.hasSubscribers) {\n channels.sendHeaders.publish({ request, headers: header, socket })\n }\n\n /* istanbul ignore else: assertion */\n if (!body || bodyLength === 0) {\n if (contentLength === 0) {\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n assert(contentLength === null, 'no body must not have content length')\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n request.onRequestSent()\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(body)\n socket.uncork()\n request.onBodySent(body)\n request.onRequestSent()\n if (!expectsPayload) {\n socket[kReset] = true\n }\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload })\n } else {\n writeBlob({ body, client, request, socket, contentLength, header, expectsPayload })\n }\n } else if (util.isStream(body)) {\n writeStream({ body, client, request, socket, contentLength, header, expectsPayload })\n } else if (util.isIterable(body)) {\n writeIterable({ body, client, request, socket, contentLength, header, expectsPayload })\n } else {\n assert(false)\n }\n\n return true\n}\n\nfunction writeH2 (client, session, request) {\n const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request\n\n let headers\n if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim())\n else headers = reqHeaders\n\n if (upgrade) {\n errorRequest(client, request, new Error('Upgrade not supported for H2'))\n return false\n }\n\n try {\n // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event?\n request.onConnect((err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n errorRequest(client, request, err || new RequestAbortedError())\n })\n } catch (err) {\n errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n /** @type {import('node:http2').ClientHttp2Stream} */\n let stream\n const h2State = client[kHTTP2SessionState]\n\n headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]\n headers[HTTP2_HEADER_METHOD] = method\n\n if (method === 'CONNECT') {\n session.ref()\n // we are already connected, streams are pending, first request\n // will create a new stream. We trigger a request to create the stream and wait until\n // `ready` event is triggered\n // We disabled endStream to allow the user to write to the stream\n stream = session.request(headers, { endStream: false, signal })\n\n if (stream.id && !stream.pending) {\n request.onUpgrade(null, null, stream)\n ++h2State.openStreams\n } else {\n stream.once('ready', () => {\n request.onUpgrade(null, null, stream)\n ++h2State.openStreams\n })\n }\n\n stream.once('close', () => {\n h2State.openStreams -= 1\n // TODO(HTTP/2): unref only if current streams count is 0\n if (h2State.openStreams === 0) session.unref()\n })\n\n return true\n }\n\n // https://tools.ietf.org/html/rfc7540#section-8.3\n // :path and :scheme headers must be omited when sending CONNECT\n\n headers[HTTP2_HEADER_PATH] = path\n headers[HTTP2_HEADER_SCHEME] = 'https'\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n let contentLength = util.bodyLength(body)\n\n if (contentLength == null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 || !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n if (contentLength != null) {\n assert(body, 'no body must not have content length')\n headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`\n }\n\n session.ref()\n\n const shouldEndStream = method === 'GET' || method === 'HEAD'\n if (expectContinue) {\n headers[HTTP2_HEADER_EXPECT] = '100-continue'\n stream = session.request(headers, { endStream: shouldEndStream, signal })\n\n stream.once('continue', writeBodyH2)\n } else {\n stream = session.request(headers, {\n endStream: shouldEndStream,\n signal\n })\n writeBodyH2()\n }\n\n // Increment counter as we have new several streams open\n ++h2State.openStreams\n\n stream.once('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n\n if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) {\n stream.pause()\n }\n })\n\n stream.once('end', () => {\n request.onComplete([])\n })\n\n stream.on('data', (chunk) => {\n if (request.onData(chunk) === false) {\n stream.pause()\n }\n })\n\n stream.once('close', () => {\n h2State.openStreams -= 1\n // TODO(HTTP/2): unref only if current streams count is 0\n if (h2State.openStreams === 0) {\n session.unref()\n }\n })\n\n stream.once('error', function (err) {\n if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) {\n h2State.streams -= 1\n util.destroy(stream, err)\n }\n })\n\n stream.once('frameError', (type, code) => {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n errorRequest(client, request, err)\n\n if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) {\n h2State.streams -= 1\n util.destroy(stream, err)\n }\n })\n\n // stream.on('aborted', () => {\n // // TODO(HTTP/2): Support aborted\n // })\n\n // stream.on('timeout', () => {\n // // TODO(HTTP/2): Support timeout\n // })\n\n // stream.on('push', headers => {\n // // TODO(HTTP/2): Suppor push\n // })\n\n // stream.on('trailers', headers => {\n // // TODO(HTTP/2): Support trailers\n // })\n\n return true\n\n function writeBodyH2 () {\n /* istanbul ignore else: assertion */\n if (!body) {\n request.onRequestSent()\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n stream.cork()\n stream.write(body)\n stream.uncork()\n stream.end()\n request.onBodySent(body)\n request.onRequestSent()\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable({\n client,\n request,\n contentLength,\n h2stream: stream,\n expectsPayload,\n body: body.stream(),\n socket: client[kSocket],\n header: ''\n })\n } else {\n writeBlob({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n h2stream: stream,\n header: '',\n socket: client[kSocket]\n })\n }\n } else if (util.isStream(body)) {\n writeStream({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n socket: client[kSocket],\n h2stream: stream,\n header: ''\n })\n } else if (util.isIterable(body)) {\n writeIterable({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n header: '',\n h2stream: stream,\n socket: client[kSocket]\n })\n } else {\n assert(false)\n }\n }\n}\n\nfunction writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n if (client[kHTTPConnVersion] === 'h2') {\n // For HTTP/2, is enough to pipe the stream\n const pipe = pipeline(\n body,\n h2stream,\n (err) => {\n if (err) {\n util.destroy(body, err)\n util.destroy(h2stream, err)\n } else {\n request.onRequestSent()\n }\n }\n )\n\n pipe.on('data', onPipeData)\n pipe.once('end', () => {\n pipe.removeListener('data', onPipeData)\n util.destroy(pipe)\n })\n\n function onPipeData (chunk) {\n request.onBodySent(chunk)\n }\n\n return\n }\n\n let finished = false\n\n const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })\n\n const onData = function (chunk) {\n if (finished) {\n return\n }\n\n try {\n if (!writer.write(chunk) && this.pause) {\n this.pause()\n }\n } catch (err) {\n util.destroy(this, err)\n }\n }\n const onDrain = function () {\n if (finished) {\n return\n }\n\n if (body.resume) {\n body.resume()\n }\n }\n const onAbort = function () {\n if (finished) {\n return\n }\n const err = new RequestAbortedError()\n queueMicrotask(() => onFinished(err))\n }\n const onFinished = function (err) {\n if (finished) {\n return\n }\n\n finished = true\n\n assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))\n\n socket\n .off('drain', onDrain)\n .off('error', onFinished)\n\n body\n .removeListener('data', onData)\n .removeListener('end', onFinished)\n .removeListener('error', onFinished)\n .removeListener('close', onAbort)\n\n if (!err) {\n try {\n writer.end()\n } catch (er) {\n err = er\n }\n }\n\n writer.destroy(err)\n\n if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {\n util.destroy(body, err)\n } else {\n util.destroy(body)\n }\n }\n\n body\n .on('data', onData)\n .on('end', onFinished)\n .on('error', onFinished)\n .on('close', onAbort)\n\n if (body.resume) {\n body.resume()\n }\n\n socket\n .on('drain', onDrain)\n .on('error', onFinished)\n}\n\nasync function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n const isH2 = client[kHTTPConnVersion] === 'h2'\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n if (isH2) {\n h2stream.cork()\n h2stream.write(buffer)\n h2stream.uncork()\n } else {\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(buffer)\n socket.uncork()\n }\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n resume(client)\n } catch (err) {\n util.destroy(isH2 ? h2stream : socket, err)\n }\n}\n\nasync function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n if (client[kHTTPConnVersion] === 'h2') {\n h2stream\n .on('close', onDrain)\n .on('drain', onDrain)\n\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n const res = h2stream.write(chunk)\n request.onBodySent(chunk)\n if (!res) {\n await waitForDrain()\n }\n }\n } catch (err) {\n h2stream.destroy(err)\n } finally {\n request.onRequestSent()\n h2stream.end()\n h2stream\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n\n return\n }\n\n socket\n .on('close', onDrain)\n .on('drain', onDrain)\n\n const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (!writer.write(chunk)) {\n await waitForDrain()\n }\n }\n\n writer.end()\n } catch (err) {\n writer.destroy(err)\n } finally {\n socket\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nclass AsyncWriter {\n constructor ({ socket, request, contentLength, client, expectsPayload, header }) {\n this.socket = socket\n this.request = request\n this.contentLength = contentLength\n this.client = client\n this.bytesWritten = 0\n this.expectsPayload = expectsPayload\n this.header = header\n\n socket[kWriting] = true\n }\n\n write (chunk) {\n const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return false\n }\n\n const len = Buffer.byteLength(chunk)\n if (!len) {\n return true\n }\n\n // We should defer writing chunks.\n if (contentLength !== null && bytesWritten + len > contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n socket.cork()\n\n if (bytesWritten === 0) {\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n if (contentLength === null) {\n socket.write(`${header}transfer-encoding: chunked\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n }\n }\n\n if (contentLength === null) {\n socket.write(`\\r\\n${len.toString(16)}\\r\\n`, 'latin1')\n }\n\n this.bytesWritten += len\n\n const ret = socket.write(chunk)\n\n socket.uncork()\n\n request.onBodySent(chunk)\n\n if (!ret) {\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n }\n\n return ret\n }\n\n end () {\n const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this\n request.onRequestSent()\n\n socket[kWriting] = false\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return\n }\n\n if (bytesWritten === 0) {\n if (expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD send a Content-Length in a request message when\n // no Transfer-Encoding is sent and the request method defines a meaning\n // for an enclosed payload body.\n\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (contentLength === null) {\n socket.write('\\r\\n0\\r\\n\\r\\n', 'latin1')\n }\n\n if (contentLength !== null && bytesWritten !== contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n } else {\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n }\n\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n\n resume(client)\n }\n\n destroy (err) {\n const { socket, client } = this\n\n socket[kWriting] = false\n\n if (err) {\n assert(client[kRunning] <= 1, 'pipeline should only contain this request')\n util.destroy(socket, err)\n }\n }\n}\n\nfunction errorRequest (client, request, err) {\n try {\n request.onError(err)\n assert(request.aborted)\n } catch (err) {\n client.emit('error', err)\n }\n}\n\nmodule.exports = Client\n","'use strict'\n\n/* istanbul ignore file: only for Node 12 */\n\nconst { kConnected, kSize } = require('../core/symbols')\n\nclass CompatWeakRef {\n constructor (value) {\n this.value = value\n }\n\n deref () {\n return this.value[kConnected] === 0 && this.value[kSize] === 0\n ? undefined\n : this.value\n }\n}\n\nclass CompatFinalizer {\n constructor (finalizer) {\n this.finalizer = finalizer\n }\n\n register (dispatcher, key) {\n if (dispatcher.on) {\n dispatcher.on('disconnect', () => {\n if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {\n this.finalizer(key)\n }\n })\n }\n }\n}\n\nmodule.exports = function () {\n // FIXME: remove workaround when the Node bug is fixed\n // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\n if (process.env.NODE_V8_COVERAGE) {\n return {\n WeakRef: CompatWeakRef,\n FinalizationRegistry: CompatFinalizer\n }\n }\n return {\n WeakRef: global.WeakRef || CompatWeakRef,\n FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer\n }\n}\n","'use strict'\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size\nconst maxAttributeValueSize = 1024\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size\nconst maxNameValuePairSize = 4096\n\nmodule.exports = {\n maxAttributeValueSize,\n maxNameValuePairSize\n}\n","'use strict'\n\nconst { parseSetCookie } = require('./parse')\nconst { stringify, getHeadersList } = require('./util')\nconst { webidl } = require('../fetch/webidl')\nconst { Headers } = require('../fetch/headers')\n\n/**\n * @typedef {Object} Cookie\n * @property {string} name\n * @property {string} value\n * @property {Date|number|undefined} expires\n * @property {number|undefined} maxAge\n * @property {string|undefined} domain\n * @property {string|undefined} path\n * @property {boolean|undefined} secure\n * @property {boolean|undefined} httpOnly\n * @property {'Strict'|'Lax'|'None'} sameSite\n * @property {string[]} unparsed\n */\n\n/**\n * @param {Headers} headers\n * @returns {Record}\n */\nfunction getCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookie = headers.get('cookie')\n const out = {}\n\n if (!cookie) {\n return out\n }\n\n for (const piece of cookie.split(';')) {\n const [name, ...value] = piece.split('=')\n\n out[name.trim()] = value.join('=')\n }\n\n return out\n}\n\n/**\n * @param {Headers} headers\n * @param {string} name\n * @param {{ path?: string, domain?: string }|undefined} attributes\n * @returns {void}\n */\nfunction deleteCookie (headers, name, attributes) {\n webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n name = webidl.converters.DOMString(name)\n attributes = webidl.converters.DeleteCookieAttributes(attributes)\n\n // Matches behavior of\n // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278\n setCookie(headers, {\n name,\n value: '',\n expires: new Date(0),\n ...attributes\n })\n}\n\n/**\n * @param {Headers} headers\n * @returns {Cookie[]}\n */\nfunction getSetCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookies = getHeadersList(headers).cookies\n\n if (!cookies) {\n return []\n }\n\n // In older versions of undici, cookies is a list of name:value.\n return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))\n}\n\n/**\n * @param {Headers} headers\n * @param {Cookie} cookie\n * @returns {void}\n */\nfunction setCookie (headers, cookie) {\n webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n cookie = webidl.converters.Cookie(cookie)\n\n const str = stringify(cookie)\n\n if (str) {\n headers.append('Set-Cookie', stringify(cookie))\n }\n}\n\nwebidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: null\n }\n])\n\nwebidl.converters.Cookie = webidl.dictionaryConverter([\n {\n converter: webidl.converters.DOMString,\n key: 'name'\n },\n {\n converter: webidl.converters.DOMString,\n key: 'value'\n },\n {\n converter: webidl.nullableConverter((value) => {\n if (typeof value === 'number') {\n return webidl.converters['unsigned long long'](value)\n }\n\n return new Date(value)\n }),\n key: 'expires',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters['long long']),\n key: 'maxAge',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'secure',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'httpOnly',\n defaultValue: null\n },\n {\n converter: webidl.converters.USVString,\n key: 'sameSite',\n allowedValues: ['Strict', 'Lax', 'None']\n },\n {\n converter: webidl.sequenceConverter(webidl.converters.DOMString),\n key: 'unparsed',\n defaultValue: []\n }\n])\n\nmodule.exports = {\n getCookies,\n deleteCookie,\n getSetCookies,\n setCookie\n}\n","'use strict'\n\nconst { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')\nconst { isCTLExcludingHtab } = require('./util')\nconst { collectASequenceOfCodePointsFast } = require('../fetch/dataURL')\nconst assert = require('assert')\n\n/**\n * @description Parses the field-value attributes of a set-cookie header string.\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} header\n * @returns if the header is invalid, null will be returned\n */\nfunction parseSetCookie (header) {\n // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F\n // character (CTL characters excluding HTAB): Abort these steps and\n // ignore the set-cookie-string entirely.\n if (isCTLExcludingHtab(header)) {\n return null\n }\n\n let nameValuePair = ''\n let unparsedAttributes = ''\n let name = ''\n let value = ''\n\n // 2. If the set-cookie-string contains a %x3B (\";\") character:\n if (header.includes(';')) {\n // 1. The name-value-pair string consists of the characters up to,\n // but not including, the first %x3B (\";\"), and the unparsed-\n // attributes consist of the remainder of the set-cookie-string\n // (including the %x3B (\";\") in question).\n const position = { position: 0 }\n\n nameValuePair = collectASequenceOfCodePointsFast(';', header, position)\n unparsedAttributes = header.slice(position.position)\n } else {\n // Otherwise:\n\n // 1. The name-value-pair string consists of all the characters\n // contained in the set-cookie-string, and the unparsed-\n // attributes is the empty string.\n nameValuePair = header\n }\n\n // 3. If the name-value-pair string lacks a %x3D (\"=\") character, then\n // the name string is empty, and the value string is the value of\n // name-value-pair.\n if (!nameValuePair.includes('=')) {\n value = nameValuePair\n } else {\n // Otherwise, the name string consists of the characters up to, but\n // not including, the first %x3D (\"=\") character, and the (possibly\n // empty) value string consists of the characters after the first\n // %x3D (\"=\") character.\n const position = { position: 0 }\n name = collectASequenceOfCodePointsFast(\n '=',\n nameValuePair,\n position\n )\n value = nameValuePair.slice(position.position + 1)\n }\n\n // 4. Remove any leading or trailing WSP characters from the name\n // string and the value string.\n name = name.trim()\n value = value.trim()\n\n // 5. If the sum of the lengths of the name string and the value string\n // is more than 4096 octets, abort these steps and ignore the set-\n // cookie-string entirely.\n if (name.length + value.length > maxNameValuePairSize) {\n return null\n }\n\n // 6. The cookie-name is the name string, and the cookie-value is the\n // value string.\n return {\n name, value, ...parseUnparsedAttributes(unparsedAttributes)\n }\n}\n\n/**\n * Parses the remaining attributes of a set-cookie header\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} unparsedAttributes\n * @param {[Object.]={}} cookieAttributeList\n */\nfunction parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) {\n // 1. If the unparsed-attributes string is empty, skip the rest of\n // these steps.\n if (unparsedAttributes.length === 0) {\n return cookieAttributeList\n }\n\n // 2. Discard the first character of the unparsed-attributes (which\n // will be a %x3B (\";\") character).\n assert(unparsedAttributes[0] === ';')\n unparsedAttributes = unparsedAttributes.slice(1)\n\n let cookieAv = ''\n\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n if (unparsedAttributes.includes(';')) {\n // 1. Consume the characters of the unparsed-attributes up to, but\n // not including, the first %x3B (\";\") character.\n cookieAv = collectASequenceOfCodePointsFast(\n ';',\n unparsedAttributes,\n { position: 0 }\n )\n unparsedAttributes = unparsedAttributes.slice(cookieAv.length)\n } else {\n // Otherwise:\n\n // 1. Consume the remainder of the unparsed-attributes.\n cookieAv = unparsedAttributes\n unparsedAttributes = ''\n }\n\n // Let the cookie-av string be the characters consumed in this step.\n\n let attributeName = ''\n let attributeValue = ''\n\n // 4. If the cookie-av string contains a %x3D (\"=\") character:\n if (cookieAv.includes('=')) {\n // 1. The (possibly empty) attribute-name string consists of the\n // characters up to, but not including, the first %x3D (\"=\")\n // character, and the (possibly empty) attribute-value string\n // consists of the characters after the first %x3D (\"=\")\n // character.\n const position = { position: 0 }\n\n attributeName = collectASequenceOfCodePointsFast(\n '=',\n cookieAv,\n position\n )\n attributeValue = cookieAv.slice(position.position + 1)\n } else {\n // Otherwise:\n\n // 1. The attribute-name string consists of the entire cookie-av\n // string, and the attribute-value string is empty.\n attributeName = cookieAv\n }\n\n // 5. Remove any leading or trailing WSP characters from the attribute-\n // name string and the attribute-value string.\n attributeName = attributeName.trim()\n attributeValue = attributeValue.trim()\n\n // 6. If the attribute-value is longer than 1024 octets, ignore the\n // cookie-av string and return to Step 1 of this algorithm.\n if (attributeValue.length > maxAttributeValueSize) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 7. Process the attribute-name and attribute-value according to the\n // requirements in the following subsections. (Notice that\n // attributes with unrecognized attribute-names are ignored.)\n const attributeNameLowercase = attributeName.toLowerCase()\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1\n // If the attribute-name case-insensitively matches the string\n // \"Expires\", the user agent MUST process the cookie-av as follows.\n if (attributeNameLowercase === 'expires') {\n // 1. Let the expiry-time be the result of parsing the attribute-value\n // as cookie-date (see Section 5.1.1).\n const expiryTime = new Date(attributeValue)\n\n // 2. If the attribute-value failed to parse as a cookie date, ignore\n // the cookie-av.\n\n cookieAttributeList.expires = expiryTime\n } else if (attributeNameLowercase === 'max-age') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2\n // If the attribute-name case-insensitively matches the string \"Max-\n // Age\", the user agent MUST process the cookie-av as follows.\n\n // 1. If the first character of the attribute-value is not a DIGIT or a\n // \"-\" character, ignore the cookie-av.\n const charCode = attributeValue.charCodeAt(0)\n\n if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 2. If the remainder of attribute-value contains a non-DIGIT\n // character, ignore the cookie-av.\n if (!/^\\d+$/.test(attributeValue)) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 3. Let delta-seconds be the attribute-value converted to an integer.\n const deltaSeconds = Number(attributeValue)\n\n // 4. Let cookie-age-limit be the maximum age of the cookie (which\n // SHOULD be 400 days or less, see Section 4.1.2.2).\n\n // 5. Set delta-seconds to the smaller of its present value and cookie-\n // age-limit.\n // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs)\n\n // 6. If delta-seconds is less than or equal to zero (0), let expiry-\n // time be the earliest representable date and time. Otherwise, let\n // the expiry-time be the current date and time plus delta-seconds\n // seconds.\n // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds\n\n // 7. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Max-Age and an attribute-value of expiry-time.\n cookieAttributeList.maxAge = deltaSeconds\n } else if (attributeNameLowercase === 'domain') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3\n // If the attribute-name case-insensitively matches the string \"Domain\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. Let cookie-domain be the attribute-value.\n let cookieDomain = attributeValue\n\n // 2. If cookie-domain starts with %x2E (\".\"), let cookie-domain be\n // cookie-domain without its leading %x2E (\".\").\n if (cookieDomain[0] === '.') {\n cookieDomain = cookieDomain.slice(1)\n }\n\n // 3. Convert the cookie-domain to lower case.\n cookieDomain = cookieDomain.toLowerCase()\n\n // 4. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Domain and an attribute-value of cookie-domain.\n cookieAttributeList.domain = cookieDomain\n } else if (attributeNameLowercase === 'path') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4\n // If the attribute-name case-insensitively matches the string \"Path\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. If the attribute-value is empty or if the first character of the\n // attribute-value is not %x2F (\"/\"):\n let cookiePath = ''\n if (attributeValue.length === 0 || attributeValue[0] !== '/') {\n // 1. Let cookie-path be the default-path.\n cookiePath = '/'\n } else {\n // Otherwise:\n\n // 1. Let cookie-path be the attribute-value.\n cookiePath = attributeValue\n }\n\n // 2. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Path and an attribute-value of cookie-path.\n cookieAttributeList.path = cookiePath\n } else if (attributeNameLowercase === 'secure') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5\n // If the attribute-name case-insensitively matches the string \"Secure\",\n // the user agent MUST append an attribute to the cookie-attribute-list\n // with an attribute-name of Secure and an empty attribute-value.\n\n cookieAttributeList.secure = true\n } else if (attributeNameLowercase === 'httponly') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6\n // If the attribute-name case-insensitively matches the string\n // \"HttpOnly\", the user agent MUST append an attribute to the cookie-\n // attribute-list with an attribute-name of HttpOnly and an empty\n // attribute-value.\n\n cookieAttributeList.httpOnly = true\n } else if (attributeNameLowercase === 'samesite') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7\n // If the attribute-name case-insensitively matches the string\n // \"SameSite\", the user agent MUST process the cookie-av as follows:\n\n // 1. Let enforcement be \"Default\".\n let enforcement = 'Default'\n\n const attributeValueLowercase = attributeValue.toLowerCase()\n // 2. If cookie-av's attribute-value is a case-insensitive match for\n // \"None\", set enforcement to \"None\".\n if (attributeValueLowercase.includes('none')) {\n enforcement = 'None'\n }\n\n // 3. If cookie-av's attribute-value is a case-insensitive match for\n // \"Strict\", set enforcement to \"Strict\".\n if (attributeValueLowercase.includes('strict')) {\n enforcement = 'Strict'\n }\n\n // 4. If cookie-av's attribute-value is a case-insensitive match for\n // \"Lax\", set enforcement to \"Lax\".\n if (attributeValueLowercase.includes('lax')) {\n enforcement = 'Lax'\n }\n\n // 5. Append an attribute to the cookie-attribute-list with an\n // attribute-name of \"SameSite\" and an attribute-value of\n // enforcement.\n cookieAttributeList.sameSite = enforcement\n } else {\n cookieAttributeList.unparsed ??= []\n\n cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`)\n }\n\n // 8. Return to Step 1 of this algorithm.\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n}\n\nmodule.exports = {\n parseSetCookie,\n parseUnparsedAttributes\n}\n","'use strict'\n\nconst assert = require('assert')\nconst { kHeadersList } = require('../core/symbols')\n\nfunction isCTLExcludingHtab (value) {\n if (value.length === 0) {\n return false\n }\n\n for (const char of value) {\n const code = char.charCodeAt(0)\n\n if (\n (code >= 0x00 || code <= 0x08) ||\n (code >= 0x0A || code <= 0x1F) ||\n code === 0x7F\n ) {\n return false\n }\n }\n}\n\n/**\n CHAR = \n token = 1*\n separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n | \",\" | \";\" | \":\" | \"\\\" | <\">\n | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n | \"{\" | \"}\" | SP | HT\n * @param {string} name\n */\nfunction validateCookieName (name) {\n for (const char of name) {\n const code = char.charCodeAt(0)\n\n if (\n (code <= 0x20 || code > 0x7F) ||\n char === '(' ||\n char === ')' ||\n char === '>' ||\n char === '<' ||\n char === '@' ||\n char === ',' ||\n char === ';' ||\n char === ':' ||\n char === '\\\\' ||\n char === '\"' ||\n char === '/' ||\n char === '[' ||\n char === ']' ||\n char === '?' ||\n char === '=' ||\n char === '{' ||\n char === '}'\n ) {\n throw new Error('Invalid cookie name')\n }\n }\n}\n\n/**\n cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n ; US-ASCII characters excluding CTLs,\n ; whitespace DQUOTE, comma, semicolon,\n ; and backslash\n * @param {string} value\n */\nfunction validateCookieValue (value) {\n for (const char of value) {\n const code = char.charCodeAt(0)\n\n if (\n code < 0x21 || // exclude CTLs (0-31)\n code === 0x22 ||\n code === 0x2C ||\n code === 0x3B ||\n code === 0x5C ||\n code > 0x7E // non-ascii\n ) {\n throw new Error('Invalid header value')\n }\n }\n}\n\n/**\n * path-value = \n * @param {string} path\n */\nfunction validateCookiePath (path) {\n for (const char of path) {\n const code = char.charCodeAt(0)\n\n if (code < 0x21 || char === ';') {\n throw new Error('Invalid cookie path')\n }\n }\n}\n\n/**\n * I have no idea why these values aren't allowed to be honest,\n * but Deno tests these. - Khafra\n * @param {string} domain\n */\nfunction validateCookieDomain (domain) {\n if (\n domain.startsWith('-') ||\n domain.endsWith('.') ||\n domain.endsWith('-')\n ) {\n throw new Error('Invalid cookie domain')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1\n * @param {number|Date} date\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322]\n\n day-name = %x4D.6F.6E ; \"Mon\", case-sensitive\n / %x54.75.65 ; \"Tue\", case-sensitive\n / %x57.65.64 ; \"Wed\", case-sensitive\n / %x54.68.75 ; \"Thu\", case-sensitive\n / %x46.72.69 ; \"Fri\", case-sensitive\n / %x53.61.74 ; \"Sat\", case-sensitive\n / %x53.75.6E ; \"Sun\", case-sensitive\n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT\n month = %x4A.61.6E ; \"Jan\", case-sensitive\n / %x46.65.62 ; \"Feb\", case-sensitive\n / %x4D.61.72 ; \"Mar\", case-sensitive\n / %x41.70.72 ; \"Apr\", case-sensitive\n / %x4D.61.79 ; \"May\", case-sensitive\n / %x4A.75.6E ; \"Jun\", case-sensitive\n / %x4A.75.6C ; \"Jul\", case-sensitive\n / %x41.75.67 ; \"Aug\", case-sensitive\n / %x53.65.70 ; \"Sep\", case-sensitive\n / %x4F.63.74 ; \"Oct\", case-sensitive\n / %x4E.6F.76 ; \"Nov\", case-sensitive\n / %x44.65.63 ; \"Dec\", case-sensitive\n year = 4DIGIT\n\n GMT = %x47.4D.54 ; \"GMT\", case-sensitive\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n\n hour = 2DIGIT\n minute = 2DIGIT\n second = 2DIGIT\n */\nfunction toIMFDate (date) {\n if (typeof date === 'number') {\n date = new Date(date)\n }\n\n const days = [\n 'Sun', 'Mon', 'Tue', 'Wed',\n 'Thu', 'Fri', 'Sat'\n ]\n\n const months = [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n ]\n\n const dayName = days[date.getUTCDay()]\n const day = date.getUTCDate().toString().padStart(2, '0')\n const month = months[date.getUTCMonth()]\n const year = date.getUTCFullYear()\n const hour = date.getUTCHours().toString().padStart(2, '0')\n const minute = date.getUTCMinutes().toString().padStart(2, '0')\n const second = date.getUTCSeconds().toString().padStart(2, '0')\n\n return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`\n}\n\n/**\n max-age-av = \"Max-Age=\" non-zero-digit *DIGIT\n ; In practice, both expires-av and max-age-av\n ; are limited to dates representable by the\n ; user agent.\n * @param {number} maxAge\n */\nfunction validateCookieMaxAge (maxAge) {\n if (maxAge < 0) {\n throw new Error('Invalid cookie max-age')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1\n * @param {import('./index').Cookie} cookie\n */\nfunction stringify (cookie) {\n if (cookie.name.length === 0) {\n return null\n }\n\n validateCookieName(cookie.name)\n validateCookieValue(cookie.value)\n\n const out = [`${cookie.name}=${cookie.value}`]\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2\n if (cookie.name.startsWith('__Secure-')) {\n cookie.secure = true\n }\n\n if (cookie.name.startsWith('__Host-')) {\n cookie.secure = true\n cookie.domain = null\n cookie.path = '/'\n }\n\n if (cookie.secure) {\n out.push('Secure')\n }\n\n if (cookie.httpOnly) {\n out.push('HttpOnly')\n }\n\n if (typeof cookie.maxAge === 'number') {\n validateCookieMaxAge(cookie.maxAge)\n out.push(`Max-Age=${cookie.maxAge}`)\n }\n\n if (cookie.domain) {\n validateCookieDomain(cookie.domain)\n out.push(`Domain=${cookie.domain}`)\n }\n\n if (cookie.path) {\n validateCookiePath(cookie.path)\n out.push(`Path=${cookie.path}`)\n }\n\n if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') {\n out.push(`Expires=${toIMFDate(cookie.expires)}`)\n }\n\n if (cookie.sameSite) {\n out.push(`SameSite=${cookie.sameSite}`)\n }\n\n for (const part of cookie.unparsed) {\n if (!part.includes('=')) {\n throw new Error('Invalid unparsed')\n }\n\n const [key, ...value] = part.split('=')\n\n out.push(`${key.trim()}=${value.join('=')}`)\n }\n\n return out.join('; ')\n}\n\nlet kHeadersListNode\n\nfunction getHeadersList (headers) {\n if (headers[kHeadersList]) {\n return headers[kHeadersList]\n }\n\n if (!kHeadersListNode) {\n kHeadersListNode = Object.getOwnPropertySymbols(headers).find(\n (symbol) => symbol.description === 'headers list'\n )\n\n assert(kHeadersListNode, 'Headers cannot be parsed')\n }\n\n const headersList = headers[kHeadersListNode]\n assert(headersList)\n\n return headersList\n}\n\nmodule.exports = {\n isCTLExcludingHtab,\n stringify,\n getHeadersList\n}\n","'use strict'\n\nconst net = require('net')\nconst assert = require('assert')\nconst util = require('./util')\nconst { InvalidArgumentError, ConnectTimeoutError } = require('./errors')\n\nlet tls // include tls conditionally since it is not always available\n\n// TODO: session re-use does not wait for the first\n// connection to resolve the session and might therefore\n// resolve the same servername multiple times even when\n// re-use is enabled.\n\nlet SessionCache\n// FIXME: remove workaround when the Node bug is fixed\n// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\nif (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) {\n SessionCache = class WeakSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n this._sessionRegistry = new global.FinalizationRegistry((key) => {\n if (this._sessionCache.size < this._maxCachedSessions) {\n return\n }\n\n const ref = this._sessionCache.get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this._sessionCache.delete(key)\n }\n })\n }\n\n get (sessionKey) {\n const ref = this._sessionCache.get(sessionKey)\n return ref ? ref.deref() : null\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n this._sessionCache.set(sessionKey, new WeakRef(session))\n this._sessionRegistry.register(session, sessionKey)\n }\n }\n} else {\n SessionCache = class SimpleSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n }\n\n get (sessionKey) {\n return this._sessionCache.get(sessionKey)\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n if (this._sessionCache.size >= this._maxCachedSessions) {\n // remove the oldest session\n const { value: oldestKey } = this._sessionCache.keys().next()\n this._sessionCache.delete(oldestKey)\n }\n\n this._sessionCache.set(sessionKey, session)\n }\n }\n}\n\nfunction buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) {\n if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {\n throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')\n }\n\n const options = { path: socketPath, ...opts }\n const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)\n timeout = timeout == null ? 10e3 : timeout\n allowH2 = allowH2 != null ? allowH2 : false\n return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {\n let socket\n if (protocol === 'https:') {\n if (!tls) {\n tls = require('tls')\n }\n servername = servername || options.servername || util.getServerName(host) || null\n\n const sessionKey = servername || hostname\n const session = sessionCache.get(sessionKey) || null\n\n assert(sessionKey)\n\n socket = tls.connect({\n highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...\n ...options,\n servername,\n session,\n localAddress,\n // TODO(HTTP/2): Add support for h2c\n ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'],\n socket: httpSocket, // upgrade socket connection\n port: port || 443,\n host: hostname\n })\n\n socket\n .on('session', function (session) {\n // TODO (fix): Can a session become invalid once established? Don't think so?\n sessionCache.set(sessionKey, session)\n })\n } else {\n assert(!httpSocket, 'httpSocket can only be sent on TLS update')\n socket = net.connect({\n highWaterMark: 64 * 1024, // Same as nodejs fs streams.\n ...options,\n localAddress,\n port: port || 80,\n host: hostname\n })\n }\n\n // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket\n if (options.keepAlive == null || options.keepAlive) {\n const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay\n socket.setKeepAlive(true, keepAliveInitialDelay)\n }\n\n const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout)\n\n socket\n .setNoDelay(true)\n .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {\n cancelTimeout()\n\n if (callback) {\n const cb = callback\n callback = null\n cb(null, this)\n }\n })\n .on('error', function (err) {\n cancelTimeout()\n\n if (callback) {\n const cb = callback\n callback = null\n cb(err)\n }\n })\n\n return socket\n }\n}\n\nfunction setupTimeout (onConnectTimeout, timeout) {\n if (!timeout) {\n return () => {}\n }\n\n let s1 = null\n let s2 = null\n const timeoutId = setTimeout(() => {\n // setImmediate is added to make sure that we priotorise socket error events over timeouts\n s1 = setImmediate(() => {\n if (process.platform === 'win32') {\n // Windows needs an extra setImmediate probably due to implementation differences in the socket logic\n s2 = setImmediate(() => onConnectTimeout())\n } else {\n onConnectTimeout()\n }\n })\n }, timeout)\n return () => {\n clearTimeout(timeoutId)\n clearImmediate(s1)\n clearImmediate(s2)\n }\n}\n\nfunction onConnectTimeout (socket) {\n util.destroy(socket, new ConnectTimeoutError())\n}\n\nmodule.exports = buildConnector\n","'use strict'\n\nclass UndiciError extends Error {\n constructor (message) {\n super(message)\n this.name = 'UndiciError'\n this.code = 'UND_ERR'\n }\n}\n\nclass ConnectTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ConnectTimeoutError)\n this.name = 'ConnectTimeoutError'\n this.message = message || 'Connect Timeout Error'\n this.code = 'UND_ERR_CONNECT_TIMEOUT'\n }\n}\n\nclass HeadersTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, HeadersTimeoutError)\n this.name = 'HeadersTimeoutError'\n this.message = message || 'Headers Timeout Error'\n this.code = 'UND_ERR_HEADERS_TIMEOUT'\n }\n}\n\nclass HeadersOverflowError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, HeadersOverflowError)\n this.name = 'HeadersOverflowError'\n this.message = message || 'Headers Overflow Error'\n this.code = 'UND_ERR_HEADERS_OVERFLOW'\n }\n}\n\nclass BodyTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, BodyTimeoutError)\n this.name = 'BodyTimeoutError'\n this.message = message || 'Body Timeout Error'\n this.code = 'UND_ERR_BODY_TIMEOUT'\n }\n}\n\nclass ResponseStatusCodeError extends UndiciError {\n constructor (message, statusCode, headers, body) {\n super(message)\n Error.captureStackTrace(this, ResponseStatusCodeError)\n this.name = 'ResponseStatusCodeError'\n this.message = message || 'Response Status Code Error'\n this.code = 'UND_ERR_RESPONSE_STATUS_CODE'\n this.body = body\n this.status = statusCode\n this.statusCode = statusCode\n this.headers = headers\n }\n}\n\nclass InvalidArgumentError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InvalidArgumentError)\n this.name = 'InvalidArgumentError'\n this.message = message || 'Invalid Argument Error'\n this.code = 'UND_ERR_INVALID_ARG'\n }\n}\n\nclass InvalidReturnValueError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InvalidReturnValueError)\n this.name = 'InvalidReturnValueError'\n this.message = message || 'Invalid Return Value Error'\n this.code = 'UND_ERR_INVALID_RETURN_VALUE'\n }\n}\n\nclass RequestAbortedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, RequestAbortedError)\n this.name = 'AbortError'\n this.message = message || 'Request aborted'\n this.code = 'UND_ERR_ABORTED'\n }\n}\n\nclass InformationalError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InformationalError)\n this.name = 'InformationalError'\n this.message = message || 'Request information'\n this.code = 'UND_ERR_INFO'\n }\n}\n\nclass RequestContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, RequestContentLengthMismatchError)\n this.name = 'RequestContentLengthMismatchError'\n this.message = message || 'Request body length does not match content-length header'\n this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'\n }\n}\n\nclass ResponseContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ResponseContentLengthMismatchError)\n this.name = 'ResponseContentLengthMismatchError'\n this.message = message || 'Response body length does not match content-length header'\n this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'\n }\n}\n\nclass ClientDestroyedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ClientDestroyedError)\n this.name = 'ClientDestroyedError'\n this.message = message || 'The client is destroyed'\n this.code = 'UND_ERR_DESTROYED'\n }\n}\n\nclass ClientClosedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ClientClosedError)\n this.name = 'ClientClosedError'\n this.message = message || 'The client is closed'\n this.code = 'UND_ERR_CLOSED'\n }\n}\n\nclass SocketError extends UndiciError {\n constructor (message, socket) {\n super(message)\n Error.captureStackTrace(this, SocketError)\n this.name = 'SocketError'\n this.message = message || 'Socket error'\n this.code = 'UND_ERR_SOCKET'\n this.socket = socket\n }\n}\n\nclass NotSupportedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, NotSupportedError)\n this.name = 'NotSupportedError'\n this.message = message || 'Not supported error'\n this.code = 'UND_ERR_NOT_SUPPORTED'\n }\n}\n\nclass BalancedPoolMissingUpstreamError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, NotSupportedError)\n this.name = 'MissingUpstreamError'\n this.message = message || 'No upstream has been added to the BalancedPool'\n this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'\n }\n}\n\nclass HTTPParserError extends Error {\n constructor (message, code, data) {\n super(message)\n Error.captureStackTrace(this, HTTPParserError)\n this.name = 'HTTPParserError'\n this.code = code ? `HPE_${code}` : undefined\n this.data = data ? data.toString() : undefined\n }\n}\n\nclass ResponseExceededMaxSizeError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ResponseExceededMaxSizeError)\n this.name = 'ResponseExceededMaxSizeError'\n this.message = message || 'Response content exceeded max size'\n this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'\n }\n}\n\nclass RequestRetryError extends UndiciError {\n constructor (message, code, { headers, data }) {\n super(message)\n Error.captureStackTrace(this, RequestRetryError)\n this.name = 'RequestRetryError'\n this.message = message || 'Request retry error'\n this.code = 'UND_ERR_REQ_RETRY'\n this.statusCode = code\n this.data = data\n this.headers = headers\n }\n}\n\nmodule.exports = {\n HTTPParserError,\n UndiciError,\n HeadersTimeoutError,\n HeadersOverflowError,\n BodyTimeoutError,\n RequestContentLengthMismatchError,\n ConnectTimeoutError,\n ResponseStatusCodeError,\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError,\n ClientDestroyedError,\n ClientClosedError,\n InformationalError,\n SocketError,\n NotSupportedError,\n ResponseContentLengthMismatchError,\n BalancedPoolMissingUpstreamError,\n ResponseExceededMaxSizeError,\n RequestRetryError\n}\n","'use strict'\n\nconst {\n InvalidArgumentError,\n NotSupportedError\n} = require('./errors')\nconst assert = require('assert')\nconst { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require('./symbols')\nconst util = require('./util')\n\n// tokenRegExp and headerCharRegex have been lifted from\n// https://github.com/nodejs/node/blob/main/lib/_http_common.js\n\n/**\n * Verifies that the given val is a valid HTTP token\n * per the rules defined in RFC 7230\n * See https://tools.ietf.org/html/rfc7230#section-3.2.6\n */\nconst tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/\n\n/**\n * Matches if val contains an invalid field-vchar\n * field-value = *( field-content / obs-fold )\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n */\nconst headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/\n\n// Verifies that a given path is valid does not contain control chars \\x00 to \\x20\nconst invalidPathRegex = /[^\\u0021-\\u00ff]/\n\nconst kHandler = Symbol('handler')\n\nconst channels = {}\n\nlet extractBody\n\ntry {\n const diagnosticsChannel = require('diagnostics_channel')\n channels.create = diagnosticsChannel.channel('undici:request:create')\n channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent')\n channels.headers = diagnosticsChannel.channel('undici:request:headers')\n channels.trailers = diagnosticsChannel.channel('undici:request:trailers')\n channels.error = diagnosticsChannel.channel('undici:request:error')\n} catch {\n channels.create = { hasSubscribers: false }\n channels.bodySent = { hasSubscribers: false }\n channels.headers = { hasSubscribers: false }\n channels.trailers = { hasSubscribers: false }\n channels.error = { hasSubscribers: false }\n}\n\nclass Request {\n constructor (origin, {\n path,\n method,\n body,\n headers,\n query,\n idempotent,\n blocking,\n upgrade,\n headersTimeout,\n bodyTimeout,\n reset,\n throwOnError,\n expectContinue\n }, handler) {\n if (typeof path !== 'string') {\n throw new InvalidArgumentError('path must be a string')\n } else if (\n path[0] !== '/' &&\n !(path.startsWith('http://') || path.startsWith('https://')) &&\n method !== 'CONNECT'\n ) {\n throw new InvalidArgumentError('path must be an absolute URL or start with a slash')\n } else if (invalidPathRegex.exec(path) !== null) {\n throw new InvalidArgumentError('invalid request path')\n }\n\n if (typeof method !== 'string') {\n throw new InvalidArgumentError('method must be a string')\n } else if (tokenRegExp.exec(method) === null) {\n throw new InvalidArgumentError('invalid request method')\n }\n\n if (upgrade && typeof upgrade !== 'string') {\n throw new InvalidArgumentError('upgrade must be a string')\n }\n\n if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('invalid headersTimeout')\n }\n\n if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('invalid bodyTimeout')\n }\n\n if (reset != null && typeof reset !== 'boolean') {\n throw new InvalidArgumentError('invalid reset')\n }\n\n if (expectContinue != null && typeof expectContinue !== 'boolean') {\n throw new InvalidArgumentError('invalid expectContinue')\n }\n\n this.headersTimeout = headersTimeout\n\n this.bodyTimeout = bodyTimeout\n\n this.throwOnError = throwOnError === true\n\n this.method = method\n\n this.abort = null\n\n if (body == null) {\n this.body = null\n } else if (util.isStream(body)) {\n this.body = body\n\n const rState = this.body._readableState\n if (!rState || !rState.autoDestroy) {\n this.endHandler = function autoDestroy () {\n util.destroy(this)\n }\n this.body.on('end', this.endHandler)\n }\n\n this.errorHandler = err => {\n if (this.abort) {\n this.abort(err)\n } else {\n this.error = err\n }\n }\n this.body.on('error', this.errorHandler)\n } else if (util.isBuffer(body)) {\n this.body = body.byteLength ? body : null\n } else if (ArrayBuffer.isView(body)) {\n this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null\n } else if (body instanceof ArrayBuffer) {\n this.body = body.byteLength ? Buffer.from(body) : null\n } else if (typeof body === 'string') {\n this.body = body.length ? Buffer.from(body) : null\n } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) {\n this.body = body\n } else {\n throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')\n }\n\n this.completed = false\n\n this.aborted = false\n\n this.upgrade = upgrade || null\n\n this.path = query ? util.buildURL(path, query) : path\n\n this.origin = origin\n\n this.idempotent = idempotent == null\n ? method === 'HEAD' || method === 'GET'\n : idempotent\n\n this.blocking = blocking == null ? false : blocking\n\n this.reset = reset == null ? null : reset\n\n this.host = null\n\n this.contentLength = null\n\n this.contentType = null\n\n this.headers = ''\n\n // Only for H2\n this.expectContinue = expectContinue != null ? expectContinue : false\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(this, headers[i], headers[i + 1])\n }\n } else if (headers && typeof headers === 'object') {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n processHeader(this, key, headers[key])\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n if (util.isFormDataLike(this.body)) {\n if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) {\n throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.')\n }\n\n if (!extractBody) {\n extractBody = require('../fetch/body.js').extractBody\n }\n\n const [bodyStream, contentType] = extractBody(body)\n if (this.contentType == null) {\n this.contentType = contentType\n this.headers += `content-type: ${contentType}\\r\\n`\n }\n this.body = bodyStream.stream\n this.contentLength = bodyStream.length\n } else if (util.isBlobLike(body) && this.contentType == null && body.type) {\n this.contentType = body.type\n this.headers += `content-type: ${body.type}\\r\\n`\n }\n\n util.validateHandler(handler, method, upgrade)\n\n this.servername = util.getServerName(this.host)\n\n this[kHandler] = handler\n\n if (channels.create.hasSubscribers) {\n channels.create.publish({ request: this })\n }\n }\n\n onBodySent (chunk) {\n if (this[kHandler].onBodySent) {\n try {\n return this[kHandler].onBodySent(chunk)\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onRequestSent () {\n if (channels.bodySent.hasSubscribers) {\n channels.bodySent.publish({ request: this })\n }\n\n if (this[kHandler].onRequestSent) {\n try {\n return this[kHandler].onRequestSent()\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onConnect (abort) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (this.error) {\n abort(this.error)\n } else {\n this.abort = abort\n return this[kHandler].onConnect(abort)\n }\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.headers.hasSubscribers) {\n channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })\n }\n\n try {\n return this[kHandler].onHeaders(statusCode, headers, resume, statusText)\n } catch (err) {\n this.abort(err)\n }\n }\n\n onData (chunk) {\n assert(!this.aborted)\n assert(!this.completed)\n\n try {\n return this[kHandler].onData(chunk)\n } catch (err) {\n this.abort(err)\n return false\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n assert(!this.aborted)\n assert(!this.completed)\n\n return this[kHandler].onUpgrade(statusCode, headers, socket)\n }\n\n onComplete (trailers) {\n this.onFinally()\n\n assert(!this.aborted)\n\n this.completed = true\n if (channels.trailers.hasSubscribers) {\n channels.trailers.publish({ request: this, trailers })\n }\n\n try {\n return this[kHandler].onComplete(trailers)\n } catch (err) {\n // TODO (fix): This might be a bad idea?\n this.onError(err)\n }\n }\n\n onError (error) {\n this.onFinally()\n\n if (channels.error.hasSubscribers) {\n channels.error.publish({ request: this, error })\n }\n\n if (this.aborted) {\n return\n }\n this.aborted = true\n\n return this[kHandler].onError(error)\n }\n\n onFinally () {\n if (this.errorHandler) {\n this.body.off('error', this.errorHandler)\n this.errorHandler = null\n }\n\n if (this.endHandler) {\n this.body.off('end', this.endHandler)\n this.endHandler = null\n }\n }\n\n // TODO: adjust to support H2\n addHeader (key, value) {\n processHeader(this, key, value)\n return this\n }\n\n static [kHTTP1BuildRequest] (origin, opts, handler) {\n // TODO: Migrate header parsing here, to make Requests\n // HTTP agnostic\n return new Request(origin, opts, handler)\n }\n\n static [kHTTP2BuildRequest] (origin, opts, handler) {\n const headers = opts.headers\n opts = { ...opts, headers: null }\n\n const request = new Request(origin, opts, handler)\n\n request.headers = {}\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(request, headers[i], headers[i + 1], true)\n }\n } else if (headers && typeof headers === 'object') {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n processHeader(request, key, headers[key], true)\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n return request\n }\n\n static [kHTTP2CopyHeaders] (raw) {\n const rawHeaders = raw.split('\\r\\n')\n const headers = {}\n\n for (const header of rawHeaders) {\n const [key, value] = header.split(': ')\n\n if (value == null || value.length === 0) continue\n\n if (headers[key]) headers[key] += `,${value}`\n else headers[key] = value\n }\n\n return headers\n }\n}\n\nfunction processHeaderValue (key, val, skipAppend) {\n if (val && typeof val === 'object') {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n\n val = val != null ? `${val}` : ''\n\n if (headerCharRegex.exec(val) !== null) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n\n return skipAppend ? val : `${key}: ${val}\\r\\n`\n}\n\nfunction processHeader (request, key, val, skipAppend = false) {\n if (val && (typeof val === 'object' && !Array.isArray(val))) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else if (val === undefined) {\n return\n }\n\n if (\n request.host === null &&\n key.length === 4 &&\n key.toLowerCase() === 'host'\n ) {\n if (headerCharRegex.exec(val) !== null) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n // Consumed by Client\n request.host = val\n } else if (\n request.contentLength === null &&\n key.length === 14 &&\n key.toLowerCase() === 'content-length'\n ) {\n request.contentLength = parseInt(val, 10)\n if (!Number.isFinite(request.contentLength)) {\n throw new InvalidArgumentError('invalid content-length header')\n }\n } else if (\n request.contentType === null &&\n key.length === 12 &&\n key.toLowerCase() === 'content-type'\n ) {\n request.contentType = val\n if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)\n else request.headers += processHeaderValue(key, val)\n } else if (\n key.length === 17 &&\n key.toLowerCase() === 'transfer-encoding'\n ) {\n throw new InvalidArgumentError('invalid transfer-encoding header')\n } else if (\n key.length === 10 &&\n key.toLowerCase() === 'connection'\n ) {\n const value = typeof val === 'string' ? val.toLowerCase() : null\n if (value !== 'close' && value !== 'keep-alive') {\n throw new InvalidArgumentError('invalid connection header')\n } else if (value === 'close') {\n request.reset = true\n }\n } else if (\n key.length === 10 &&\n key.toLowerCase() === 'keep-alive'\n ) {\n throw new InvalidArgumentError('invalid keep-alive header')\n } else if (\n key.length === 7 &&\n key.toLowerCase() === 'upgrade'\n ) {\n throw new InvalidArgumentError('invalid upgrade header')\n } else if (\n key.length === 6 &&\n key.toLowerCase() === 'expect'\n ) {\n throw new NotSupportedError('expect header not supported')\n } else if (tokenRegExp.exec(key) === null) {\n throw new InvalidArgumentError('invalid header key')\n } else {\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n if (skipAppend) {\n if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`\n else request.headers[key] = processHeaderValue(key, val[i], skipAppend)\n } else {\n request.headers += processHeaderValue(key, val[i])\n }\n }\n } else {\n if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)\n else request.headers += processHeaderValue(key, val)\n }\n }\n}\n\nmodule.exports = Request\n","module.exports = {\n kClose: Symbol('close'),\n kDestroy: Symbol('destroy'),\n kDispatch: Symbol('dispatch'),\n kUrl: Symbol('url'),\n kWriting: Symbol('writing'),\n kResuming: Symbol('resuming'),\n kQueue: Symbol('queue'),\n kConnect: Symbol('connect'),\n kConnecting: Symbol('connecting'),\n kHeadersList: Symbol('headers list'),\n kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),\n kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),\n kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),\n kKeepAliveTimeoutValue: Symbol('keep alive timeout'),\n kKeepAlive: Symbol('keep alive'),\n kHeadersTimeout: Symbol('headers timeout'),\n kBodyTimeout: Symbol('body timeout'),\n kServerName: Symbol('server name'),\n kLocalAddress: Symbol('local address'),\n kHost: Symbol('host'),\n kNoRef: Symbol('no ref'),\n kBodyUsed: Symbol('used'),\n kRunning: Symbol('running'),\n kBlocking: Symbol('blocking'),\n kPending: Symbol('pending'),\n kSize: Symbol('size'),\n kBusy: Symbol('busy'),\n kQueued: Symbol('queued'),\n kFree: Symbol('free'),\n kConnected: Symbol('connected'),\n kClosed: Symbol('closed'),\n kNeedDrain: Symbol('need drain'),\n kReset: Symbol('reset'),\n kDestroyed: Symbol.for('nodejs.stream.destroyed'),\n kMaxHeadersSize: Symbol('max headers size'),\n kRunningIdx: Symbol('running index'),\n kPendingIdx: Symbol('pending index'),\n kError: Symbol('error'),\n kClients: Symbol('clients'),\n kClient: Symbol('client'),\n kParser: Symbol('parser'),\n kOnDestroyed: Symbol('destroy callbacks'),\n kPipelining: Symbol('pipelining'),\n kSocket: Symbol('socket'),\n kHostHeader: Symbol('host header'),\n kConnector: Symbol('connector'),\n kStrictContentLength: Symbol('strict content length'),\n kMaxRedirections: Symbol('maxRedirections'),\n kMaxRequests: Symbol('maxRequestsPerClient'),\n kProxy: Symbol('proxy agent options'),\n kCounter: Symbol('socket request counter'),\n kInterceptors: Symbol('dispatch interceptors'),\n kMaxResponseSize: Symbol('max response size'),\n kHTTP2Session: Symbol('http2Session'),\n kHTTP2SessionState: Symbol('http2Session state'),\n kHTTP2BuildRequest: Symbol('http2 build request'),\n kHTTP1BuildRequest: Symbol('http1 build request'),\n kHTTP2CopyHeaders: Symbol('http2 copy headers'),\n kHTTPConnVersion: Symbol('http connection version'),\n kRetryHandlerDefaultRetry: Symbol('retry agent default retry'),\n kConstruct: Symbol('constructable')\n}\n","'use strict'\n\nconst assert = require('assert')\nconst { kDestroyed, kBodyUsed } = require('./symbols')\nconst { IncomingMessage } = require('http')\nconst stream = require('stream')\nconst net = require('net')\nconst { InvalidArgumentError } = require('./errors')\nconst { Blob } = require('buffer')\nconst nodeUtil = require('util')\nconst { stringify } = require('querystring')\n\nconst [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))\n\nfunction nop () {}\n\nfunction isStream (obj) {\n return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'\n}\n\n// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License)\nfunction isBlobLike (object) {\n return (Blob && object instanceof Blob) || (\n object &&\n typeof object === 'object' &&\n (typeof object.stream === 'function' ||\n typeof object.arrayBuffer === 'function') &&\n /^(Blob|File)$/.test(object[Symbol.toStringTag])\n )\n}\n\nfunction buildURL (url, queryParams) {\n if (url.includes('?') || url.includes('#')) {\n throw new Error('Query params cannot be passed when url already contains \"?\" or \"#\".')\n }\n\n const stringified = stringify(queryParams)\n\n if (stringified) {\n url += '?' + stringified\n }\n\n return url\n}\n\nfunction parseURL (url) {\n if (typeof url === 'string') {\n url = new URL(url)\n\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n }\n\n if (!url || typeof url !== 'object') {\n throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.')\n }\n\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n if (!(url instanceof URL)) {\n if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) {\n throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.')\n }\n\n if (url.path != null && typeof url.path !== 'string') {\n throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.')\n }\n\n if (url.pathname != null && typeof url.pathname !== 'string') {\n throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.')\n }\n\n if (url.hostname != null && typeof url.hostname !== 'string') {\n throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.')\n }\n\n if (url.origin != null && typeof url.origin !== 'string') {\n throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.')\n }\n\n const port = url.port != null\n ? url.port\n : (url.protocol === 'https:' ? 443 : 80)\n let origin = url.origin != null\n ? url.origin\n : `${url.protocol}//${url.hostname}:${port}`\n let path = url.path != null\n ? url.path\n : `${url.pathname || ''}${url.search || ''}`\n\n if (origin.endsWith('/')) {\n origin = origin.substring(0, origin.length - 1)\n }\n\n if (path && !path.startsWith('/')) {\n path = `/${path}`\n }\n // new URL(path, origin) is unsafe when `path` contains an absolute URL\n // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL:\n // If first parameter is a relative URL, second param is required, and will be used as the base URL.\n // If first parameter is an absolute URL, a given second param will be ignored.\n url = new URL(origin + path)\n }\n\n return url\n}\n\nfunction parseOrigin (url) {\n url = parseURL(url)\n\n if (url.pathname !== '/' || url.search || url.hash) {\n throw new InvalidArgumentError('invalid url')\n }\n\n return url\n}\n\nfunction getHostname (host) {\n if (host[0] === '[') {\n const idx = host.indexOf(']')\n\n assert(idx !== -1)\n return host.substring(1, idx)\n }\n\n const idx = host.indexOf(':')\n if (idx === -1) return host\n\n return host.substring(0, idx)\n}\n\n// IP addresses are not valid server names per RFC6066\n// > Currently, the only server names supported are DNS hostnames\nfunction getServerName (host) {\n if (!host) {\n return null\n }\n\n assert.strictEqual(typeof host, 'string')\n\n const servername = getHostname(host)\n if (net.isIP(servername)) {\n return ''\n }\n\n return servername\n}\n\nfunction deepClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction isAsyncIterable (obj) {\n return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function')\n}\n\nfunction isIterable (obj) {\n return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))\n}\n\nfunction bodyLength (body) {\n if (body == null) {\n return 0\n } else if (isStream(body)) {\n const state = body._readableState\n return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length)\n ? state.length\n : null\n } else if (isBlobLike(body)) {\n return body.size != null ? body.size : null\n } else if (isBuffer(body)) {\n return body.byteLength\n }\n\n return null\n}\n\nfunction isDestroyed (stream) {\n return !stream || !!(stream.destroyed || stream[kDestroyed])\n}\n\nfunction isReadableAborted (stream) {\n const state = stream && stream._readableState\n return isDestroyed(stream) && state && !state.endEmitted\n}\n\nfunction destroy (stream, err) {\n if (stream == null || !isStream(stream) || isDestroyed(stream)) {\n return\n }\n\n if (typeof stream.destroy === 'function') {\n if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {\n // See: https://github.com/nodejs/node/pull/38505/files\n stream.socket = null\n }\n\n stream.destroy(err)\n } else if (err) {\n process.nextTick((stream, err) => {\n stream.emit('error', err)\n }, stream, err)\n }\n\n if (stream.destroyed !== true) {\n stream[kDestroyed] = true\n }\n}\n\nconst KEEPALIVE_TIMEOUT_EXPR = /timeout=(\\d+)/\nfunction parseKeepAliveTimeout (val) {\n const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR)\n return m ? parseInt(m[1], 10) * 1000 : null\n}\n\nfunction parseHeaders (headers, obj = {}) {\n // For H2 support\n if (!Array.isArray(headers)) return headers\n\n for (let i = 0; i < headers.length; i += 2) {\n const key = headers[i].toString().toLowerCase()\n let val = obj[key]\n\n if (!val) {\n if (Array.isArray(headers[i + 1])) {\n obj[key] = headers[i + 1].map(x => x.toString('utf8'))\n } else {\n obj[key] = headers[i + 1].toString('utf8')\n }\n } else {\n if (!Array.isArray(val)) {\n val = [val]\n obj[key] = val\n }\n val.push(headers[i + 1].toString('utf8'))\n }\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if ('content-length' in obj && 'content-disposition' in obj) {\n obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1')\n }\n\n return obj\n}\n\nfunction parseRawHeaders (headers) {\n const ret = []\n let hasContentLength = false\n let contentDispositionIdx = -1\n\n for (let n = 0; n < headers.length; n += 2) {\n const key = headers[n + 0].toString()\n const val = headers[n + 1].toString('utf8')\n\n if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) {\n ret.push(key, val)\n hasContentLength = true\n } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) {\n contentDispositionIdx = ret.push(key, val) - 1\n } else {\n ret.push(key, val)\n }\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if (hasContentLength && contentDispositionIdx !== -1) {\n ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1')\n }\n\n return ret\n}\n\nfunction isBuffer (buffer) {\n // See, https://github.com/mcollina/undici/pull/319\n return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)\n}\n\nfunction validateHandler (handler, method, upgrade) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n if (typeof handler.onConnect !== 'function') {\n throw new InvalidArgumentError('invalid onConnect method')\n }\n\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) {\n throw new InvalidArgumentError('invalid onBodySent method')\n }\n\n if (upgrade || method === 'CONNECT') {\n if (typeof handler.onUpgrade !== 'function') {\n throw new InvalidArgumentError('invalid onUpgrade method')\n }\n } else {\n if (typeof handler.onHeaders !== 'function') {\n throw new InvalidArgumentError('invalid onHeaders method')\n }\n\n if (typeof handler.onData !== 'function') {\n throw new InvalidArgumentError('invalid onData method')\n }\n\n if (typeof handler.onComplete !== 'function') {\n throw new InvalidArgumentError('invalid onComplete method')\n }\n }\n}\n\n// A body is disturbed if it has been read from and it cannot\n// be re-used without losing state or data.\nfunction isDisturbed (body) {\n return !!(body && (\n stream.isDisturbed\n ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed?\n : body[kBodyUsed] ||\n body.readableDidRead ||\n (body._readableState && body._readableState.dataEmitted) ||\n isReadableAborted(body)\n ))\n}\n\nfunction isErrored (body) {\n return !!(body && (\n stream.isErrored\n ? stream.isErrored(body)\n : /state: 'errored'/.test(nodeUtil.inspect(body)\n )))\n}\n\nfunction isReadable (body) {\n return !!(body && (\n stream.isReadable\n ? stream.isReadable(body)\n : /state: 'readable'/.test(nodeUtil.inspect(body)\n )))\n}\n\nfunction getSocketInfo (socket) {\n return {\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort,\n remoteFamily: socket.remoteFamily,\n timeout: socket.timeout,\n bytesWritten: socket.bytesWritten,\n bytesRead: socket.bytesRead\n }\n}\n\nasync function * convertIterableToBuffer (iterable) {\n for await (const chunk of iterable) {\n yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)\n }\n}\n\nlet ReadableStream\nfunction ReadableStreamFrom (iterable) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n if (ReadableStream.from) {\n return ReadableStream.from(convertIterableToBuffer(iterable))\n }\n\n let iterator\n return new ReadableStream(\n {\n async start () {\n iterator = iterable[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { done, value } = await iterator.next()\n if (done) {\n queueMicrotask(() => {\n controller.close()\n })\n } else {\n const buf = Buffer.isBuffer(value) ? value : Buffer.from(value)\n controller.enqueue(new Uint8Array(buf))\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n }\n },\n 0\n )\n}\n\n// The chunk should be a FormData instance and contains\n// all the required methods.\nfunction isFormDataLike (object) {\n return (\n object &&\n typeof object === 'object' &&\n typeof object.append === 'function' &&\n typeof object.delete === 'function' &&\n typeof object.get === 'function' &&\n typeof object.getAll === 'function' &&\n typeof object.has === 'function' &&\n typeof object.set === 'function' &&\n object[Symbol.toStringTag] === 'FormData'\n )\n}\n\nfunction throwIfAborted (signal) {\n if (!signal) { return }\n if (typeof signal.throwIfAborted === 'function') {\n signal.throwIfAborted()\n } else {\n if (signal.aborted) {\n // DOMException not available < v17.0.0\n const err = new Error('The operation was aborted')\n err.name = 'AbortError'\n throw err\n }\n }\n}\n\nfunction addAbortListener (signal, listener) {\n if ('addEventListener' in signal) {\n signal.addEventListener('abort', listener, { once: true })\n return () => signal.removeEventListener('abort', listener)\n }\n signal.addListener('abort', listener)\n return () => signal.removeListener('abort', listener)\n}\n\nconst hasToWellFormed = !!String.prototype.toWellFormed\n\n/**\n * @param {string} val\n */\nfunction toUSVString (val) {\n if (hasToWellFormed) {\n return `${val}`.toWellFormed()\n } else if (nodeUtil.toUSVString) {\n return nodeUtil.toUSVString(val)\n }\n\n return `${val}`\n}\n\n// Parsed accordingly to RFC 9110\n// https://www.rfc-editor.org/rfc/rfc9110#field.content-range\nfunction parseRangeHeader (range) {\n if (range == null || range === '') return { start: 0, end: null, size: null }\n\n const m = range ? range.match(/^bytes (\\d+)-(\\d+)\\/(\\d+)?$/) : null\n return m\n ? {\n start: parseInt(m[1]),\n end: m[2] ? parseInt(m[2]) : null,\n size: m[3] ? parseInt(m[3]) : null\n }\n : null\n}\n\nconst kEnumerableProperty = Object.create(null)\nkEnumerableProperty.enumerable = true\n\nmodule.exports = {\n kEnumerableProperty,\n nop,\n isDisturbed,\n isErrored,\n isReadable,\n toUSVString,\n isReadableAborted,\n isBlobLike,\n parseOrigin,\n parseURL,\n getServerName,\n isStream,\n isIterable,\n isAsyncIterable,\n isDestroyed,\n parseRawHeaders,\n parseHeaders,\n parseKeepAliveTimeout,\n destroy,\n bodyLength,\n deepClone,\n ReadableStreamFrom,\n isBuffer,\n validateHandler,\n getSocketInfo,\n isFormDataLike,\n buildURL,\n throwIfAborted,\n addAbortListener,\n parseRangeHeader,\n nodeMajor,\n nodeMinor,\n nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13),\n safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE']\n}\n","'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst {\n ClientDestroyedError,\n ClientClosedError,\n InvalidArgumentError\n} = require('./core/errors')\nconst { kDestroy, kClose, kDispatch, kInterceptors } = require('./core/symbols')\n\nconst kDestroyed = Symbol('destroyed')\nconst kClosed = Symbol('closed')\nconst kOnDestroyed = Symbol('onDestroyed')\nconst kOnClosed = Symbol('onClosed')\nconst kInterceptedDispatch = Symbol('Intercepted Dispatch')\n\nclass DispatcherBase extends Dispatcher {\n constructor () {\n super()\n\n this[kDestroyed] = false\n this[kOnDestroyed] = null\n this[kClosed] = false\n this[kOnClosed] = []\n }\n\n get destroyed () {\n return this[kDestroyed]\n }\n\n get closed () {\n return this[kClosed]\n }\n\n get interceptors () {\n return this[kInterceptors]\n }\n\n set interceptors (newInterceptors) {\n if (newInterceptors) {\n for (let i = newInterceptors.length - 1; i >= 0; i--) {\n const interceptor = this[kInterceptors][i]\n if (typeof interceptor !== 'function') {\n throw new InvalidArgumentError('interceptor must be an function')\n }\n }\n }\n\n this[kInterceptors] = newInterceptors\n }\n\n close (callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.close((err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n queueMicrotask(() => callback(new ClientDestroyedError(), null))\n return\n }\n\n if (this[kClosed]) {\n if (this[kOnClosed]) {\n this[kOnClosed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n this[kClosed] = true\n this[kOnClosed].push(callback)\n\n const onClosed = () => {\n const callbacks = this[kOnClosed]\n this[kOnClosed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kClose]()\n .then(() => this.destroy())\n .then(() => {\n queueMicrotask(onClosed)\n })\n }\n\n destroy (err, callback) {\n if (typeof err === 'function') {\n callback = err\n err = null\n }\n\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.destroy(err, (err, data) => {\n return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n if (this[kOnDestroyed]) {\n this[kOnDestroyed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n if (!err) {\n err = new ClientDestroyedError()\n }\n\n this[kDestroyed] = true\n this[kOnDestroyed] = this[kOnDestroyed] || []\n this[kOnDestroyed].push(callback)\n\n const onDestroyed = () => {\n const callbacks = this[kOnDestroyed]\n this[kOnDestroyed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kDestroy](err).then(() => {\n queueMicrotask(onDestroyed)\n })\n }\n\n [kInterceptedDispatch] (opts, handler) {\n if (!this[kInterceptors] || this[kInterceptors].length === 0) {\n this[kInterceptedDispatch] = this[kDispatch]\n return this[kDispatch](opts, handler)\n }\n\n let dispatch = this[kDispatch].bind(this)\n for (let i = this[kInterceptors].length - 1; i >= 0; i--) {\n dispatch = this[kInterceptors][i](dispatch)\n }\n this[kInterceptedDispatch] = dispatch\n return dispatch(opts, handler)\n }\n\n dispatch (opts, handler) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n try {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object.')\n }\n\n if (this[kDestroyed] || this[kOnDestroyed]) {\n throw new ClientDestroyedError()\n }\n\n if (this[kClosed]) {\n throw new ClientClosedError()\n }\n\n return this[kInterceptedDispatch](opts, handler)\n } catch (err) {\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n handler.onError(err)\n\n return false\n }\n }\n}\n\nmodule.exports = DispatcherBase\n","'use strict'\n\nconst EventEmitter = require('events')\n\nclass Dispatcher extends EventEmitter {\n dispatch () {\n throw new Error('not implemented')\n }\n\n close () {\n throw new Error('not implemented')\n }\n\n destroy () {\n throw new Error('not implemented')\n }\n}\n\nmodule.exports = Dispatcher\n","'use strict'\n\nconst Busboy = require('@fastify/busboy')\nconst util = require('../core/util')\nconst {\n ReadableStreamFrom,\n isBlobLike,\n isReadableStreamLike,\n readableStreamClose,\n createDeferredPromise,\n fullyReadBody\n} = require('./util')\nconst { FormData } = require('./formdata')\nconst { kState } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { DOMException, structuredClone } = require('./constants')\nconst { Blob, File: NativeFile } = require('buffer')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('assert')\nconst { isErrored } = require('../core/util')\nconst { isUint8Array, isArrayBuffer } = require('util/types')\nconst { File: UndiciFile } = require('./file')\nconst { parseMIMEType, serializeAMimeType } = require('./dataURL')\n\nlet ReadableStream = globalThis.ReadableStream\n\n/** @type {globalThis['File']} */\nconst File = NativeFile ?? UndiciFile\nconst textEncoder = new TextEncoder()\nconst textDecoder = new TextDecoder()\n\n// https://fetch.spec.whatwg.org/#concept-bodyinit-extract\nfunction extractBody (object, keepalive = false) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n // 1. Let stream be null.\n let stream = null\n\n // 2. If object is a ReadableStream object, then set stream to object.\n if (object instanceof ReadableStream) {\n stream = object\n } else if (isBlobLike(object)) {\n // 3. Otherwise, if object is a Blob object, set stream to the\n // result of running object’s get stream.\n stream = object.stream()\n } else {\n // 4. Otherwise, set stream to a new ReadableStream object, and set\n // up stream.\n stream = new ReadableStream({\n async pull (controller) {\n controller.enqueue(\n typeof source === 'string' ? textEncoder.encode(source) : source\n )\n queueMicrotask(() => readableStreamClose(controller))\n },\n start () {},\n type: undefined\n })\n }\n\n // 5. Assert: stream is a ReadableStream object.\n assert(isReadableStreamLike(stream))\n\n // 6. Let action be null.\n let action = null\n\n // 7. Let source be null.\n let source = null\n\n // 8. Let length be null.\n let length = null\n\n // 9. Let type be null.\n let type = null\n\n // 10. Switch on object:\n if (typeof object === 'string') {\n // Set source to the UTF-8 encoding of object.\n // Note: setting source to a Uint8Array here breaks some mocking assumptions.\n source = object\n\n // Set type to `text/plain;charset=UTF-8`.\n type = 'text/plain;charset=UTF-8'\n } else if (object instanceof URLSearchParams) {\n // URLSearchParams\n\n // spec says to run application/x-www-form-urlencoded on body.list\n // this is implemented in Node.js as apart of an URLSearchParams instance toString method\n // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490\n // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100\n\n // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list.\n source = object.toString()\n\n // Set type to `application/x-www-form-urlencoded;charset=UTF-8`.\n type = 'application/x-www-form-urlencoded;charset=UTF-8'\n } else if (isArrayBuffer(object)) {\n // BufferSource/ArrayBuffer\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.slice())\n } else if (ArrayBuffer.isView(object)) {\n // BufferSource/ArrayBufferView\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))\n } else if (util.isFormDataLike(object)) {\n const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`\n const prefix = `--${boundary}\\r\\nContent-Disposition: form-data`\n\n /*! formdata-polyfill. MIT License. Jimmy Wärting */\n const escape = (str) =>\n str.replace(/\\n/g, '%0A').replace(/\\r/g, '%0D').replace(/\"/g, '%22')\n const normalizeLinefeeds = (value) => value.replace(/\\r?\\n|\\r/g, '\\r\\n')\n\n // Set action to this step: run the multipart/form-data\n // encoding algorithm, with object’s entry list and UTF-8.\n // - This ensures that the body is immutable and can't be changed afterwords\n // - That the content-length is calculated in advance.\n // - And that all parts are pre-encoded and ready to be sent.\n\n const blobParts = []\n const rn = new Uint8Array([13, 10]) // '\\r\\n'\n length = 0\n let hasUnknownSizeValue = false\n\n for (const [name, value] of object) {\n if (typeof value === 'string') {\n const chunk = textEncoder.encode(prefix +\n `; name=\"${escape(normalizeLinefeeds(name))}\"` +\n `\\r\\n\\r\\n${normalizeLinefeeds(value)}\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n } else {\n const chunk = textEncoder.encode(`${prefix}; name=\"${escape(normalizeLinefeeds(name))}\"` +\n (value.name ? `; filename=\"${escape(value.name)}\"` : '') + '\\r\\n' +\n `Content-Type: ${\n value.type || 'application/octet-stream'\n }\\r\\n\\r\\n`)\n blobParts.push(chunk, value, rn)\n if (typeof value.size === 'number') {\n length += chunk.byteLength + value.size + rn.byteLength\n } else {\n hasUnknownSizeValue = true\n }\n }\n }\n\n const chunk = textEncoder.encode(`--${boundary}--`)\n blobParts.push(chunk)\n length += chunk.byteLength\n if (hasUnknownSizeValue) {\n length = null\n }\n\n // Set source to object.\n source = object\n\n action = async function * () {\n for (const part of blobParts) {\n if (part.stream) {\n yield * part.stream()\n } else {\n yield part\n }\n }\n }\n\n // Set type to `multipart/form-data; boundary=`,\n // followed by the multipart/form-data boundary string generated\n // by the multipart/form-data encoding algorithm.\n type = 'multipart/form-data; boundary=' + boundary\n } else if (isBlobLike(object)) {\n // Blob\n\n // Set source to object.\n source = object\n\n // Set length to object’s size.\n length = object.size\n\n // If object’s type attribute is not the empty byte sequence, set\n // type to its value.\n if (object.type) {\n type = object.type\n }\n } else if (typeof object[Symbol.asyncIterator] === 'function') {\n // If keepalive is true, then throw a TypeError.\n if (keepalive) {\n throw new TypeError('keepalive')\n }\n\n // If object is disturbed or locked, then throw a TypeError.\n if (util.isDisturbed(object) || object.locked) {\n throw new TypeError(\n 'Response body object should not be disturbed or locked'\n )\n }\n\n stream =\n object instanceof ReadableStream ? object : ReadableStreamFrom(object)\n }\n\n // 11. If source is a byte sequence, then set action to a\n // step that returns source and length to source’s length.\n if (typeof source === 'string' || util.isBuffer(source)) {\n length = Buffer.byteLength(source)\n }\n\n // 12. If action is non-null, then run these steps in in parallel:\n if (action != null) {\n // Run action.\n let iterator\n stream = new ReadableStream({\n async start () {\n iterator = action(object)[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { value, done } = await iterator.next()\n if (done) {\n // When running action is done, close stream.\n queueMicrotask(() => {\n controller.close()\n })\n } else {\n // Whenever one or more bytes are available and stream is not errored,\n // enqueue a Uint8Array wrapping an ArrayBuffer containing the available\n // bytes into stream.\n if (!isErrored(stream)) {\n controller.enqueue(new Uint8Array(value))\n }\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n },\n type: undefined\n })\n }\n\n // 13. Let body be a body whose stream is stream, source is source,\n // and length is length.\n const body = { stream, source, length }\n\n // 14. Return (body, type).\n return [body, type]\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit-safely-extract\nfunction safelyExtractBody (object, keepalive = false) {\n if (!ReadableStream) {\n // istanbul ignore next\n ReadableStream = require('stream/web').ReadableStream\n }\n\n // To safely extract a body and a `Content-Type` value from\n // a byte sequence or BodyInit object object, run these steps:\n\n // 1. If object is a ReadableStream object, then:\n if (object instanceof ReadableStream) {\n // Assert: object is neither disturbed nor locked.\n // istanbul ignore next\n assert(!util.isDisturbed(object), 'The body has already been consumed.')\n // istanbul ignore next\n assert(!object.locked, 'The stream is locked.')\n }\n\n // 2. Return the results of extracting object.\n return extractBody(object, keepalive)\n}\n\nfunction cloneBody (body) {\n // To clone a body body, run these steps:\n\n // https://fetch.spec.whatwg.org/#concept-body-clone\n\n // 1. Let « out1, out2 » be the result of teeing body’s stream.\n const [out1, out2] = body.stream.tee()\n const out2Clone = structuredClone(out2, { transfer: [out2] })\n // This, for whatever reasons, unrefs out2Clone which allows\n // the process to exit by itself.\n const [, finalClone] = out2Clone.tee()\n\n // 2. Set body’s stream to out1.\n body.stream = out1\n\n // 3. Return a body whose stream is out2 and other members are copied from body.\n return {\n stream: finalClone,\n length: body.length,\n source: body.source\n }\n}\n\nasync function * consumeBody (body) {\n if (body) {\n if (isUint8Array(body)) {\n yield body\n } else {\n const stream = body.stream\n\n if (util.isDisturbed(stream)) {\n throw new TypeError('The body has already been consumed.')\n }\n\n if (stream.locked) {\n throw new TypeError('The stream is locked.')\n }\n\n // Compat.\n stream[kBodyUsed] = true\n\n yield * stream\n }\n }\n}\n\nfunction throwIfAborted (state) {\n if (state.aborted) {\n throw new DOMException('The operation was aborted.', 'AbortError')\n }\n}\n\nfunction bodyMixinMethods (instance) {\n const methods = {\n blob () {\n // The blob() method steps are to return the result of\n // running consume body with this and the following step\n // given a byte sequence bytes: return a Blob whose\n // contents are bytes and whose type attribute is this’s\n // MIME type.\n return specConsumeBody(this, (bytes) => {\n let mimeType = bodyMimeType(this)\n\n if (mimeType === 'failure') {\n mimeType = ''\n } else if (mimeType) {\n mimeType = serializeAMimeType(mimeType)\n }\n\n // Return a Blob whose contents are bytes and type attribute\n // is mimeType.\n return new Blob([bytes], { type: mimeType })\n }, instance)\n },\n\n arrayBuffer () {\n // The arrayBuffer() method steps are to return the result\n // of running consume body with this and the following step\n // given a byte sequence bytes: return a new ArrayBuffer\n // whose contents are bytes.\n return specConsumeBody(this, (bytes) => {\n return new Uint8Array(bytes).buffer\n }, instance)\n },\n\n text () {\n // The text() method steps are to return the result of running\n // consume body with this and UTF-8 decode.\n return specConsumeBody(this, utf8DecodeBytes, instance)\n },\n\n json () {\n // The json() method steps are to return the result of running\n // consume body with this and parse JSON from bytes.\n return specConsumeBody(this, parseJSONFromBytes, instance)\n },\n\n async formData () {\n webidl.brandCheck(this, instance)\n\n throwIfAborted(this[kState])\n\n const contentType = this.headers.get('Content-Type')\n\n // If mimeType’s essence is \"multipart/form-data\", then:\n if (/multipart\\/form-data/.test(contentType)) {\n const headers = {}\n for (const [key, value] of this.headers) headers[key.toLowerCase()] = value\n\n const responseFormData = new FormData()\n\n let busboy\n\n try {\n busboy = new Busboy({\n headers,\n preservePath: true\n })\n } catch (err) {\n throw new DOMException(`${err}`, 'AbortError')\n }\n\n busboy.on('field', (name, value) => {\n responseFormData.append(name, value)\n })\n busboy.on('file', (name, value, filename, encoding, mimeType) => {\n const chunks = []\n\n if (encoding === 'base64' || encoding.toLowerCase() === 'base64') {\n let base64chunk = ''\n\n value.on('data', (chunk) => {\n base64chunk += chunk.toString().replace(/[\\r\\n]/gm, '')\n\n const end = base64chunk.length - base64chunk.length % 4\n chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64'))\n\n base64chunk = base64chunk.slice(end)\n })\n value.on('end', () => {\n chunks.push(Buffer.from(base64chunk, 'base64'))\n responseFormData.append(name, new File(chunks, filename, { type: mimeType }))\n })\n } else {\n value.on('data', (chunk) => {\n chunks.push(chunk)\n })\n value.on('end', () => {\n responseFormData.append(name, new File(chunks, filename, { type: mimeType }))\n })\n }\n })\n\n const busboyResolve = new Promise((resolve, reject) => {\n busboy.on('finish', resolve)\n busboy.on('error', (err) => reject(new TypeError(err)))\n })\n\n if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk)\n busboy.end()\n await busboyResolve\n\n return responseFormData\n } else if (/application\\/x-www-form-urlencoded/.test(contentType)) {\n // Otherwise, if mimeType’s essence is \"application/x-www-form-urlencoded\", then:\n\n // 1. Let entries be the result of parsing bytes.\n let entries\n try {\n let text = ''\n // application/x-www-form-urlencoded parser will keep the BOM.\n // https://url.spec.whatwg.org/#concept-urlencoded-parser\n // Note that streaming decoder is stateful and cannot be reused\n const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true })\n\n for await (const chunk of consumeBody(this[kState].body)) {\n if (!isUint8Array(chunk)) {\n throw new TypeError('Expected Uint8Array chunk')\n }\n text += streamingDecoder.decode(chunk, { stream: true })\n }\n text += streamingDecoder.decode()\n entries = new URLSearchParams(text)\n } catch (err) {\n // istanbul ignore next: Unclear when new URLSearchParams can fail on a string.\n // 2. If entries is failure, then throw a TypeError.\n throw Object.assign(new TypeError(), { cause: err })\n }\n\n // 3. Return a new FormData object whose entries are entries.\n const formData = new FormData()\n for (const [name, value] of entries) {\n formData.append(name, value)\n }\n return formData\n } else {\n // Wait a tick before checking if the request has been aborted.\n // Otherwise, a TypeError can be thrown when an AbortError should.\n await Promise.resolve()\n\n throwIfAborted(this[kState])\n\n // Otherwise, throw a TypeError.\n throw webidl.errors.exception({\n header: `${instance.name}.formData`,\n message: 'Could not parse content as FormData.'\n })\n }\n }\n }\n\n return methods\n}\n\nfunction mixinBody (prototype) {\n Object.assign(prototype.prototype, bodyMixinMethods(prototype))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-consume-body\n * @param {Response|Request} object\n * @param {(value: unknown) => unknown} convertBytesToJSValue\n * @param {Response|Request} instance\n */\nasync function specConsumeBody (object, convertBytesToJSValue, instance) {\n webidl.brandCheck(object, instance)\n\n throwIfAborted(object[kState])\n\n // 1. If object is unusable, then return a promise rejected\n // with a TypeError.\n if (bodyUnusable(object[kState].body)) {\n throw new TypeError('Body is unusable')\n }\n\n // 2. Let promise be a new promise.\n const promise = createDeferredPromise()\n\n // 3. Let errorSteps given error be to reject promise with error.\n const errorSteps = (error) => promise.reject(error)\n\n // 4. Let successSteps given a byte sequence data be to resolve\n // promise with the result of running convertBytesToJSValue\n // with data. If that threw an exception, then run errorSteps\n // with that exception.\n const successSteps = (data) => {\n try {\n promise.resolve(convertBytesToJSValue(data))\n } catch (e) {\n errorSteps(e)\n }\n }\n\n // 5. If object’s body is null, then run successSteps with an\n // empty byte sequence.\n if (object[kState].body == null) {\n successSteps(new Uint8Array())\n return promise.promise\n }\n\n // 6. Otherwise, fully read object’s body given successSteps,\n // errorSteps, and object’s relevant global object.\n await fullyReadBody(object[kState].body, successSteps, errorSteps)\n\n // 7. Return promise.\n return promise.promise\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction bodyUnusable (body) {\n // An object including the Body interface mixin is\n // said to be unusable if its body is non-null and\n // its body’s stream is disturbed or locked.\n return body != null && (body.stream.locked || util.isDisturbed(body.stream))\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#utf-8-decode\n * @param {Buffer} buffer\n */\nfunction utf8DecodeBytes (buffer) {\n if (buffer.length === 0) {\n return ''\n }\n\n // 1. Let buffer be the result of peeking three bytes from\n // ioQueue, converted to a byte sequence.\n\n // 2. If buffer is 0xEF 0xBB 0xBF, then read three\n // bytes from ioQueue. (Do nothing with those bytes.)\n if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {\n buffer = buffer.subarray(3)\n }\n\n // 3. Process a queue with an instance of UTF-8’s\n // decoder, ioQueue, output, and \"replacement\".\n const output = textDecoder.decode(buffer)\n\n // 4. Return output.\n return output\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value\n * @param {Uint8Array} bytes\n */\nfunction parseJSONFromBytes (bytes) {\n return JSON.parse(utf8DecodeBytes(bytes))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-mime-type\n * @param {import('./response').Response|import('./request').Request} object\n */\nfunction bodyMimeType (object) {\n const { headersList } = object[kState]\n const contentType = headersList.get('content-type')\n\n if (contentType === null) {\n return 'failure'\n }\n\n return parseMIMEType(contentType)\n}\n\nmodule.exports = {\n extractBody,\n safelyExtractBody,\n cloneBody,\n mixinBody\n}\n","'use strict'\n\nconst { MessageChannel, receiveMessageOnPort } = require('worker_threads')\n\nconst corsSafeListedMethods = ['GET', 'HEAD', 'POST']\nconst corsSafeListedMethodsSet = new Set(corsSafeListedMethods)\n\nconst nullBodyStatus = [101, 204, 205, 304]\n\nconst redirectStatus = [301, 302, 303, 307, 308]\nconst redirectStatusSet = new Set(redirectStatus)\n\n// https://fetch.spec.whatwg.org/#block-bad-port\nconst badPorts = [\n '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',\n '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',\n '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',\n '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',\n '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697',\n '10080'\n]\n\nconst badPortsSet = new Set(badPorts)\n\n// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies\nconst referrerPolicy = [\n '',\n 'no-referrer',\n 'no-referrer-when-downgrade',\n 'same-origin',\n 'origin',\n 'strict-origin',\n 'origin-when-cross-origin',\n 'strict-origin-when-cross-origin',\n 'unsafe-url'\n]\nconst referrerPolicySet = new Set(referrerPolicy)\n\nconst requestRedirect = ['follow', 'manual', 'error']\n\nconst safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE']\nconst safeMethodsSet = new Set(safeMethods)\n\nconst requestMode = ['navigate', 'same-origin', 'no-cors', 'cors']\n\nconst requestCredentials = ['omit', 'same-origin', 'include']\n\nconst requestCache = [\n 'default',\n 'no-store',\n 'reload',\n 'no-cache',\n 'force-cache',\n 'only-if-cached'\n]\n\n// https://fetch.spec.whatwg.org/#request-body-header-name\nconst requestBodyHeader = [\n 'content-encoding',\n 'content-language',\n 'content-location',\n 'content-type',\n // See https://github.com/nodejs/undici/issues/2021\n // 'Content-Length' is a forbidden header name, which is typically\n // removed in the Headers implementation. However, undici doesn't\n // filter out headers, so we add it here.\n 'content-length'\n]\n\n// https://fetch.spec.whatwg.org/#enumdef-requestduplex\nconst requestDuplex = [\n 'half'\n]\n\n// http://fetch.spec.whatwg.org/#forbidden-method\nconst forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK']\nconst forbiddenMethodsSet = new Set(forbiddenMethods)\n\nconst subresource = [\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'manifest',\n 'paintworklet',\n 'script',\n 'style',\n 'track',\n 'video',\n 'xslt',\n ''\n]\nconst subresourceSet = new Set(subresource)\n\n/** @type {globalThis['DOMException']} */\nconst DOMException = globalThis.DOMException ?? (() => {\n // DOMException was only made a global in Node v17.0.0,\n // but fetch supports >= v16.8.\n try {\n atob('~')\n } catch (err) {\n return Object.getPrototypeOf(err).constructor\n }\n})()\n\nlet channel\n\n/** @type {globalThis['structuredClone']} */\nconst structuredClone =\n globalThis.structuredClone ??\n // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js\n // structuredClone was added in v17.0.0, but fetch supports v16.8\n function structuredClone (value, options = undefined) {\n if (arguments.length === 0) {\n throw new TypeError('missing argument')\n }\n\n if (!channel) {\n channel = new MessageChannel()\n }\n channel.port1.unref()\n channel.port2.unref()\n channel.port1.postMessage(value, options?.transfer)\n return receiveMessageOnPort(channel.port2).message\n }\n\nmodule.exports = {\n DOMException,\n structuredClone,\n subresource,\n forbiddenMethods,\n requestBodyHeader,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n redirectStatus,\n corsSafeListedMethods,\n nullBodyStatus,\n safeMethods,\n badPorts,\n requestDuplex,\n subresourceSet,\n badPortsSet,\n redirectStatusSet,\n corsSafeListedMethodsSet,\n safeMethodsSet,\n forbiddenMethodsSet,\n referrerPolicySet\n}\n","const assert = require('assert')\nconst { atob } = require('buffer')\nconst { isomorphicDecode } = require('./util')\n\nconst encoder = new TextEncoder()\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-token-code-point\n */\nconst HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/\nconst HTTP_WHITESPACE_REGEX = /(\\u000A|\\u000D|\\u0009|\\u0020)/ // eslint-disable-line\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point\n */\nconst HTTP_QUOTED_STRING_TOKENS = /[\\u0009|\\u0020-\\u007E|\\u0080-\\u00FF]/ // eslint-disable-line\n\n// https://fetch.spec.whatwg.org/#data-url-processor\n/** @param {URL} dataURL */\nfunction dataURLProcessor (dataURL) {\n // 1. Assert: dataURL’s scheme is \"data\".\n assert(dataURL.protocol === 'data:')\n\n // 2. Let input be the result of running the URL\n // serializer on dataURL with exclude fragment\n // set to true.\n let input = URLSerializer(dataURL, true)\n\n // 3. Remove the leading \"data:\" string from input.\n input = input.slice(5)\n\n // 4. Let position point at the start of input.\n const position = { position: 0 }\n\n // 5. Let mimeType be the result of collecting a\n // sequence of code points that are not equal\n // to U+002C (,), given position.\n let mimeType = collectASequenceOfCodePointsFast(\n ',',\n input,\n position\n )\n\n // 6. Strip leading and trailing ASCII whitespace\n // from mimeType.\n // Undici implementation note: we need to store the\n // length because if the mimetype has spaces removed,\n // the wrong amount will be sliced from the input in\n // step #9\n const mimeTypeLength = mimeType.length\n mimeType = removeASCIIWhitespace(mimeType, true, true)\n\n // 7. If position is past the end of input, then\n // return failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 8. Advance position by 1.\n position.position++\n\n // 9. Let encodedBody be the remainder of input.\n const encodedBody = input.slice(mimeTypeLength + 1)\n\n // 10. Let body be the percent-decoding of encodedBody.\n let body = stringPercentDecode(encodedBody)\n\n // 11. If mimeType ends with U+003B (;), followed by\n // zero or more U+0020 SPACE, followed by an ASCII\n // case-insensitive match for \"base64\", then:\n if (/;(\\u0020){0,}base64$/i.test(mimeType)) {\n // 1. Let stringBody be the isomorphic decode of body.\n const stringBody = isomorphicDecode(body)\n\n // 2. Set body to the forgiving-base64 decode of\n // stringBody.\n body = forgivingBase64(stringBody)\n\n // 3. If body is failure, then return failure.\n if (body === 'failure') {\n return 'failure'\n }\n\n // 4. Remove the last 6 code points from mimeType.\n mimeType = mimeType.slice(0, -6)\n\n // 5. Remove trailing U+0020 SPACE code points from mimeType,\n // if any.\n mimeType = mimeType.replace(/(\\u0020)+$/, '')\n\n // 6. Remove the last U+003B (;) code point from mimeType.\n mimeType = mimeType.slice(0, -1)\n }\n\n // 12. If mimeType starts with U+003B (;), then prepend\n // \"text/plain\" to mimeType.\n if (mimeType.startsWith(';')) {\n mimeType = 'text/plain' + mimeType\n }\n\n // 13. Let mimeTypeRecord be the result of parsing\n // mimeType.\n let mimeTypeRecord = parseMIMEType(mimeType)\n\n // 14. If mimeTypeRecord is failure, then set\n // mimeTypeRecord to text/plain;charset=US-ASCII.\n if (mimeTypeRecord === 'failure') {\n mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII')\n }\n\n // 15. Return a new data: URL struct whose MIME\n // type is mimeTypeRecord and body is body.\n // https://fetch.spec.whatwg.org/#data-url-struct\n return { mimeType: mimeTypeRecord, body }\n}\n\n// https://url.spec.whatwg.org/#concept-url-serializer\n/**\n * @param {URL} url\n * @param {boolean} excludeFragment\n */\nfunction URLSerializer (url, excludeFragment = false) {\n if (!excludeFragment) {\n return url.href\n }\n\n const href = url.href\n const hashLength = url.hash.length\n\n return hashLength === 0 ? href : href.substring(0, href.length - hashLength)\n}\n\n// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n/**\n * @param {(char: string) => boolean} condition\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePoints (condition, input, position) {\n // 1. Let result be the empty string.\n let result = ''\n\n // 2. While position doesn’t point past the end of input and the\n // code point at position within input meets the condition condition:\n while (position.position < input.length && condition(input[position.position])) {\n // 1. Append that code point to the end of result.\n result += input[position.position]\n\n // 2. Advance position by 1.\n position.position++\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * A faster collectASequenceOfCodePoints that only works when comparing a single character.\n * @param {string} char\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePointsFast (char, input, position) {\n const idx = input.indexOf(char, position.position)\n const start = position.position\n\n if (idx === -1) {\n position.position = input.length\n return input.slice(start)\n }\n\n position.position = idx\n return input.slice(start, position.position)\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\n/** @param {string} input */\nfunction stringPercentDecode (input) {\n // 1. Let bytes be the UTF-8 encoding of input.\n const bytes = encoder.encode(input)\n\n // 2. Return the percent-decoding of bytes.\n return percentDecode(bytes)\n}\n\n// https://url.spec.whatwg.org/#percent-decode\n/** @param {Uint8Array} input */\nfunction percentDecode (input) {\n // 1. Let output be an empty byte sequence.\n /** @type {number[]} */\n const output = []\n\n // 2. For each byte byte in input:\n for (let i = 0; i < input.length; i++) {\n const byte = input[i]\n\n // 1. If byte is not 0x25 (%), then append byte to output.\n if (byte !== 0x25) {\n output.push(byte)\n\n // 2. Otherwise, if byte is 0x25 (%) and the next two bytes\n // after byte in input are not in the ranges\n // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),\n // and 0x61 (a) to 0x66 (f), all inclusive, append byte\n // to output.\n } else if (\n byte === 0x25 &&\n !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))\n ) {\n output.push(0x25)\n\n // 3. Otherwise:\n } else {\n // 1. Let bytePoint be the two bytes after byte in input,\n // decoded, and then interpreted as hexadecimal number.\n const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2])\n const bytePoint = Number.parseInt(nextTwoBytes, 16)\n\n // 2. Append a byte whose value is bytePoint to output.\n output.push(bytePoint)\n\n // 3. Skip the next two bytes in input.\n i += 2\n }\n }\n\n // 3. Return output.\n return Uint8Array.from(output)\n}\n\n// https://mimesniff.spec.whatwg.org/#parse-a-mime-type\n/** @param {string} input */\nfunction parseMIMEType (input) {\n // 1. Remove any leading and trailing HTTP whitespace\n // from input.\n input = removeHTTPWhitespace(input, true, true)\n\n // 2. Let position be a position variable for input,\n // initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let type be the result of collecting a sequence\n // of code points that are not U+002F (/) from\n // input, given position.\n const type = collectASequenceOfCodePointsFast(\n '/',\n input,\n position\n )\n\n // 4. If type is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n // https://mimesniff.spec.whatwg.org/#http-token-code-point\n if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {\n return 'failure'\n }\n\n // 5. If position is past the end of input, then return\n // failure\n if (position.position > input.length) {\n return 'failure'\n }\n\n // 6. Advance position by 1. (This skips past U+002F (/).)\n position.position++\n\n // 7. Let subtype be the result of collecting a sequence of\n // code points that are not U+003B (;) from input, given\n // position.\n let subtype = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 8. Remove any trailing HTTP whitespace from subtype.\n subtype = removeHTTPWhitespace(subtype, false, true)\n\n // 9. If subtype is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {\n return 'failure'\n }\n\n const typeLowercase = type.toLowerCase()\n const subtypeLowercase = subtype.toLowerCase()\n\n // 10. Let mimeType be a new MIME type record whose type\n // is type, in ASCII lowercase, and subtype is subtype,\n // in ASCII lowercase.\n // https://mimesniff.spec.whatwg.org/#mime-type\n const mimeType = {\n type: typeLowercase,\n subtype: subtypeLowercase,\n /** @type {Map} */\n parameters: new Map(),\n // https://mimesniff.spec.whatwg.org/#mime-type-essence\n essence: `${typeLowercase}/${subtypeLowercase}`\n }\n\n // 11. While position is not past the end of input:\n while (position.position < input.length) {\n // 1. Advance position by 1. (This skips past U+003B (;).)\n position.position++\n\n // 2. Collect a sequence of code points that are HTTP\n // whitespace from input given position.\n collectASequenceOfCodePoints(\n // https://fetch.spec.whatwg.org/#http-whitespace\n char => HTTP_WHITESPACE_REGEX.test(char),\n input,\n position\n )\n\n // 3. Let parameterName be the result of collecting a\n // sequence of code points that are not U+003B (;)\n // or U+003D (=) from input, given position.\n let parameterName = collectASequenceOfCodePoints(\n (char) => char !== ';' && char !== '=',\n input,\n position\n )\n\n // 4. Set parameterName to parameterName, in ASCII\n // lowercase.\n parameterName = parameterName.toLowerCase()\n\n // 5. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 1. If the code point at position within input is\n // U+003B (;), then continue.\n if (input[position.position] === ';') {\n continue\n }\n\n // 2. Advance position by 1. (This skips past U+003D (=).)\n position.position++\n }\n\n // 6. If position is past the end of input, then break.\n if (position.position > input.length) {\n break\n }\n\n // 7. Let parameterValue be null.\n let parameterValue = null\n\n // 8. If the code point at position within input is\n // U+0022 (\"), then:\n if (input[position.position] === '\"') {\n // 1. Set parameterValue to the result of collecting\n // an HTTP quoted string from input, given position\n // and the extract-value flag.\n parameterValue = collectAnHTTPQuotedString(input, position, true)\n\n // 2. Collect a sequence of code points that are not\n // U+003B (;) from input, given position.\n collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 9. Otherwise:\n } else {\n // 1. Set parameterValue to the result of collecting\n // a sequence of code points that are not U+003B (;)\n // from input, given position.\n parameterValue = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 2. Remove any trailing HTTP whitespace from parameterValue.\n parameterValue = removeHTTPWhitespace(parameterValue, false, true)\n\n // 3. If parameterValue is the empty string, then continue.\n if (parameterValue.length === 0) {\n continue\n }\n }\n\n // 10. If all of the following are true\n // - parameterName is not the empty string\n // - parameterName solely contains HTTP token code points\n // - parameterValue solely contains HTTP quoted-string token code points\n // - mimeType’s parameters[parameterName] does not exist\n // then set mimeType’s parameters[parameterName] to parameterValue.\n if (\n parameterName.length !== 0 &&\n HTTP_TOKEN_CODEPOINTS.test(parameterName) &&\n (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) &&\n !mimeType.parameters.has(parameterName)\n ) {\n mimeType.parameters.set(parameterName, parameterValue)\n }\n }\n\n // 12. Return mimeType.\n return mimeType\n}\n\n// https://infra.spec.whatwg.org/#forgiving-base64-decode\n/** @param {string} data */\nfunction forgivingBase64 (data) {\n // 1. Remove all ASCII whitespace from data.\n data = data.replace(/[\\u0009\\u000A\\u000C\\u000D\\u0020]/g, '') // eslint-disable-line\n\n // 2. If data’s code point length divides by 4 leaving\n // no remainder, then:\n if (data.length % 4 === 0) {\n // 1. If data ends with one or two U+003D (=) code points,\n // then remove them from data.\n data = data.replace(/=?=$/, '')\n }\n\n // 3. If data’s code point length divides by 4 leaving\n // a remainder of 1, then return failure.\n if (data.length % 4 === 1) {\n return 'failure'\n }\n\n // 4. If data contains a code point that is not one of\n // U+002B (+)\n // U+002F (/)\n // ASCII alphanumeric\n // then return failure.\n if (/[^+/0-9A-Za-z]/.test(data)) {\n return 'failure'\n }\n\n const binary = atob(data)\n const bytes = new Uint8Array(binary.length)\n\n for (let byte = 0; byte < binary.length; byte++) {\n bytes[byte] = binary.charCodeAt(byte)\n }\n\n return bytes\n}\n\n// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string\n// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string\n/**\n * @param {string} input\n * @param {{ position: number }} position\n * @param {boolean?} extractValue\n */\nfunction collectAnHTTPQuotedString (input, position, extractValue) {\n // 1. Let positionStart be position.\n const positionStart = position.position\n\n // 2. Let value be the empty string.\n let value = ''\n\n // 3. Assert: the code point at position within input\n // is U+0022 (\").\n assert(input[position.position] === '\"')\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. While true:\n while (true) {\n // 1. Append the result of collecting a sequence of code points\n // that are not U+0022 (\") or U+005C (\\) from input, given\n // position, to value.\n value += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== '\\\\',\n input,\n position\n )\n\n // 2. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 3. Let quoteOrBackslash be the code point at position within\n // input.\n const quoteOrBackslash = input[position.position]\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. If quoteOrBackslash is U+005C (\\), then:\n if (quoteOrBackslash === '\\\\') {\n // 1. If position is past the end of input, then append\n // U+005C (\\) to value and break.\n if (position.position >= input.length) {\n value += '\\\\'\n break\n }\n\n // 2. Append the code point at position within input to value.\n value += input[position.position]\n\n // 3. Advance position by 1.\n position.position++\n\n // 6. Otherwise:\n } else {\n // 1. Assert: quoteOrBackslash is U+0022 (\").\n assert(quoteOrBackslash === '\"')\n\n // 2. Break.\n break\n }\n }\n\n // 6. If the extract-value flag is set, then return value.\n if (extractValue) {\n return value\n }\n\n // 7. Return the code points from positionStart to position,\n // inclusive, within input.\n return input.slice(positionStart, position.position)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\n */\nfunction serializeAMimeType (mimeType) {\n assert(mimeType !== 'failure')\n const { parameters, essence } = mimeType\n\n // 1. Let serialization be the concatenation of mimeType’s\n // type, U+002F (/), and mimeType’s subtype.\n let serialization = essence\n\n // 2. For each name → value of mimeType’s parameters:\n for (let [name, value] of parameters.entries()) {\n // 1. Append U+003B (;) to serialization.\n serialization += ';'\n\n // 2. Append name to serialization.\n serialization += name\n\n // 3. Append U+003D (=) to serialization.\n serialization += '='\n\n // 4. If value does not solely contain HTTP token code\n // points or value is the empty string, then:\n if (!HTTP_TOKEN_CODEPOINTS.test(value)) {\n // 1. Precede each occurence of U+0022 (\") or\n // U+005C (\\) in value with U+005C (\\).\n value = value.replace(/(\\\\|\")/g, '\\\\$1')\n\n // 2. Prepend U+0022 (\") to value.\n value = '\"' + value\n\n // 3. Append U+0022 (\") to value.\n value += '\"'\n }\n\n // 5. Append value to serialization.\n serialization += value\n }\n\n // 3. Return serialization.\n return serialization\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} char\n */\nfunction isHTTPWhiteSpace (char) {\n return char === '\\r' || char === '\\n' || char === '\\t' || char === ' '\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} str\n */\nfunction removeHTTPWhitespace (str, leading = true, trailing = true) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++);\n }\n\n if (trailing) {\n for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--);\n }\n\n return str.slice(lead, trail + 1)\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n * @param {string} char\n */\nfunction isASCIIWhitespace (char) {\n return char === '\\r' || char === '\\n' || char === '\\t' || char === '\\f' || char === ' '\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace\n */\nfunction removeASCIIWhitespace (str, leading = true, trailing = true) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++);\n }\n\n if (trailing) {\n for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--);\n }\n\n return str.slice(lead, trail + 1)\n}\n\nmodule.exports = {\n dataURLProcessor,\n URLSerializer,\n collectASequenceOfCodePoints,\n collectASequenceOfCodePointsFast,\n stringPercentDecode,\n parseMIMEType,\n collectAnHTTPQuotedString,\n serializeAMimeType\n}\n","'use strict'\n\nconst { Blob, File: NativeFile } = require('buffer')\nconst { types } = require('util')\nconst { kState } = require('./symbols')\nconst { isBlobLike } = require('./util')\nconst { webidl } = require('./webidl')\nconst { parseMIMEType, serializeAMimeType } = require('./dataURL')\nconst { kEnumerableProperty } = require('../core/util')\nconst encoder = new TextEncoder()\n\nclass File extends Blob {\n constructor (fileBits, fileName, options = {}) {\n // The File constructor is invoked with two or three parameters, depending\n // on whether the optional dictionary parameter is used. When the File()\n // constructor is invoked, user agents must run the following steps:\n webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' })\n\n fileBits = webidl.converters['sequence'](fileBits)\n fileName = webidl.converters.USVString(fileName)\n options = webidl.converters.FilePropertyBag(options)\n\n // 1. Let bytes be the result of processing blob parts given fileBits and\n // options.\n // Note: Blob handles this for us\n\n // 2. Let n be the fileName argument to the constructor.\n const n = fileName\n\n // 3. Process FilePropertyBag dictionary argument by running the following\n // substeps:\n\n // 1. If the type member is provided and is not the empty string, let t\n // be set to the type dictionary member. If t contains any characters\n // outside the range U+0020 to U+007E, then set t to the empty string\n // and return from these substeps.\n // 2. Convert every character in t to ASCII lowercase.\n let t = options.type\n let d\n\n // eslint-disable-next-line no-labels\n substep: {\n if (t) {\n t = parseMIMEType(t)\n\n if (t === 'failure') {\n t = ''\n // eslint-disable-next-line no-labels\n break substep\n }\n\n t = serializeAMimeType(t).toLowerCase()\n }\n\n // 3. If the lastModified member is provided, let d be set to the\n // lastModified dictionary member. If it is not provided, set d to the\n // current date and time represented as the number of milliseconds since\n // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).\n d = options.lastModified\n }\n\n // 4. Return a new File object F such that:\n // F refers to the bytes byte sequence.\n // F.size is set to the number of total bytes in bytes.\n // F.name is set to n.\n // F.type is set to t.\n // F.lastModified is set to d.\n\n super(processBlobParts(fileBits, options), { type: t })\n this[kState] = {\n name: n,\n lastModified: d,\n type: t\n }\n }\n\n get name () {\n webidl.brandCheck(this, File)\n\n return this[kState].name\n }\n\n get lastModified () {\n webidl.brandCheck(this, File)\n\n return this[kState].lastModified\n }\n\n get type () {\n webidl.brandCheck(this, File)\n\n return this[kState].type\n }\n}\n\nclass FileLike {\n constructor (blobLike, fileName, options = {}) {\n // TODO: argument idl type check\n\n // The File constructor is invoked with two or three parameters, depending\n // on whether the optional dictionary parameter is used. When the File()\n // constructor is invoked, user agents must run the following steps:\n\n // 1. Let bytes be the result of processing blob parts given fileBits and\n // options.\n\n // 2. Let n be the fileName argument to the constructor.\n const n = fileName\n\n // 3. Process FilePropertyBag dictionary argument by running the following\n // substeps:\n\n // 1. If the type member is provided and is not the empty string, let t\n // be set to the type dictionary member. If t contains any characters\n // outside the range U+0020 to U+007E, then set t to the empty string\n // and return from these substeps.\n // TODO\n const t = options.type\n\n // 2. Convert every character in t to ASCII lowercase.\n // TODO\n\n // 3. If the lastModified member is provided, let d be set to the\n // lastModified dictionary member. If it is not provided, set d to the\n // current date and time represented as the number of milliseconds since\n // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).\n const d = options.lastModified ?? Date.now()\n\n // 4. Return a new File object F such that:\n // F refers to the bytes byte sequence.\n // F.size is set to the number of total bytes in bytes.\n // F.name is set to n.\n // F.type is set to t.\n // F.lastModified is set to d.\n\n this[kState] = {\n blobLike,\n name: n,\n type: t,\n lastModified: d\n }\n }\n\n stream (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.stream(...args)\n }\n\n arrayBuffer (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.arrayBuffer(...args)\n }\n\n slice (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.slice(...args)\n }\n\n text (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.text(...args)\n }\n\n get size () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.size\n }\n\n get type () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.type\n }\n\n get name () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].name\n }\n\n get lastModified () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].lastModified\n }\n\n get [Symbol.toStringTag] () {\n return 'File'\n }\n}\n\nObject.defineProperties(File.prototype, {\n [Symbol.toStringTag]: {\n value: 'File',\n configurable: true\n },\n name: kEnumerableProperty,\n lastModified: kEnumerableProperty\n})\n\nwebidl.converters.Blob = webidl.interfaceConverter(Blob)\n\nwebidl.converters.BlobPart = function (V, opts) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (\n ArrayBuffer.isView(V) ||\n types.isAnyArrayBuffer(V)\n ) {\n return webidl.converters.BufferSource(V, opts)\n }\n }\n\n return webidl.converters.USVString(V, opts)\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.BlobPart\n)\n\n// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag\nwebidl.converters.FilePropertyBag = webidl.dictionaryConverter([\n {\n key: 'lastModified',\n converter: webidl.converters['long long'],\n get defaultValue () {\n return Date.now()\n }\n },\n {\n key: 'type',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'endings',\n converter: (value) => {\n value = webidl.converters.DOMString(value)\n value = value.toLowerCase()\n\n if (value !== 'native') {\n value = 'transparent'\n }\n\n return value\n },\n defaultValue: 'transparent'\n }\n])\n\n/**\n * @see https://www.w3.org/TR/FileAPI/#process-blob-parts\n * @param {(NodeJS.TypedArray|Blob|string)[]} parts\n * @param {{ type: string, endings: string }} options\n */\nfunction processBlobParts (parts, options) {\n // 1. Let bytes be an empty sequence of bytes.\n /** @type {NodeJS.TypedArray[]} */\n const bytes = []\n\n // 2. For each element in parts:\n for (const element of parts) {\n // 1. If element is a USVString, run the following substeps:\n if (typeof element === 'string') {\n // 1. Let s be element.\n let s = element\n\n // 2. If the endings member of options is \"native\", set s\n // to the result of converting line endings to native\n // of element.\n if (options.endings === 'native') {\n s = convertLineEndingsNative(s)\n }\n\n // 3. Append the result of UTF-8 encoding s to bytes.\n bytes.push(encoder.encode(s))\n } else if (\n types.isAnyArrayBuffer(element) ||\n types.isTypedArray(element)\n ) {\n // 2. If element is a BufferSource, get a copy of the\n // bytes held by the buffer source, and append those\n // bytes to bytes.\n if (!element.buffer) { // ArrayBuffer\n bytes.push(new Uint8Array(element))\n } else {\n bytes.push(\n new Uint8Array(element.buffer, element.byteOffset, element.byteLength)\n )\n }\n } else if (isBlobLike(element)) {\n // 3. If element is a Blob, append the bytes it represents\n // to bytes.\n bytes.push(element)\n }\n }\n\n // 3. Return bytes.\n return bytes\n}\n\n/**\n * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native\n * @param {string} s\n */\nfunction convertLineEndingsNative (s) {\n // 1. Let native line ending be be the code point U+000A LF.\n let nativeLineEnding = '\\n'\n\n // 2. If the underlying platform’s conventions are to\n // represent newlines as a carriage return and line feed\n // sequence, set native line ending to the code point\n // U+000D CR followed by the code point U+000A LF.\n if (process.platform === 'win32') {\n nativeLineEnding = '\\r\\n'\n }\n\n return s.replace(/\\r?\\n/g, nativeLineEnding)\n}\n\n// If this function is moved to ./util.js, some tools (such as\n// rollup) will warn about circular dependencies. See:\n// https://github.com/nodejs/undici/issues/1629\nfunction isFileLike (object) {\n return (\n (NativeFile && object instanceof NativeFile) ||\n object instanceof File || (\n object &&\n (typeof object.stream === 'function' ||\n typeof object.arrayBuffer === 'function') &&\n object[Symbol.toStringTag] === 'File'\n )\n )\n}\n\nmodule.exports = { File, FileLike, isFileLike }\n","'use strict'\n\nconst { isBlobLike, toUSVString, makeIterator } = require('./util')\nconst { kState } = require('./symbols')\nconst { File: UndiciFile, FileLike, isFileLike } = require('./file')\nconst { webidl } = require('./webidl')\nconst { Blob, File: NativeFile } = require('buffer')\n\n/** @type {globalThis['File']} */\nconst File = NativeFile ?? UndiciFile\n\n// https://xhr.spec.whatwg.org/#formdata\nclass FormData {\n constructor (form) {\n if (form !== undefined) {\n throw webidl.errors.conversionFailed({\n prefix: 'FormData constructor',\n argument: 'Argument 1',\n types: ['undefined']\n })\n }\n\n this[kState] = []\n }\n\n append (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' })\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name)\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, { strict: false })\n : webidl.converters.USVString(value)\n filename = arguments.length === 3\n ? webidl.converters.USVString(filename)\n : undefined\n\n // 2. Let entry be the result of creating an entry with\n // name, value, and filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. Append entry to this’s entry list.\n this[kState].push(entry)\n }\n\n delete (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' })\n\n name = webidl.converters.USVString(name)\n\n // The delete(name) method steps are to remove all entries whose name\n // is name from this’s entry list.\n this[kState] = this[kState].filter(entry => entry.name !== name)\n }\n\n get (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' })\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this’s entry list,\n // then return null.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx === -1) {\n return null\n }\n\n // 2. Return the value of the first entry whose name is name from\n // this’s entry list.\n return this[kState][idx].value\n }\n\n getAll (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' })\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this’s entry list,\n // then return the empty list.\n // 2. Return the values of all entries whose name is name, in order,\n // from this’s entry list.\n return this[kState]\n .filter((entry) => entry.name === name)\n .map((entry) => entry.value)\n }\n\n has (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' })\n\n name = webidl.converters.USVString(name)\n\n // The has(name) method steps are to return true if there is an entry\n // whose name is name in this’s entry list; otherwise false.\n return this[kState].findIndex((entry) => entry.name === name) !== -1\n }\n\n set (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' })\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // The set(name, value) and set(name, blobValue, filename) method steps\n // are:\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name)\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, { strict: false })\n : webidl.converters.USVString(value)\n filename = arguments.length === 3\n ? toUSVString(filename)\n : undefined\n\n // 2. Let entry be the result of creating an entry with name, value, and\n // filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. If there are entries in this’s entry list whose name is name, then\n // replace the first such entry with entry and remove the others.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx !== -1) {\n this[kState] = [\n ...this[kState].slice(0, idx),\n entry,\n ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name)\n ]\n } else {\n // 4. Otherwise, append entry to this’s entry list.\n this[kState].push(entry)\n }\n }\n\n entries () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'key+value'\n )\n }\n\n keys () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'key'\n )\n }\n\n values () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'value'\n )\n }\n\n /**\n * @param {(value: string, key: string, self: FormData) => void} callbackFn\n * @param {unknown} thisArg\n */\n forEach (callbackFn, thisArg = globalThis) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' })\n\n if (typeof callbackFn !== 'function') {\n throw new TypeError(\n \"Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.\"\n )\n }\n\n for (const [key, value] of this) {\n callbackFn.apply(thisArg, [value, key, this])\n }\n }\n}\n\nFormData.prototype[Symbol.iterator] = FormData.prototype.entries\n\nObject.defineProperties(FormData.prototype, {\n [Symbol.toStringTag]: {\n value: 'FormData',\n configurable: true\n }\n})\n\n/**\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry\n * @param {string} name\n * @param {string|Blob} value\n * @param {?string} filename\n * @returns\n */\nfunction makeEntry (name, value, filename) {\n // 1. Set name to the result of converting name into a scalar value string.\n // \"To convert a string into a scalar value string, replace any surrogates\n // with U+FFFD.\"\n // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end\n name = Buffer.from(name).toString('utf8')\n\n // 2. If value is a string, then set value to the result of converting\n // value into a scalar value string.\n if (typeof value === 'string') {\n value = Buffer.from(value).toString('utf8')\n } else {\n // 3. Otherwise:\n\n // 1. If value is not a File object, then set value to a new File object,\n // representing the same bytes, whose name attribute value is \"blob\"\n if (!isFileLike(value)) {\n value = value instanceof Blob\n ? new File([value], 'blob', { type: value.type })\n : new FileLike(value, 'blob', { type: value.type })\n }\n\n // 2. If filename is given, then set value to a new File object,\n // representing the same bytes, whose name attribute is filename.\n if (filename !== undefined) {\n /** @type {FilePropertyBag} */\n const options = {\n type: value.type,\n lastModified: value.lastModified\n }\n\n value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile\n ? new File([value], filename, options)\n : new FileLike(value, filename, options)\n }\n }\n\n // 4. Return an entry whose name is name and whose value is value.\n return { name, value }\n}\n\nmodule.exports = { FormData }\n","'use strict'\n\n// In case of breaking changes, increase the version\n// number to avoid conflicts.\nconst globalOrigin = Symbol.for('undici.globalOrigin.1')\n\nfunction getGlobalOrigin () {\n return globalThis[globalOrigin]\n}\n\nfunction setGlobalOrigin (newOrigin) {\n if (newOrigin === undefined) {\n Object.defineProperty(globalThis, globalOrigin, {\n value: undefined,\n writable: true,\n enumerable: false,\n configurable: false\n })\n\n return\n }\n\n const parsedURL = new URL(newOrigin)\n\n if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {\n throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)\n }\n\n Object.defineProperty(globalThis, globalOrigin, {\n value: parsedURL,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nmodule.exports = {\n getGlobalOrigin,\n setGlobalOrigin\n}\n","// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst { kGuard } = require('./symbols')\nconst { kEnumerableProperty } = require('../core/util')\nconst {\n makeIterator,\n isValidHeaderName,\n isValidHeaderValue\n} = require('./util')\nconst { webidl } = require('./webidl')\nconst assert = require('assert')\n\nconst kHeadersMap = Symbol('headers map')\nconst kHeadersSortedMap = Symbol('headers map sorted')\n\n/**\n * @param {number} code\n */\nfunction isHTTPWhiteSpaceCharCode (code) {\n return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize\n * @param {string} potentialValue\n */\nfunction headerValueNormalize (potentialValue) {\n // To normalize a byte sequence potentialValue, remove\n // any leading and trailing HTTP whitespace bytes from\n // potentialValue.\n let i = 0; let j = potentialValue.length\n\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i\n\n return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j)\n}\n\nfunction fill (headers, object) {\n // To fill a Headers object headers with a given object object, run these steps:\n\n // 1. If object is a sequence, then for each header in object:\n // Note: webidl conversion to array has already been done.\n if (Array.isArray(object)) {\n for (let i = 0; i < object.length; ++i) {\n const header = object[i]\n // 1. If header does not contain exactly two items, then throw a TypeError.\n if (header.length !== 2) {\n throw webidl.errors.exception({\n header: 'Headers constructor',\n message: `expected name/value pair to be length 2, found ${header.length}.`\n })\n }\n\n // 2. Append (header’s first item, header’s second item) to headers.\n appendHeader(headers, header[0], header[1])\n }\n } else if (typeof object === 'object' && object !== null) {\n // Note: null should throw\n\n // 2. Otherwise, object is a record, then for each key → value in object,\n // append (key, value) to headers\n const keys = Object.keys(object)\n for (let i = 0; i < keys.length; ++i) {\n appendHeader(headers, keys[i], object[keys[i]])\n }\n } else {\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-headers-append\n */\nfunction appendHeader (headers, name, value) {\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value,\n type: 'header value'\n })\n }\n\n // 3. If headers’s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if headers’s guard is \"request\" and name is a\n // forbidden header name, return.\n // Note: undici does not implement forbidden header names\n if (headers[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (headers[kGuard] === 'request-no-cors') {\n // 5. Otherwise, if headers’s guard is \"request-no-cors\":\n // TODO\n }\n\n // 6. Otherwise, if headers’s guard is \"response\" and name is a\n // forbidden response-header name, return.\n\n // 7. Append (name, value) to headers’s header list.\n return headers[kHeadersList].append(name, value)\n\n // 8. If headers’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from headers\n}\n\nclass HeadersList {\n /** @type {[string, string][]|null} */\n cookies = null\n\n constructor (init) {\n if (init instanceof HeadersList) {\n this[kHeadersMap] = new Map(init[kHeadersMap])\n this[kHeadersSortedMap] = init[kHeadersSortedMap]\n this.cookies = init.cookies === null ? null : [...init.cookies]\n } else {\n this[kHeadersMap] = new Map(init)\n this[kHeadersSortedMap] = null\n }\n }\n\n // https://fetch.spec.whatwg.org/#header-list-contains\n contains (name) {\n // A header list list contains a header name name if list\n // contains a header whose name is a byte-case-insensitive\n // match for name.\n name = name.toLowerCase()\n\n return this[kHeadersMap].has(name)\n }\n\n clear () {\n this[kHeadersMap].clear()\n this[kHeadersSortedMap] = null\n this.cookies = null\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-append\n append (name, value) {\n this[kHeadersSortedMap] = null\n\n // 1. If list contains name, then set name to the first such\n // header’s name.\n const lowercaseName = name.toLowerCase()\n const exists = this[kHeadersMap].get(lowercaseName)\n\n // 2. Append (name, value) to list.\n if (exists) {\n const delimiter = lowercaseName === 'cookie' ? '; ' : ', '\n this[kHeadersMap].set(lowercaseName, {\n name: exists.name,\n value: `${exists.value}${delimiter}${value}`\n })\n } else {\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n if (lowercaseName === 'set-cookie') {\n this.cookies ??= []\n this.cookies.push(value)\n }\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-set\n set (name, value) {\n this[kHeadersSortedMap] = null\n const lowercaseName = name.toLowerCase()\n\n if (lowercaseName === 'set-cookie') {\n this.cookies = [value]\n }\n\n // 1. If list contains name, then set the value of\n // the first such header to value and remove the\n // others.\n // 2. Otherwise, append header (name, value) to list.\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-delete\n delete (name) {\n this[kHeadersSortedMap] = null\n\n name = name.toLowerCase()\n\n if (name === 'set-cookie') {\n this.cookies = null\n }\n\n this[kHeadersMap].delete(name)\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-get\n get (name) {\n const value = this[kHeadersMap].get(name.toLowerCase())\n\n // 1. If list does not contain name, then return null.\n // 2. Return the values of all headers in list whose name\n // is a byte-case-insensitive match for name,\n // separated from each other by 0x2C 0x20, in order.\n return value === undefined ? null : value.value\n }\n\n * [Symbol.iterator] () {\n // use the lowercased name\n for (const [name, { value }] of this[kHeadersMap]) {\n yield [name, value]\n }\n }\n\n get entries () {\n const headers = {}\n\n if (this[kHeadersMap].size) {\n for (const { name, value } of this[kHeadersMap].values()) {\n headers[name] = value\n }\n }\n\n return headers\n }\n}\n\n// https://fetch.spec.whatwg.org/#headers-class\nclass Headers {\n constructor (init = undefined) {\n if (init === kConstruct) {\n return\n }\n this[kHeadersList] = new HeadersList()\n\n // The new Headers(init) constructor steps are:\n\n // 1. Set this’s guard to \"none\".\n this[kGuard] = 'none'\n\n // 2. If init is given, then fill this with init.\n if (init !== undefined) {\n init = webidl.converters.HeadersInit(init)\n fill(this, init)\n }\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-append\n append (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' })\n\n name = webidl.converters.ByteString(name)\n value = webidl.converters.ByteString(value)\n\n return appendHeader(this, name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-delete\n delete (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.delete',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. If this’s guard is \"immutable\", then throw a TypeError.\n // 3. Otherwise, if this’s guard is \"request\" and name is a\n // forbidden header name, return.\n // 4. Otherwise, if this’s guard is \"request-no-cors\", name\n // is not a no-CORS-safelisted request-header name, and\n // name is not a privileged no-CORS request-header name,\n // return.\n // 5. Otherwise, if this’s guard is \"response\" and name is\n // a forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (this[kGuard] === 'request-no-cors') {\n // TODO\n }\n\n // 6. If this’s header list does not contain name, then\n // return.\n if (!this[kHeadersList].contains(name)) {\n return\n }\n\n // 7. Delete name from this’s header list.\n // 8. If this’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this.\n this[kHeadersList].delete(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-get\n get (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.get',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return the result of getting name from this’s header\n // list.\n return this[kHeadersList].get(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-has\n has (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.has',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return true if this’s header list contains name;\n // otherwise false.\n return this[kHeadersList].contains(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-set\n set (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' })\n\n name = webidl.converters.ByteString(name)\n value = webidl.converters.ByteString(value)\n\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.set',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.set',\n value,\n type: 'header value'\n })\n }\n\n // 3. If this’s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if this’s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if this’s guard is \"request-no-cors\" and\n // name/value is not a no-CORS-safelisted request-header,\n // return.\n // 6. Otherwise, if this’s guard is \"response\" and name is a\n // forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (this[kGuard] === 'request-no-cors') {\n // TODO\n }\n\n // 7. Set (name, value) in this’s header list.\n // 8. If this’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this\n this[kHeadersList].set(name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie\n getSetCookie () {\n webidl.brandCheck(this, Headers)\n\n // 1. If this’s header list does not contain `Set-Cookie`, then return « ».\n // 2. Return the values of all headers in this’s header list whose name is\n // a byte-case-insensitive match for `Set-Cookie`, in order.\n\n const list = this[kHeadersList].cookies\n\n if (list) {\n return [...list]\n }\n\n return []\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n get [kHeadersSortedMap] () {\n if (this[kHeadersList][kHeadersSortedMap]) {\n return this[kHeadersList][kHeadersSortedMap]\n }\n\n // 1. Let headers be an empty list of headers with the key being the name\n // and value the value.\n const headers = []\n\n // 2. Let names be the result of convert header names to a sorted-lowercase\n // set with all the names of the headers in list.\n const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1)\n const cookies = this[kHeadersList].cookies\n\n // 3. For each name of names:\n for (let i = 0; i < names.length; ++i) {\n const [name, value] = names[i]\n // 1. If name is `set-cookie`, then:\n if (name === 'set-cookie') {\n // 1. Let values be a list of all values of headers in list whose name\n // is a byte-case-insensitive match for name, in order.\n\n // 2. For each value of values:\n // 1. Append (name, value) to headers.\n for (let j = 0; j < cookies.length; ++j) {\n headers.push([name, cookies[j]])\n }\n } else {\n // 2. Otherwise:\n\n // 1. Let value be the result of getting name from list.\n\n // 2. Assert: value is non-null.\n assert(value !== null)\n\n // 3. Append (name, value) to headers.\n headers.push([name, value])\n }\n }\n\n this[kHeadersList][kHeadersSortedMap] = headers\n\n // 4. Return headers.\n return headers\n }\n\n keys () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'key')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'key'\n )\n }\n\n values () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'value')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'value'\n )\n }\n\n entries () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'key+value')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'key+value'\n )\n }\n\n /**\n * @param {(value: string, key: string, self: Headers) => void} callbackFn\n * @param {unknown} thisArg\n */\n forEach (callbackFn, thisArg = globalThis) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' })\n\n if (typeof callbackFn !== 'function') {\n throw new TypeError(\n \"Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.\"\n )\n }\n\n for (const [key, value] of this) {\n callbackFn.apply(thisArg, [value, key, this])\n }\n }\n\n [Symbol.for('nodejs.util.inspect.custom')] () {\n webidl.brandCheck(this, Headers)\n\n return this[kHeadersList]\n }\n}\n\nHeaders.prototype[Symbol.iterator] = Headers.prototype.entries\n\nObject.defineProperties(Headers.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n getSetCookie: kEnumerableProperty,\n keys: kEnumerableProperty,\n values: kEnumerableProperty,\n entries: kEnumerableProperty,\n forEach: kEnumerableProperty,\n [Symbol.iterator]: { enumerable: false },\n [Symbol.toStringTag]: {\n value: 'Headers',\n configurable: true\n }\n})\n\nwebidl.converters.HeadersInit = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (V[Symbol.iterator]) {\n return webidl.converters['sequence>'](V)\n }\n\n return webidl.converters['record'](V)\n }\n\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n}\n\nmodule.exports = {\n fill,\n Headers,\n HeadersList\n}\n","// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst {\n Response,\n makeNetworkError,\n makeAppropriateNetworkError,\n filterResponse,\n makeResponse\n} = require('./response')\nconst { Headers } = require('./headers')\nconst { Request, makeRequest } = require('./request')\nconst zlib = require('zlib')\nconst {\n bytesMatch,\n makePolicyContainer,\n clonePolicyContainer,\n requestBadPort,\n TAOCheck,\n appendRequestOriginHeader,\n responseLocationURL,\n requestCurrentURL,\n setRequestReferrerPolicyOnRedirect,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n createOpaqueTimingInfo,\n appendFetchMetadata,\n corsCheck,\n crossOriginResourcePolicyCheck,\n determineRequestsReferrer,\n coarsenedSharedCurrentTime,\n createDeferredPromise,\n isBlobLike,\n sameOrigin,\n isCancelled,\n isAborted,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n isomorphicEncode,\n urlIsLocal,\n urlIsHttpHttpsScheme,\n urlHasHttpsScheme\n} = require('./util')\nconst { kState, kHeaders, kGuard, kRealm } = require('./symbols')\nconst assert = require('assert')\nconst { safelyExtractBody } = require('./body')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n safeMethodsSet,\n requestBodyHeader,\n subresourceSet,\n DOMException\n} = require('./constants')\nconst { kHeadersList } = require('../core/symbols')\nconst EE = require('events')\nconst { Readable, pipeline } = require('stream')\nconst { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require('../core/util')\nconst { dataURLProcessor, serializeAMimeType } = require('./dataURL')\nconst { TransformStream } = require('stream/web')\nconst { getGlobalDispatcher } = require('../global')\nconst { webidl } = require('./webidl')\nconst { STATUS_CODES } = require('http')\nconst GET_OR_HEAD = ['GET', 'HEAD']\n\n/** @type {import('buffer').resolveObjectURL} */\nlet resolveObjectURL\nlet ReadableStream = globalThis.ReadableStream\n\nclass Fetch extends EE {\n constructor (dispatcher) {\n super()\n\n this.dispatcher = dispatcher\n this.connection = null\n this.dump = false\n this.state = 'ongoing'\n // 2 terminated listeners get added per request,\n // but only 1 gets removed. If there are 20 redirects,\n // 21 listeners will be added.\n // See https://github.com/nodejs/undici/issues/1711\n // TODO (fix): Find and fix root cause for leaked listener.\n this.setMaxListeners(21)\n }\n\n terminate (reason) {\n if (this.state !== 'ongoing') {\n return\n }\n\n this.state = 'terminated'\n this.connection?.destroy(reason)\n this.emit('terminated', reason)\n }\n\n // https://fetch.spec.whatwg.org/#fetch-controller-abort\n abort (error) {\n if (this.state !== 'ongoing') {\n return\n }\n\n // 1. Set controller’s state to \"aborted\".\n this.state = 'aborted'\n\n // 2. Let fallbackError be an \"AbortError\" DOMException.\n // 3. Set error to fallbackError if it is not given.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 4. Let serializedError be StructuredSerialize(error).\n // If that threw an exception, catch it, and let\n // serializedError be StructuredSerialize(fallbackError).\n\n // 5. Set controller’s serialized abort reason to serializedError.\n this.serializedAbortReason = error\n\n this.connection?.destroy(error)\n this.emit('terminated', error)\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-method\nfunction fetch (input, init = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' })\n\n // 1. Let p be a new promise.\n const p = createDeferredPromise()\n\n // 2. Let requestObject be the result of invoking the initial value of\n // Request as constructor with input and init as arguments. If this throws\n // an exception, reject p with it and return p.\n let requestObject\n\n try {\n requestObject = new Request(input, init)\n } catch (e) {\n p.reject(e)\n return p.promise\n }\n\n // 3. Let request be requestObject’s request.\n const request = requestObject[kState]\n\n // 4. If requestObject’s signal’s aborted flag is set, then:\n if (requestObject.signal.aborted) {\n // 1. Abort the fetch() call with p, request, null, and\n // requestObject’s signal’s abort reason.\n abortFetch(p, request, null, requestObject.signal.reason)\n\n // 2. Return p.\n return p.promise\n }\n\n // 5. Let globalObject be request’s client’s global object.\n const globalObject = request.client.globalObject\n\n // 6. If globalObject is a ServiceWorkerGlobalScope object, then set\n // request’s service-workers mode to \"none\".\n if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') {\n request.serviceWorkers = 'none'\n }\n\n // 7. Let responseObject be null.\n let responseObject = null\n\n // 8. Let relevantRealm be this’s relevant Realm.\n const relevantRealm = null\n\n // 9. Let locallyAborted be false.\n let locallyAborted = false\n\n // 10. Let controller be null.\n let controller = null\n\n // 11. Add the following abort steps to requestObject’s signal:\n addAbortListener(\n requestObject.signal,\n () => {\n // 1. Set locallyAborted to true.\n locallyAborted = true\n\n // 2. Assert: controller is non-null.\n assert(controller != null)\n\n // 3. Abort controller with requestObject’s signal’s abort reason.\n controller.abort(requestObject.signal.reason)\n\n // 4. Abort the fetch() call with p, request, responseObject,\n // and requestObject’s signal’s abort reason.\n abortFetch(p, request, responseObject, requestObject.signal.reason)\n }\n )\n\n // 12. Let handleFetchDone given response response be to finalize and\n // report timing with response, globalObject, and \"fetch\".\n const handleFetchDone = (response) =>\n finalizeAndReportTiming(response, 'fetch')\n\n // 13. Set controller to the result of calling fetch given request,\n // with processResponseEndOfBody set to handleFetchDone, and processResponse\n // given response being these substeps:\n\n const processResponse = (response) => {\n // 1. If locallyAborted is true, terminate these substeps.\n if (locallyAborted) {\n return Promise.resolve()\n }\n\n // 2. If response’s aborted flag is set, then:\n if (response.aborted) {\n // 1. Let deserializedError be the result of deserialize a serialized\n // abort reason given controller’s serialized abort reason and\n // relevantRealm.\n\n // 2. Abort the fetch() call with p, request, responseObject, and\n // deserializedError.\n\n abortFetch(p, request, responseObject, controller.serializedAbortReason)\n return Promise.resolve()\n }\n\n // 3. If response is a network error, then reject p with a TypeError\n // and terminate these substeps.\n if (response.type === 'error') {\n p.reject(\n Object.assign(new TypeError('fetch failed'), { cause: response.error })\n )\n return Promise.resolve()\n }\n\n // 4. Set responseObject to the result of creating a Response object,\n // given response, \"immutable\", and relevantRealm.\n responseObject = new Response()\n responseObject[kState] = response\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kHeadersList] = response.headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 5. Resolve p with responseObject.\n p.resolve(responseObject)\n }\n\n controller = fetching({\n request,\n processResponseEndOfBody: handleFetchDone,\n processResponse,\n dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici\n })\n\n // 14. Return p.\n return p.promise\n}\n\n// https://fetch.spec.whatwg.org/#finalize-and-report-timing\nfunction finalizeAndReportTiming (response, initiatorType = 'other') {\n // 1. If response is an aborted network error, then return.\n if (response.type === 'error' && response.aborted) {\n return\n }\n\n // 2. If response’s URL list is null or empty, then return.\n if (!response.urlList?.length) {\n return\n }\n\n // 3. Let originalURL be response’s URL list[0].\n const originalURL = response.urlList[0]\n\n // 4. Let timingInfo be response’s timing info.\n let timingInfo = response.timingInfo\n\n // 5. Let cacheState be response’s cache state.\n let cacheState = response.cacheState\n\n // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(originalURL)) {\n return\n }\n\n // 7. If timingInfo is null, then return.\n if (timingInfo === null) {\n return\n }\n\n // 8. If response’s timing allow passed flag is not set, then:\n if (!response.timingAllowPassed) {\n // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.\n timingInfo = createOpaqueTimingInfo({\n startTime: timingInfo.startTime\n })\n\n // 2. Set cacheState to the empty string.\n cacheState = ''\n }\n\n // 9. Set timingInfo’s end time to the coarsened shared current time\n // given global’s relevant settings object’s cross-origin isolated\n // capability.\n // TODO: given global’s relevant settings object’s cross-origin isolated\n // capability?\n timingInfo.endTime = coarsenedSharedCurrentTime()\n\n // 10. Set response’s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 11. Mark resource timing for timingInfo, originalURL, initiatorType,\n // global, and cacheState.\n markResourceTiming(\n timingInfo,\n originalURL,\n initiatorType,\n globalThis,\n cacheState\n )\n}\n\n// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing\nfunction markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) {\n if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) {\n performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState)\n }\n}\n\n// https://fetch.spec.whatwg.org/#abort-fetch\nfunction abortFetch (p, request, responseObject, error) {\n // Note: AbortSignal.reason was added in node v17.2.0\n // which would give us an undefined error to reject with.\n // Remove this once node v16 is no longer supported.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 1. Reject promise with error.\n p.reject(error)\n\n // 2. If request’s body is not null and is readable, then cancel request’s\n // body with error.\n if (request.body != null && isReadable(request.body?.stream)) {\n request.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n\n // 3. If responseObject is null, then return.\n if (responseObject == null) {\n return\n }\n\n // 4. Let response be responseObject’s response.\n const response = responseObject[kState]\n\n // 5. If response’s body is not null and is readable, then error response’s\n // body with error.\n if (response.body != null && isReadable(response.body?.stream)) {\n response.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetching\nfunction fetching ({\n request,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseEndOfBody,\n processResponseConsumeBody,\n useParallelQueue = false,\n dispatcher // undici\n}) {\n // 1. Let taskDestination be null.\n let taskDestination = null\n\n // 2. Let crossOriginIsolatedCapability be false.\n let crossOriginIsolatedCapability = false\n\n // 3. If request’s client is non-null, then:\n if (request.client != null) {\n // 1. Set taskDestination to request’s client’s global object.\n taskDestination = request.client.globalObject\n\n // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin\n // isolated capability.\n crossOriginIsolatedCapability =\n request.client.crossOriginIsolatedCapability\n }\n\n // 4. If useParallelQueue is true, then set taskDestination to the result of\n // starting a new parallel queue.\n // TODO\n\n // 5. Let timingInfo be a new fetch timing info whose start time and\n // post-redirect start time are the coarsened shared current time given\n // crossOriginIsolatedCapability.\n const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)\n const timingInfo = createOpaqueTimingInfo({\n startTime: currenTime\n })\n\n // 6. Let fetchParams be a new fetch params whose\n // request is request,\n // timing info is timingInfo,\n // process request body chunk length is processRequestBodyChunkLength,\n // process request end-of-body is processRequestEndOfBody,\n // process response is processResponse,\n // process response consume body is processResponseConsumeBody,\n // process response end-of-body is processResponseEndOfBody,\n // task destination is taskDestination,\n // and cross-origin isolated capability is crossOriginIsolatedCapability.\n const fetchParams = {\n controller: new Fetch(dispatcher),\n request,\n timingInfo,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseConsumeBody,\n processResponseEndOfBody,\n taskDestination,\n crossOriginIsolatedCapability\n }\n\n // 7. If request’s body is a byte sequence, then set request’s body to\n // request’s body as a body.\n // NOTE: Since fetching is only called from fetch, body should already be\n // extracted.\n assert(!request.body || request.body.stream)\n\n // 8. If request’s window is \"client\", then set request’s window to request’s\n // client, if request’s client’s global object is a Window object; otherwise\n // \"no-window\".\n if (request.window === 'client') {\n // TODO: What if request.client is null?\n request.window =\n request.client?.globalObject?.constructor?.name === 'Window'\n ? request.client\n : 'no-window'\n }\n\n // 9. If request’s origin is \"client\", then set request’s origin to request’s\n // client’s origin.\n if (request.origin === 'client') {\n // TODO: What if request.client is null?\n request.origin = request.client?.origin\n }\n\n // 10. If all of the following conditions are true:\n // TODO\n\n // 11. If request’s policy container is \"client\", then:\n if (request.policyContainer === 'client') {\n // 1. If request’s client is non-null, then set request’s policy\n // container to a clone of request’s client’s policy container. [HTML]\n if (request.client != null) {\n request.policyContainer = clonePolicyContainer(\n request.client.policyContainer\n )\n } else {\n // 2. Otherwise, set request’s policy container to a new policy\n // container.\n request.policyContainer = makePolicyContainer()\n }\n }\n\n // 12. If request’s header list does not contain `Accept`, then:\n if (!request.headersList.contains('accept')) {\n // 1. Let value be `*/*`.\n const value = '*/*'\n\n // 2. A user agent should set value to the first matching statement, if\n // any, switching on request’s destination:\n // \"document\"\n // \"frame\"\n // \"iframe\"\n // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`\n // \"image\"\n // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`\n // \"style\"\n // `text/css,*/*;q=0.1`\n // TODO\n\n // 3. Append `Accept`/value to request’s header list.\n request.headersList.append('accept', value)\n }\n\n // 13. If request’s header list does not contain `Accept-Language`, then\n // user agents should append `Accept-Language`/an appropriate value to\n // request’s header list.\n if (!request.headersList.contains('accept-language')) {\n request.headersList.append('accept-language', '*')\n }\n\n // 14. If request’s priority is null, then use request’s initiator and\n // destination appropriately in setting request’s priority to a\n // user-agent-defined object.\n if (request.priority === null) {\n // TODO\n }\n\n // 15. If request is a subresource request, then:\n if (subresourceSet.has(request.destination)) {\n // TODO\n }\n\n // 16. Run main fetch given fetchParams.\n mainFetch(fetchParams)\n .catch(err => {\n fetchParams.controller.terminate(err)\n })\n\n // 17. Return fetchParam's controller\n return fetchParams.controller\n}\n\n// https://fetch.spec.whatwg.org/#concept-main-fetch\nasync function mainFetch (fetchParams, recursive = false) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. If request’s local-URLs-only flag is set and request’s current URL is\n // not local, then set response to a network error.\n if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) {\n response = makeNetworkError('local URLs only')\n }\n\n // 4. Run report Content Security Policy violations for request.\n // TODO\n\n // 5. Upgrade request to a potentially trustworthy URL, if appropriate.\n tryUpgradeRequestToAPotentiallyTrustworthyURL(request)\n\n // 6. If should request be blocked due to a bad port, should fetching request\n // be blocked as mixed content, or should request be blocked by Content\n // Security Policy returns blocked, then set response to a network error.\n if (requestBadPort(request) === 'blocked') {\n response = makeNetworkError('bad port')\n }\n // TODO: should fetching request be blocked as mixed content?\n // TODO: should request be blocked by Content Security Policy?\n\n // 7. If request’s referrer policy is the empty string, then set request’s\n // referrer policy to request’s policy container’s referrer policy.\n if (request.referrerPolicy === '') {\n request.referrerPolicy = request.policyContainer.referrerPolicy\n }\n\n // 8. If request’s referrer is not \"no-referrer\", then set request’s\n // referrer to the result of invoking determine request’s referrer.\n if (request.referrer !== 'no-referrer') {\n request.referrer = determineRequestsReferrer(request)\n }\n\n // 9. Set request’s current URL’s scheme to \"https\" if all of the following\n // conditions are true:\n // - request’s current URL’s scheme is \"http\"\n // - request’s current URL’s host is a domain\n // - Matching request’s current URL’s host per Known HSTS Host Domain Name\n // Matching results in either a superdomain match with an asserted\n // includeSubDomains directive or a congruent match (with or without an\n // asserted includeSubDomains directive). [HSTS]\n // TODO\n\n // 10. If recursive is false, then run the remaining steps in parallel.\n // TODO\n\n // 11. If response is null, then set response to the result of running\n // the steps corresponding to the first matching statement:\n if (response === null) {\n response = await (async () => {\n const currentURL = requestCurrentURL(request)\n\n if (\n // - request’s current URL’s origin is same origin with request’s origin,\n // and request’s response tainting is \"basic\"\n (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') ||\n // request’s current URL’s scheme is \"data\"\n (currentURL.protocol === 'data:') ||\n // - request’s mode is \"navigate\" or \"websocket\"\n (request.mode === 'navigate' || request.mode === 'websocket')\n ) {\n // 1. Set request’s response tainting to \"basic\".\n request.responseTainting = 'basic'\n\n // 2. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request’s mode is \"same-origin\"\n if (request.mode === 'same-origin') {\n // 1. Return a network error.\n return makeNetworkError('request mode cannot be \"same-origin\"')\n }\n\n // request’s mode is \"no-cors\"\n if (request.mode === 'no-cors') {\n // 1. If request’s redirect mode is not \"follow\", then return a network\n // error.\n if (request.redirect !== 'follow') {\n return makeNetworkError(\n 'redirect mode cannot be \"follow\" for \"no-cors\" request'\n )\n }\n\n // 2. Set request’s response tainting to \"opaque\".\n request.responseTainting = 'opaque'\n\n // 3. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request’s current URL’s scheme is not an HTTP(S) scheme\n if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) {\n // Return a network error.\n return makeNetworkError('URL scheme must be a HTTP(S) scheme')\n }\n\n // - request’s use-CORS-preflight flag is set\n // - request’s unsafe-request flag is set and either request’s method is\n // not a CORS-safelisted method or CORS-unsafe request-header names with\n // request’s header list is not empty\n // 1. Set request’s response tainting to \"cors\".\n // 2. Let corsWithPreflightResponse be the result of running HTTP fetch\n // given fetchParams and true.\n // 3. If corsWithPreflightResponse is a network error, then clear cache\n // entries using request.\n // 4. Return corsWithPreflightResponse.\n // TODO\n\n // Otherwise\n // 1. Set request’s response tainting to \"cors\".\n request.responseTainting = 'cors'\n\n // 2. Return the result of running HTTP fetch given fetchParams.\n return await httpFetch(fetchParams)\n })()\n }\n\n // 12. If recursive is true, then return response.\n if (recursive) {\n return response\n }\n\n // 13. If response is not a network error and response is not a filtered\n // response, then:\n if (response.status !== 0 && !response.internalResponse) {\n // If request’s response tainting is \"cors\", then:\n if (request.responseTainting === 'cors') {\n // 1. Let headerNames be the result of extracting header list values\n // given `Access-Control-Expose-Headers` and response’s header list.\n // TODO\n // 2. If request’s credentials mode is not \"include\" and headerNames\n // contains `*`, then set response’s CORS-exposed header-name list to\n // all unique header names in response’s header list.\n // TODO\n // 3. Otherwise, if headerNames is not null or failure, then set\n // response’s CORS-exposed header-name list to headerNames.\n // TODO\n }\n\n // Set response to the following filtered response with response as its\n // internal response, depending on request’s response tainting:\n if (request.responseTainting === 'basic') {\n response = filterResponse(response, 'basic')\n } else if (request.responseTainting === 'cors') {\n response = filterResponse(response, 'cors')\n } else if (request.responseTainting === 'opaque') {\n response = filterResponse(response, 'opaque')\n } else {\n assert(false)\n }\n }\n\n // 14. Let internalResponse be response, if response is a network error,\n // and response’s internal response otherwise.\n let internalResponse =\n response.status === 0 ? response : response.internalResponse\n\n // 15. If internalResponse’s URL list is empty, then set it to a clone of\n // request’s URL list.\n if (internalResponse.urlList.length === 0) {\n internalResponse.urlList.push(...request.urlList)\n }\n\n // 16. If request’s timing allow failed flag is unset, then set\n // internalResponse’s timing allow passed flag.\n if (!request.timingAllowFailed) {\n response.timingAllowPassed = true\n }\n\n // 17. If response is not a network error and any of the following returns\n // blocked\n // - should internalResponse to request be blocked as mixed content\n // - should internalResponse to request be blocked by Content Security Policy\n // - should internalResponse to request be blocked due to its MIME type\n // - should internalResponse to request be blocked due to nosniff\n // TODO\n\n // 18. If response’s type is \"opaque\", internalResponse’s status is 206,\n // internalResponse’s range-requested flag is set, and request’s header\n // list does not contain `Range`, then set response and internalResponse\n // to a network error.\n if (\n response.type === 'opaque' &&\n internalResponse.status === 206 &&\n internalResponse.rangeRequested &&\n !request.headers.contains('range')\n ) {\n response = internalResponse = makeNetworkError()\n }\n\n // 19. If response is not a network error and either request’s method is\n // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status,\n // set internalResponse’s body to null and disregard any enqueuing toward\n // it (if any).\n if (\n response.status !== 0 &&\n (request.method === 'HEAD' ||\n request.method === 'CONNECT' ||\n nullBodyStatus.includes(internalResponse.status))\n ) {\n internalResponse.body = null\n fetchParams.controller.dump = true\n }\n\n // 20. If request’s integrity metadata is not the empty string, then:\n if (request.integrity) {\n // 1. Let processBodyError be this step: run fetch finale given fetchParams\n // and a network error.\n const processBodyError = (reason) =>\n fetchFinale(fetchParams, makeNetworkError(reason))\n\n // 2. If request’s response tainting is \"opaque\", or response’s body is null,\n // then run processBodyError and abort these steps.\n if (request.responseTainting === 'opaque' || response.body == null) {\n processBodyError(response.error)\n return\n }\n\n // 3. Let processBody given bytes be these steps:\n const processBody = (bytes) => {\n // 1. If bytes do not match request’s integrity metadata,\n // then run processBodyError and abort these steps. [SRI]\n if (!bytesMatch(bytes, request.integrity)) {\n processBodyError('integrity mismatch')\n return\n }\n\n // 2. Set response’s body to bytes as a body.\n response.body = safelyExtractBody(bytes)[0]\n\n // 3. Run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n\n // 4. Fully read response’s body given processBody and processBodyError.\n await fullyReadBody(response.body, processBody, processBodyError)\n } else {\n // 21. Otherwise, run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-scheme-fetch\n// given a fetch params fetchParams\nfunction schemeFetch (fetchParams) {\n // Note: since the connection is destroyed on redirect, which sets fetchParams to a\n // cancelled state, we do not want this condition to trigger *unless* there have been\n // no redirects. See https://github.com/nodejs/undici/issues/1776\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {\n return Promise.resolve(makeAppropriateNetworkError(fetchParams))\n }\n\n // 2. Let request be fetchParams’s request.\n const { request } = fetchParams\n\n const { protocol: scheme } = requestCurrentURL(request)\n\n // 3. Switch on request’s current URL’s scheme and run the associated steps:\n switch (scheme) {\n case 'about:': {\n // If request’s current URL’s path is the string \"blank\", then return a new response\n // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) »,\n // and body is the empty byte sequence as a body.\n\n // Otherwise, return a network error.\n return Promise.resolve(makeNetworkError('about scheme is not supported'))\n }\n case 'blob:': {\n if (!resolveObjectURL) {\n resolveObjectURL = require('buffer').resolveObjectURL\n }\n\n // 1. Let blobURLEntry be request’s current URL’s blob URL entry.\n const blobURLEntry = requestCurrentURL(request)\n\n // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n // Buffer.resolveObjectURL does not ignore URL queries.\n if (blobURLEntry.search.length !== 0) {\n return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.'))\n }\n\n const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString())\n\n // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s\n // object is not a Blob object, then return a network error.\n if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) {\n return Promise.resolve(makeNetworkError('invalid method'))\n }\n\n // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object.\n const bodyWithType = safelyExtractBody(blobURLEntryObject)\n\n // 4. Let body be bodyWithType’s body.\n const body = bodyWithType[0]\n\n // 5. Let length be body’s length, serialized and isomorphic encoded.\n const length = isomorphicEncode(`${body.length}`)\n\n // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence.\n const type = bodyWithType[1] ?? ''\n\n // 7. Return a new response whose status message is `OK`, header list is\n // « (`Content-Length`, length), (`Content-Type`, type) », and body is body.\n const response = makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-length', { name: 'Content-Length', value: length }],\n ['content-type', { name: 'Content-Type', value: type }]\n ]\n })\n\n response.body = body\n\n return Promise.resolve(response)\n }\n case 'data:': {\n // 1. Let dataURLStruct be the result of running the\n // data: URL processor on request’s current URL.\n const currentURL = requestCurrentURL(request)\n const dataURLStruct = dataURLProcessor(currentURL)\n\n // 2. If dataURLStruct is failure, then return a\n // network error.\n if (dataURLStruct === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 3. Let mimeType be dataURLStruct’s MIME type, serialized.\n const mimeType = serializeAMimeType(dataURLStruct.mimeType)\n\n // 4. Return a response whose status message is `OK`,\n // header list is « (`Content-Type`, mimeType) »,\n // and body is dataURLStruct’s body as a body.\n return Promise.resolve(makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-type', { name: 'Content-Type', value: mimeType }]\n ],\n body: safelyExtractBody(dataURLStruct.body)[0]\n }))\n }\n case 'file:': {\n // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n // When in doubt, return a network error.\n return Promise.resolve(makeNetworkError('not implemented... yet...'))\n }\n case 'http:':\n case 'https:': {\n // Return the result of running HTTP fetch given fetchParams.\n\n return httpFetch(fetchParams)\n .catch((err) => makeNetworkError(err))\n }\n default: {\n return Promise.resolve(makeNetworkError('unknown scheme'))\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#finalize-response\nfunction finalizeResponse (fetchParams, response) {\n // 1. Set fetchParams’s request’s done flag.\n fetchParams.request.done = true\n\n // 2, If fetchParams’s process response done is not null, then queue a fetch\n // task to run fetchParams’s process response done given response, with\n // fetchParams’s task destination.\n if (fetchParams.processResponseDone != null) {\n queueMicrotask(() => fetchParams.processResponseDone(response))\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-finale\nfunction fetchFinale (fetchParams, response) {\n // 1. If response is a network error, then:\n if (response.type === 'error') {\n // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ».\n response.urlList = [fetchParams.request.urlList[0]]\n\n // 2. Set response’s timing info to the result of creating an opaque timing\n // info for fetchParams’s timing info.\n response.timingInfo = createOpaqueTimingInfo({\n startTime: fetchParams.timingInfo.startTime\n })\n }\n\n // 2. Let processResponseEndOfBody be the following steps:\n const processResponseEndOfBody = () => {\n // 1. Set fetchParams’s request’s done flag.\n fetchParams.request.done = true\n\n // If fetchParams’s process response end-of-body is not null,\n // then queue a fetch task to run fetchParams’s process response\n // end-of-body given response with fetchParams’s task destination.\n if (fetchParams.processResponseEndOfBody != null) {\n queueMicrotask(() => fetchParams.processResponseEndOfBody(response))\n }\n }\n\n // 3. If fetchParams’s process response is non-null, then queue a fetch task\n // to run fetchParams’s process response given response, with fetchParams’s\n // task destination.\n if (fetchParams.processResponse != null) {\n queueMicrotask(() => fetchParams.processResponse(response))\n }\n\n // 4. If response’s body is null, then run processResponseEndOfBody.\n if (response.body == null) {\n processResponseEndOfBody()\n } else {\n // 5. Otherwise:\n\n // 1. Let transformStream be a new a TransformStream.\n\n // 2. Let identityTransformAlgorithm be an algorithm which, given chunk,\n // enqueues chunk in transformStream.\n const identityTransformAlgorithm = (chunk, controller) => {\n controller.enqueue(chunk)\n }\n\n // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm\n // and flushAlgorithm set to processResponseEndOfBody.\n const transformStream = new TransformStream({\n start () {},\n transform: identityTransformAlgorithm,\n flush: processResponseEndOfBody\n }, {\n size () {\n return 1\n }\n }, {\n size () {\n return 1\n }\n })\n\n // 4. Set response’s body to the result of piping response’s body through transformStream.\n response.body = { stream: response.body.stream.pipeThrough(transformStream) }\n }\n\n // 6. If fetchParams’s process response consume body is non-null, then:\n if (fetchParams.processResponseConsumeBody != null) {\n // 1. Let processBody given nullOrBytes be this step: run fetchParams’s\n // process response consume body given response and nullOrBytes.\n const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes)\n\n // 2. Let processBodyError be this step: run fetchParams’s process\n // response consume body given response and failure.\n const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure)\n\n // 3. If response’s body is null, then queue a fetch task to run processBody\n // given null, with fetchParams’s task destination.\n if (response.body == null) {\n queueMicrotask(() => processBody(null))\n } else {\n // 4. Otherwise, fully read response’s body given processBody, processBodyError,\n // and fetchParams’s task destination.\n return fullyReadBody(response.body, processBody, processBodyError)\n }\n return Promise.resolve()\n }\n}\n\n// https://fetch.spec.whatwg.org/#http-fetch\nasync function httpFetch (fetchParams) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let actualResponse be null.\n let actualResponse = null\n\n // 4. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 5. If request’s service-workers mode is \"all\", then:\n if (request.serviceWorkers === 'all') {\n // TODO\n }\n\n // 6. If response is null, then:\n if (response === null) {\n // 1. If makeCORSPreflight is true and one of these conditions is true:\n // TODO\n\n // 2. If request’s redirect mode is \"follow\", then set request’s\n // service-workers mode to \"none\".\n if (request.redirect === 'follow') {\n request.serviceWorkers = 'none'\n }\n\n // 3. Set response and actualResponse to the result of running\n // HTTP-network-or-cache fetch given fetchParams.\n actualResponse = response = await httpNetworkOrCacheFetch(fetchParams)\n\n // 4. If request’s response tainting is \"cors\" and a CORS check\n // for request and response returns failure, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n corsCheck(request, response) === 'failure'\n ) {\n return makeNetworkError('cors failure')\n }\n\n // 5. If the TAO check for request and response returns failure, then set\n // request’s timing allow failed flag.\n if (TAOCheck(request, response) === 'failure') {\n request.timingAllowFailed = true\n }\n }\n\n // 7. If either request’s response tainting or response’s type\n // is \"opaque\", and the cross-origin resource policy check with\n // request’s origin, request’s client, request’s destination,\n // and actualResponse returns blocked, then return a network error.\n if (\n (request.responseTainting === 'opaque' || response.type === 'opaque') &&\n crossOriginResourcePolicyCheck(\n request.origin,\n request.client,\n request.destination,\n actualResponse\n ) === 'blocked'\n ) {\n return makeNetworkError('blocked')\n }\n\n // 8. If actualResponse’s status is a redirect status, then:\n if (redirectStatusSet.has(actualResponse.status)) {\n // 1. If actualResponse’s status is not 303, request’s body is not null,\n // and the connection uses HTTP/2, then user agents may, and are even\n // encouraged to, transmit an RST_STREAM frame.\n // See, https://github.com/whatwg/fetch/issues/1288\n if (request.redirect !== 'manual') {\n fetchParams.controller.connection.destroy()\n }\n\n // 2. Switch on request’s redirect mode:\n if (request.redirect === 'error') {\n // Set response to a network error.\n response = makeNetworkError('unexpected redirect')\n } else if (request.redirect === 'manual') {\n // Set response to an opaque-redirect filtered response whose internal\n // response is actualResponse.\n // NOTE(spec): On the web this would return an `opaqueredirect` response,\n // but that doesn't make sense server side.\n // See https://github.com/nodejs/undici/issues/1193.\n response = actualResponse\n } else if (request.redirect === 'follow') {\n // Set response to the result of running HTTP-redirect fetch given\n // fetchParams and response.\n response = await httpRedirectFetch(fetchParams, response)\n } else {\n assert(false)\n }\n }\n\n // 9. Set response’s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 10. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-redirect-fetch\nfunction httpRedirectFetch (fetchParams, response) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let actualResponse be response, if response is not a filtered response,\n // and response’s internal response otherwise.\n const actualResponse = response.internalResponse\n ? response.internalResponse\n : response\n\n // 3. Let locationURL be actualResponse’s location URL given request’s current\n // URL’s fragment.\n let locationURL\n\n try {\n locationURL = responseLocationURL(\n actualResponse,\n requestCurrentURL(request).hash\n )\n\n // 4. If locationURL is null, then return response.\n if (locationURL == null) {\n return response\n }\n } catch (err) {\n // 5. If locationURL is failure, then return a network error.\n return Promise.resolve(makeNetworkError(err))\n }\n\n // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network\n // error.\n if (!urlIsHttpHttpsScheme(locationURL)) {\n return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme'))\n }\n\n // 7. If request’s redirect count is 20, then return a network error.\n if (request.redirectCount === 20) {\n return Promise.resolve(makeNetworkError('redirect count exceeded'))\n }\n\n // 8. Increase request’s redirect count by 1.\n request.redirectCount += 1\n\n // 9. If request’s mode is \"cors\", locationURL includes credentials, and\n // request’s origin is not same origin with locationURL’s origin, then return\n // a network error.\n if (\n request.mode === 'cors' &&\n (locationURL.username || locationURL.password) &&\n !sameOrigin(request, locationURL)\n ) {\n return Promise.resolve(makeNetworkError('cross origin not allowed for request mode \"cors\"'))\n }\n\n // 10. If request’s response tainting is \"cors\" and locationURL includes\n // credentials, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n (locationURL.username || locationURL.password)\n ) {\n return Promise.resolve(makeNetworkError(\n 'URL cannot contain credentials for request mode \"cors\"'\n ))\n }\n\n // 11. If actualResponse’s status is not 303, request’s body is non-null,\n // and request’s body’s source is null, then return a network error.\n if (\n actualResponse.status !== 303 &&\n request.body != null &&\n request.body.source == null\n ) {\n return Promise.resolve(makeNetworkError())\n }\n\n // 12. If one of the following is true\n // - actualResponse’s status is 301 or 302 and request’s method is `POST`\n // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD`\n if (\n ([301, 302].includes(actualResponse.status) && request.method === 'POST') ||\n (actualResponse.status === 303 &&\n !GET_OR_HEAD.includes(request.method))\n ) {\n // then:\n // 1. Set request’s method to `GET` and request’s body to null.\n request.method = 'GET'\n request.body = null\n\n // 2. For each headerName of request-body-header name, delete headerName from\n // request’s header list.\n for (const headerName of requestBodyHeader) {\n request.headersList.delete(headerName)\n }\n }\n\n // 13. If request’s current URL’s origin is not same origin with locationURL’s\n // origin, then for each headerName of CORS non-wildcard request-header name,\n // delete headerName from request’s header list.\n if (!sameOrigin(requestCurrentURL(request), locationURL)) {\n // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name\n request.headersList.delete('authorization')\n\n // https://fetch.spec.whatwg.org/#authentication-entries\n request.headersList.delete('proxy-authorization', true)\n\n // \"Cookie\" and \"Host\" are forbidden request-headers, which undici doesn't implement.\n request.headersList.delete('cookie')\n request.headersList.delete('host')\n }\n\n // 14. If request’s body is non-null, then set request’s body to the first return\n // value of safely extracting request’s body’s source.\n if (request.body != null) {\n assert(request.body.source != null)\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 15. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 16. Set timingInfo’s redirect end time and post-redirect start time to the\n // coarsened shared current time given fetchParams’s cross-origin isolated\n // capability.\n timingInfo.redirectEndTime = timingInfo.postRedirectStartTime =\n coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n\n // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s\n // redirect start time to timingInfo’s start time.\n if (timingInfo.redirectStartTime === 0) {\n timingInfo.redirectStartTime = timingInfo.startTime\n }\n\n // 18. Append locationURL to request’s URL list.\n request.urlList.push(locationURL)\n\n // 19. Invoke set request’s referrer policy on redirect on request and\n // actualResponse.\n setRequestReferrerPolicyOnRedirect(request, actualResponse)\n\n // 20. Return the result of running main fetch given fetchParams and true.\n return mainFetch(fetchParams, true)\n}\n\n// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch\nasync function httpNetworkOrCacheFetch (\n fetchParams,\n isAuthenticationFetch = false,\n isNewConnectionFetch = false\n) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let httpFetchParams be null.\n let httpFetchParams = null\n\n // 3. Let httpRequest be null.\n let httpRequest = null\n\n // 4. Let response be null.\n let response = null\n\n // 5. Let storedResponse be null.\n // TODO: cache\n\n // 6. Let httpCache be null.\n const httpCache = null\n\n // 7. Let the revalidatingFlag be unset.\n const revalidatingFlag = false\n\n // 8. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If request’s window is \"no-window\" and request’s redirect mode is\n // \"error\", then set httpFetchParams to fetchParams and httpRequest to\n // request.\n if (request.window === 'no-window' && request.redirect === 'error') {\n httpFetchParams = fetchParams\n httpRequest = request\n } else {\n // Otherwise:\n\n // 1. Set httpRequest to a clone of request.\n httpRequest = makeRequest(request)\n\n // 2. Set httpFetchParams to a copy of fetchParams.\n httpFetchParams = { ...fetchParams }\n\n // 3. Set httpFetchParams’s request to httpRequest.\n httpFetchParams.request = httpRequest\n }\n\n // 3. Let includeCredentials be true if one of\n const includeCredentials =\n request.credentials === 'include' ||\n (request.credentials === 'same-origin' &&\n request.responseTainting === 'basic')\n\n // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s\n // body is non-null; otherwise null.\n const contentLength = httpRequest.body ? httpRequest.body.length : null\n\n // 5. Let contentLengthHeaderValue be null.\n let contentLengthHeaderValue = null\n\n // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or\n // `PUT`, then set contentLengthHeaderValue to `0`.\n if (\n httpRequest.body == null &&\n ['POST', 'PUT'].includes(httpRequest.method)\n ) {\n contentLengthHeaderValue = '0'\n }\n\n // 7. If contentLength is non-null, then set contentLengthHeaderValue to\n // contentLength, serialized and isomorphic encoded.\n if (contentLength != null) {\n contentLengthHeaderValue = isomorphicEncode(`${contentLength}`)\n }\n\n // 8. If contentLengthHeaderValue is non-null, then append\n // `Content-Length`/contentLengthHeaderValue to httpRequest’s header\n // list.\n if (contentLengthHeaderValue != null) {\n httpRequest.headersList.append('content-length', contentLengthHeaderValue)\n }\n\n // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,\n // contentLengthHeaderValue) to httpRequest’s header list.\n\n // 10. If contentLength is non-null and httpRequest’s keepalive is true,\n // then:\n if (contentLength != null && httpRequest.keepalive) {\n // NOTE: keepalive is a noop outside of browser context.\n }\n\n // 11. If httpRequest’s referrer is a URL, then append\n // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded,\n // to httpRequest’s header list.\n if (httpRequest.referrer instanceof URL) {\n httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href))\n }\n\n // 12. Append a request `Origin` header for httpRequest.\n appendRequestOriginHeader(httpRequest)\n\n // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA]\n appendFetchMetadata(httpRequest)\n\n // 14. If httpRequest’s header list does not contain `User-Agent`, then\n // user agents should append `User-Agent`/default `User-Agent` value to\n // httpRequest’s header list.\n if (!httpRequest.headersList.contains('user-agent')) {\n httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node')\n }\n\n // 15. If httpRequest’s cache mode is \"default\" and httpRequest’s header\n // list contains `If-Modified-Since`, `If-None-Match`,\n // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set\n // httpRequest’s cache mode to \"no-store\".\n if (\n httpRequest.cache === 'default' &&\n (httpRequest.headersList.contains('if-modified-since') ||\n httpRequest.headersList.contains('if-none-match') ||\n httpRequest.headersList.contains('if-unmodified-since') ||\n httpRequest.headersList.contains('if-match') ||\n httpRequest.headersList.contains('if-range'))\n ) {\n httpRequest.cache = 'no-store'\n }\n\n // 16. If httpRequest’s cache mode is \"no-cache\", httpRequest’s prevent\n // no-cache cache-control header modification flag is unset, and\n // httpRequest’s header list does not contain `Cache-Control`, then append\n // `Cache-Control`/`max-age=0` to httpRequest’s header list.\n if (\n httpRequest.cache === 'no-cache' &&\n !httpRequest.preventNoCacheCacheControlHeaderModification &&\n !httpRequest.headersList.contains('cache-control')\n ) {\n httpRequest.headersList.append('cache-control', 'max-age=0')\n }\n\n // 17. If httpRequest’s cache mode is \"no-store\" or \"reload\", then:\n if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') {\n // 1. If httpRequest’s header list does not contain `Pragma`, then append\n // `Pragma`/`no-cache` to httpRequest’s header list.\n if (!httpRequest.headersList.contains('pragma')) {\n httpRequest.headersList.append('pragma', 'no-cache')\n }\n\n // 2. If httpRequest’s header list does not contain `Cache-Control`,\n // then append `Cache-Control`/`no-cache` to httpRequest’s header list.\n if (!httpRequest.headersList.contains('cache-control')) {\n httpRequest.headersList.append('cache-control', 'no-cache')\n }\n }\n\n // 18. If httpRequest’s header list contains `Range`, then append\n // `Accept-Encoding`/`identity` to httpRequest’s header list.\n if (httpRequest.headersList.contains('range')) {\n httpRequest.headersList.append('accept-encoding', 'identity')\n }\n\n // 19. Modify httpRequest’s header list per HTTP. Do not append a given\n // header if httpRequest’s header list contains that header’s name.\n // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129\n if (!httpRequest.headersList.contains('accept-encoding')) {\n if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {\n httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate')\n } else {\n httpRequest.headersList.append('accept-encoding', 'gzip, deflate')\n }\n }\n\n httpRequest.headersList.delete('host')\n\n // 20. If includeCredentials is true, then:\n if (includeCredentials) {\n // 1. If the user agent is not configured to block cookies for httpRequest\n // (see section 7 of [COOKIES]), then:\n // TODO: credentials\n // 2. If httpRequest’s header list does not contain `Authorization`, then:\n // TODO: credentials\n }\n\n // 21. If there’s a proxy-authentication entry, use it as appropriate.\n // TODO: proxy-authentication\n\n // 22. Set httpCache to the result of determining the HTTP cache\n // partition, given httpRequest.\n // TODO: cache\n\n // 23. If httpCache is null, then set httpRequest’s cache mode to\n // \"no-store\".\n if (httpCache == null) {\n httpRequest.cache = 'no-store'\n }\n\n // 24. If httpRequest’s cache mode is neither \"no-store\" nor \"reload\",\n // then:\n if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') {\n // TODO: cache\n }\n\n // 9. If aborted, then return the appropriate network error for fetchParams.\n // TODO\n\n // 10. If response is null, then:\n if (response == null) {\n // 1. If httpRequest’s cache mode is \"only-if-cached\", then return a\n // network error.\n if (httpRequest.mode === 'only-if-cached') {\n return makeNetworkError('only if cached')\n }\n\n // 2. Let forwardResponse be the result of running HTTP-network fetch\n // given httpFetchParams, includeCredentials, and isNewConnectionFetch.\n const forwardResponse = await httpNetworkFetch(\n httpFetchParams,\n includeCredentials,\n isNewConnectionFetch\n )\n\n // 3. If httpRequest’s method is unsafe and forwardResponse’s status is\n // in the range 200 to 399, inclusive, invalidate appropriate stored\n // responses in httpCache, as per the \"Invalidation\" chapter of HTTP\n // Caching, and set storedResponse to null. [HTTP-CACHING]\n if (\n !safeMethodsSet.has(httpRequest.method) &&\n forwardResponse.status >= 200 &&\n forwardResponse.status <= 399\n ) {\n // TODO: cache\n }\n\n // 4. If the revalidatingFlag is set and forwardResponse’s status is 304,\n // then:\n if (revalidatingFlag && forwardResponse.status === 304) {\n // TODO: cache\n }\n\n // 5. If response is null, then:\n if (response == null) {\n // 1. Set response to forwardResponse.\n response = forwardResponse\n\n // 2. Store httpRequest and forwardResponse in httpCache, as per the\n // \"Storing Responses in Caches\" chapter of HTTP Caching. [HTTP-CACHING]\n // TODO: cache\n }\n }\n\n // 11. Set response’s URL list to a clone of httpRequest’s URL list.\n response.urlList = [...httpRequest.urlList]\n\n // 12. If httpRequest’s header list contains `Range`, then set response’s\n // range-requested flag.\n if (httpRequest.headersList.contains('range')) {\n response.rangeRequested = true\n }\n\n // 13. Set response’s request-includes-credentials to includeCredentials.\n response.requestIncludesCredentials = includeCredentials\n\n // 14. If response’s status is 401, httpRequest’s response tainting is not\n // \"cors\", includeCredentials is true, and request’s window is an environment\n // settings object, then:\n // TODO\n\n // 15. If response’s status is 407, then:\n if (response.status === 407) {\n // 1. If request’s window is \"no-window\", then return a network error.\n if (request.window === 'no-window') {\n return makeNetworkError()\n }\n\n // 2. ???\n\n // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 4. Prompt the end user as appropriate in request’s window and store\n // the result as a proxy-authentication entry. [HTTP-AUTH]\n // TODO: Invoke some kind of callback?\n\n // 5. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams.\n // TODO\n return makeNetworkError('proxy authentication required')\n }\n\n // 16. If all of the following are true\n if (\n // response’s status is 421\n response.status === 421 &&\n // isNewConnectionFetch is false\n !isNewConnectionFetch &&\n // request’s body is null, or request’s body is non-null and request’s body’s source is non-null\n (request.body == null || request.body.source != null)\n ) {\n // then:\n\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Set response to the result of running HTTP-network-or-cache\n // fetch given fetchParams, isAuthenticationFetch, and true.\n\n // TODO (spec): The spec doesn't specify this but we need to cancel\n // the active response before we can start a new one.\n // https://github.com/whatwg/fetch/issues/1293\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(\n fetchParams,\n isAuthenticationFetch,\n true\n )\n }\n\n // 17. If isAuthenticationFetch is true, then create an authentication entry\n if (isAuthenticationFetch) {\n // TODO\n }\n\n // 18. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-network-fetch\nasync function httpNetworkFetch (\n fetchParams,\n includeCredentials = false,\n forceNewConnection = false\n) {\n assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed)\n\n fetchParams.controller.connection = {\n abort: null,\n destroyed: false,\n destroy (err) {\n if (!this.destroyed) {\n this.destroyed = true\n this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError'))\n }\n }\n }\n\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 4. Let httpCache be the result of determining the HTTP cache partition,\n // given request.\n // TODO: cache\n const httpCache = null\n\n // 5. If httpCache is null, then set request’s cache mode to \"no-store\".\n if (httpCache == null) {\n request.cache = 'no-store'\n }\n\n // 6. Let networkPartitionKey be the result of determining the network\n // partition key given request.\n // TODO\n\n // 7. Let newConnection be \"yes\" if forceNewConnection is true; otherwise\n // \"no\".\n const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars\n\n // 8. Switch on request’s mode:\n if (request.mode === 'websocket') {\n // Let connection be the result of obtaining a WebSocket connection,\n // given request’s current URL.\n // TODO\n } else {\n // Let connection be the result of obtaining a connection, given\n // networkPartitionKey, request’s current URL’s origin,\n // includeCredentials, and forceNewConnection.\n // TODO\n }\n\n // 9. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If connection is failure, then return a network error.\n\n // 2. Set timingInfo’s final connection timing info to the result of\n // calling clamp and coarsen connection timing info with connection’s\n // timing info, timingInfo’s post-redirect start time, and fetchParams’s\n // cross-origin isolated capability.\n\n // 3. If connection is not an HTTP/2 connection, request’s body is non-null,\n // and request’s body’s source is null, then append (`Transfer-Encoding`,\n // `chunked`) to request’s header list.\n\n // 4. Set timingInfo’s final network-request start time to the coarsened\n // shared current time given fetchParams’s cross-origin isolated\n // capability.\n\n // 5. Set response to the result of making an HTTP request over connection\n // using request with the following caveats:\n\n // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS]\n // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH]\n\n // - If request’s body is non-null, and request’s body’s source is null,\n // then the user agent may have a buffer of up to 64 kibibytes and store\n // a part of request’s body in that buffer. If the user agent reads from\n // request’s body beyond that buffer’s size and the user agent needs to\n // resend request, then instead return a network error.\n\n // - Set timingInfo’s final network-response start time to the coarsened\n // shared current time given fetchParams’s cross-origin isolated capability,\n // immediately after the user agent’s HTTP parser receives the first byte\n // of the response (e.g., frame header bytes for HTTP/2 or response status\n // line for HTTP/1.x).\n\n // - Wait until all the headers are transmitted.\n\n // - Any responses whose status is in the range 100 to 199, inclusive,\n // and is not 101, are to be ignored, except for the purposes of setting\n // timingInfo’s final network-response start time above.\n\n // - If request’s header list contains `Transfer-Encoding`/`chunked` and\n // response is transferred via HTTP/1.0 or older, then return a network\n // error.\n\n // - If the HTTP request results in a TLS client certificate dialog, then:\n\n // 1. If request’s window is an environment settings object, make the\n // dialog available in request’s window.\n\n // 2. Otherwise, return a network error.\n\n // To transmit request’s body body, run these steps:\n let requestBody = null\n // 1. If body is null and fetchParams’s process request end-of-body is\n // non-null, then queue a fetch task given fetchParams’s process request\n // end-of-body and fetchParams’s task destination.\n if (request.body == null && fetchParams.processRequestEndOfBody) {\n queueMicrotask(() => fetchParams.processRequestEndOfBody())\n } else if (request.body != null) {\n // 2. Otherwise, if body is non-null:\n\n // 1. Let processBodyChunk given bytes be these steps:\n const processBodyChunk = async function * (bytes) {\n // 1. If the ongoing fetch is terminated, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. Run this step in parallel: transmit bytes.\n yield bytes\n\n // 3. If fetchParams’s process request body is non-null, then run\n // fetchParams’s process request body given bytes’s length.\n fetchParams.processRequestBodyChunkLength?.(bytes.byteLength)\n }\n\n // 2. Let processEndOfBody be these steps:\n const processEndOfBody = () => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If fetchParams’s process request end-of-body is non-null,\n // then run fetchParams’s process request end-of-body.\n if (fetchParams.processRequestEndOfBody) {\n fetchParams.processRequestEndOfBody()\n }\n }\n\n // 3. Let processBodyError given e be these steps:\n const processBodyError = (e) => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If e is an \"AbortError\" DOMException, then abort fetchParams’s controller.\n if (e.name === 'AbortError') {\n fetchParams.controller.abort()\n } else {\n fetchParams.controller.terminate(e)\n }\n }\n\n // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody,\n // processBodyError, and fetchParams’s task destination.\n requestBody = (async function * () {\n try {\n for await (const bytes of request.body.stream) {\n yield * processBodyChunk(bytes)\n }\n processEndOfBody()\n } catch (err) {\n processBodyError(err)\n }\n })()\n }\n\n try {\n // socket is only provided for websockets\n const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody })\n\n if (socket) {\n response = makeResponse({ status, statusText, headersList, socket })\n } else {\n const iterator = body[Symbol.asyncIterator]()\n fetchParams.controller.next = () => iterator.next()\n\n response = makeResponse({ status, statusText, headersList })\n }\n } catch (err) {\n // 10. If aborted, then:\n if (err.name === 'AbortError') {\n // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n fetchParams.controller.connection.destroy()\n\n // 2. Return the appropriate network error for fetchParams.\n return makeAppropriateNetworkError(fetchParams, err)\n }\n\n return makeNetworkError(err)\n }\n\n // 11. Let pullAlgorithm be an action that resumes the ongoing fetch\n // if it is suspended.\n const pullAlgorithm = () => {\n fetchParams.controller.resume()\n }\n\n // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s\n // controller with reason, given reason.\n const cancelAlgorithm = (reason) => {\n fetchParams.controller.abort(reason)\n }\n\n // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by\n // the user agent.\n // TODO\n\n // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object\n // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.\n // TODO\n\n // 15. Let stream be a new ReadableStream.\n // 16. Set up stream with pullAlgorithm set to pullAlgorithm,\n // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to\n // highWaterMark, and sizeAlgorithm set to sizeAlgorithm.\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n const stream = new ReadableStream(\n {\n async start (controller) {\n fetchParams.controller.controller = controller\n },\n async pull (controller) {\n await pullAlgorithm(controller)\n },\n async cancel (reason) {\n await cancelAlgorithm(reason)\n }\n },\n {\n highWaterMark: 0,\n size () {\n return 1\n }\n }\n )\n\n // 17. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. Set response’s body to a new body whose stream is stream.\n response.body = { stream }\n\n // 2. If response is not a network error and request’s cache mode is\n // not \"no-store\", then update response in httpCache for request.\n // TODO\n\n // 3. If includeCredentials is true and the user agent is not configured\n // to block cookies for request (see section 7 of [COOKIES]), then run the\n // \"set-cookie-string\" parsing algorithm (see section 5.2 of [COOKIES]) on\n // the value of each header whose name is a byte-case-insensitive match for\n // `Set-Cookie` in response’s header list, if any, and request’s current URL.\n // TODO\n\n // 18. If aborted, then:\n // TODO\n\n // 19. Run these steps in parallel:\n\n // 1. Run these steps, but abort when fetchParams is canceled:\n fetchParams.controller.on('terminated', onAborted)\n fetchParams.controller.resume = async () => {\n // 1. While true\n while (true) {\n // 1-3. See onData...\n\n // 4. Set bytes to the result of handling content codings given\n // codings and bytes.\n let bytes\n let isFailure\n try {\n const { done, value } = await fetchParams.controller.next()\n\n if (isAborted(fetchParams)) {\n break\n }\n\n bytes = done ? undefined : value\n } catch (err) {\n if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {\n // zlib doesn't like empty streams.\n bytes = undefined\n } else {\n bytes = err\n\n // err may be propagated from the result of calling readablestream.cancel,\n // which might not be an error. https://github.com/nodejs/undici/issues/2009\n isFailure = true\n }\n }\n\n if (bytes === undefined) {\n // 2. Otherwise, if the bytes transmission for response’s message\n // body is done normally and stream is readable, then close\n // stream, finalize response for fetchParams and response, and\n // abort these in-parallel steps.\n readableStreamClose(fetchParams.controller.controller)\n\n finalizeResponse(fetchParams, response)\n\n return\n }\n\n // 5. Increase timingInfo’s decoded body size by bytes’s length.\n timingInfo.decodedBodySize += bytes?.byteLength ?? 0\n\n // 6. If bytes is failure, then terminate fetchParams’s controller.\n if (isFailure) {\n fetchParams.controller.terminate(bytes)\n return\n }\n\n // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes\n // into stream.\n fetchParams.controller.controller.enqueue(new Uint8Array(bytes))\n\n // 8. If stream is errored, then terminate the ongoing fetch.\n if (isErrored(stream)) {\n fetchParams.controller.terminate()\n return\n }\n\n // 9. If stream doesn’t need more data ask the user agent to suspend\n // the ongoing fetch.\n if (!fetchParams.controller.controller.desiredSize) {\n return\n }\n }\n }\n\n // 2. If aborted, then:\n function onAborted (reason) {\n // 2. If fetchParams is aborted, then:\n if (isAborted(fetchParams)) {\n // 1. Set response’s aborted flag.\n response.aborted = true\n\n // 2. If stream is readable, then error stream with the result of\n // deserialize a serialized abort reason given fetchParams’s\n // controller’s serialized abort reason and an\n // implementation-defined realm.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(\n fetchParams.controller.serializedAbortReason\n )\n }\n } else {\n // 3. Otherwise, if stream is readable, error stream with a TypeError.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(new TypeError('terminated', {\n cause: isErrorLike(reason) ? reason : undefined\n }))\n }\n }\n\n // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so.\n fetchParams.controller.connection.destroy()\n }\n\n // 20. Return response.\n return response\n\n async function dispatch ({ body }) {\n const url = requestCurrentURL(request)\n /** @type {import('../..').Agent} */\n const agent = fetchParams.controller.dispatcher\n\n return new Promise((resolve, reject) => agent.dispatch(\n {\n path: url.pathname + url.search,\n origin: url.origin,\n method: request.method,\n body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body,\n headers: request.headersList.entries,\n maxRedirections: 0,\n upgrade: request.mode === 'websocket' ? 'websocket' : undefined\n },\n {\n body: null,\n abort: null,\n\n onConnect (abort) {\n // TODO (fix): Do we need connection here?\n const { connection } = fetchParams.controller\n\n if (connection.destroyed) {\n abort(new DOMException('The operation was aborted.', 'AbortError'))\n } else {\n fetchParams.controller.on('terminated', abort)\n this.abort = connection.abort = abort\n }\n },\n\n onHeaders (status, headersList, resume, statusText) {\n if (status < 200) {\n return\n }\n\n let codings = []\n let location = ''\n\n const headers = new Headers()\n\n // For H2, the headers are a plain JS object\n // We distinguish between them and iterate accordingly\n if (Array.isArray(headersList)) {\n for (let n = 0; n < headersList.length; n += 2) {\n const key = headersList[n + 0].toString('latin1')\n const val = headersList[n + 1].toString('latin1')\n if (key.toLowerCase() === 'content-encoding') {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n // \"All content-coding values are case-insensitive...\"\n codings = val.toLowerCase().split(',').map((x) => x.trim())\n } else if (key.toLowerCase() === 'location') {\n location = val\n }\n\n headers[kHeadersList].append(key, val)\n }\n } else {\n const keys = Object.keys(headersList)\n for (const key of keys) {\n const val = headersList[key]\n if (key.toLowerCase() === 'content-encoding') {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n // \"All content-coding values are case-insensitive...\"\n codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse()\n } else if (key.toLowerCase() === 'location') {\n location = val\n }\n\n headers[kHeadersList].append(key, val)\n }\n }\n\n this.body = new Readable({ read: resume })\n\n const decoders = []\n\n const willFollow = request.redirect === 'follow' &&\n location &&\n redirectStatusSet.has(status)\n\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {\n for (const coding of codings) {\n // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2\n if (coding === 'x-gzip' || coding === 'gzip') {\n decoders.push(zlib.createGunzip({\n // Be less strict when decoding compressed responses, since sometimes\n // servers send slightly invalid responses that are still accepted\n // by common browsers.\n // Always using Z_SYNC_FLUSH is what cURL does.\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'deflate') {\n decoders.push(zlib.createInflate())\n } else if (coding === 'br') {\n decoders.push(zlib.createBrotliDecompress())\n } else {\n decoders.length = 0\n break\n }\n }\n }\n\n resolve({\n status,\n statusText,\n headersList: headers[kHeadersList],\n body: decoders.length\n ? pipeline(this.body, ...decoders, () => { })\n : this.body.on('error', () => {})\n })\n\n return true\n },\n\n onData (chunk) {\n if (fetchParams.controller.dump) {\n return\n }\n\n // 1. If one or more bytes have been transmitted from response’s\n // message body, then:\n\n // 1. Let bytes be the transmitted bytes.\n const bytes = chunk\n\n // 2. Let codings be the result of extracting header list values\n // given `Content-Encoding` and response’s header list.\n // See pullAlgorithm.\n\n // 3. Increase timingInfo’s encoded body size by bytes’s length.\n timingInfo.encodedBodySize += bytes.byteLength\n\n // 4. See pullAlgorithm...\n\n return this.body.push(bytes)\n },\n\n onComplete () {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n fetchParams.controller.ended = true\n\n this.body.push(null)\n },\n\n onError (error) {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n this.body?.destroy(error)\n\n fetchParams.controller.terminate(error)\n\n reject(error)\n },\n\n onUpgrade (status, headersList, socket) {\n if (status !== 101) {\n return\n }\n\n const headers = new Headers()\n\n for (let n = 0; n < headersList.length; n += 2) {\n const key = headersList[n + 0].toString('latin1')\n const val = headersList[n + 1].toString('latin1')\n\n headers[kHeadersList].append(key, val)\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList: headers[kHeadersList],\n socket\n })\n\n return true\n }\n }\n ))\n }\n}\n\nmodule.exports = {\n fetch,\n Fetch,\n fetching,\n finalizeAndReportTiming\n}\n","/* globals AbortController */\n\n'use strict'\n\nconst { extractBody, mixinBody, cloneBody } = require('./body')\nconst { Headers, fill: fillHeaders, HeadersList } = require('./headers')\nconst { FinalizationRegistry } = require('../compat/dispatcher-weakref')()\nconst util = require('../core/util')\nconst {\n isValidHTTPToken,\n sameOrigin,\n normalizeMethod,\n makePolicyContainer,\n normalizeMethodRecord\n} = require('./util')\nconst {\n forbiddenMethodsSet,\n corsSafeListedMethodsSet,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n requestDuplex\n} = require('./constants')\nconst { kEnumerableProperty } = util\nconst { kHeaders, kSignal, kState, kGuard, kRealm } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { getGlobalOrigin } = require('./global')\nconst { URLSerializer } = require('./dataURL')\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst assert = require('assert')\nconst { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('events')\n\nlet TransformStream = globalThis.TransformStream\n\nconst kAbortController = Symbol('abortController')\n\nconst requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {\n signal.removeEventListener('abort', abort)\n})\n\n// https://fetch.spec.whatwg.org/#request-class\nclass Request {\n // https://fetch.spec.whatwg.org/#dom-request\n constructor (input, init = {}) {\n if (input === kConstruct) {\n return\n }\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' })\n\n input = webidl.converters.RequestInfo(input)\n init = webidl.converters.RequestInit(init)\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object\n this[kRealm] = {\n settingsObject: {\n baseUrl: getGlobalOrigin(),\n get origin () {\n return this.baseUrl?.origin\n },\n policyContainer: makePolicyContainer()\n }\n }\n\n // 1. Let request be null.\n let request = null\n\n // 2. Let fallbackMode be null.\n let fallbackMode = null\n\n // 3. Let baseURL be this’s relevant settings object’s API base URL.\n const baseUrl = this[kRealm].settingsObject.baseUrl\n\n // 4. Let signal be null.\n let signal = null\n\n // 5. If input is a string, then:\n if (typeof input === 'string') {\n // 1. Let parsedURL be the result of parsing input with baseURL.\n // 2. If parsedURL is failure, then throw a TypeError.\n let parsedURL\n try {\n parsedURL = new URL(input, baseUrl)\n } catch (err) {\n throw new TypeError('Failed to parse URL from ' + input, { cause: err })\n }\n\n // 3. If parsedURL includes credentials, then throw a TypeError.\n if (parsedURL.username || parsedURL.password) {\n throw new TypeError(\n 'Request cannot be constructed from a URL that includes credentials: ' +\n input\n )\n }\n\n // 4. Set request to a new request whose URL is parsedURL.\n request = makeRequest({ urlList: [parsedURL] })\n\n // 5. Set fallbackMode to \"cors\".\n fallbackMode = 'cors'\n } else {\n // 6. Otherwise:\n\n // 7. Assert: input is a Request object.\n assert(input instanceof Request)\n\n // 8. Set request to input’s request.\n request = input[kState]\n\n // 9. Set signal to input’s signal.\n signal = input[kSignal]\n }\n\n // 7. Let origin be this’s relevant settings object’s origin.\n const origin = this[kRealm].settingsObject.origin\n\n // 8. Let window be \"client\".\n let window = 'client'\n\n // 9. If request’s window is an environment settings object and its origin\n // is same origin with origin, then set window to request’s window.\n if (\n request.window?.constructor?.name === 'EnvironmentSettingsObject' &&\n sameOrigin(request.window, origin)\n ) {\n window = request.window\n }\n\n // 10. If init[\"window\"] exists and is non-null, then throw a TypeError.\n if (init.window != null) {\n throw new TypeError(`'window' option '${window}' must be null`)\n }\n\n // 11. If init[\"window\"] exists, then set window to \"no-window\".\n if ('window' in init) {\n window = 'no-window'\n }\n\n // 12. Set request to a new request with the following properties:\n request = makeRequest({\n // URL request’s URL.\n // undici implementation note: this is set as the first item in request's urlList in makeRequest\n // method request’s method.\n method: request.method,\n // header list A copy of request’s header list.\n // undici implementation note: headersList is cloned in makeRequest\n headersList: request.headersList,\n // unsafe-request flag Set.\n unsafeRequest: request.unsafeRequest,\n // client This’s relevant settings object.\n client: this[kRealm].settingsObject,\n // window window.\n window,\n // priority request’s priority.\n priority: request.priority,\n // origin request’s origin. The propagation of the origin is only significant for navigation requests\n // being handled by a service worker. In this scenario a request can have an origin that is different\n // from the current client.\n origin: request.origin,\n // referrer request’s referrer.\n referrer: request.referrer,\n // referrer policy request’s referrer policy.\n referrerPolicy: request.referrerPolicy,\n // mode request’s mode.\n mode: request.mode,\n // credentials mode request’s credentials mode.\n credentials: request.credentials,\n // cache mode request’s cache mode.\n cache: request.cache,\n // redirect mode request’s redirect mode.\n redirect: request.redirect,\n // integrity metadata request’s integrity metadata.\n integrity: request.integrity,\n // keepalive request’s keepalive.\n keepalive: request.keepalive,\n // reload-navigation flag request’s reload-navigation flag.\n reloadNavigation: request.reloadNavigation,\n // history-navigation flag request’s history-navigation flag.\n historyNavigation: request.historyNavigation,\n // URL list A clone of request’s URL list.\n urlList: [...request.urlList]\n })\n\n const initHasKey = Object.keys(init).length !== 0\n\n // 13. If init is not empty, then:\n if (initHasKey) {\n // 1. If request’s mode is \"navigate\", then set it to \"same-origin\".\n if (request.mode === 'navigate') {\n request.mode = 'same-origin'\n }\n\n // 2. Unset request’s reload-navigation flag.\n request.reloadNavigation = false\n\n // 3. Unset request’s history-navigation flag.\n request.historyNavigation = false\n\n // 4. Set request’s origin to \"client\".\n request.origin = 'client'\n\n // 5. Set request’s referrer to \"client\"\n request.referrer = 'client'\n\n // 6. Set request’s referrer policy to the empty string.\n request.referrerPolicy = ''\n\n // 7. Set request’s URL to request’s current URL.\n request.url = request.urlList[request.urlList.length - 1]\n\n // 8. Set request’s URL list to « request’s URL ».\n request.urlList = [request.url]\n }\n\n // 14. If init[\"referrer\"] exists, then:\n if (init.referrer !== undefined) {\n // 1. Let referrer be init[\"referrer\"].\n const referrer = init.referrer\n\n // 2. If referrer is the empty string, then set request’s referrer to \"no-referrer\".\n if (referrer === '') {\n request.referrer = 'no-referrer'\n } else {\n // 1. Let parsedReferrer be the result of parsing referrer with\n // baseURL.\n // 2. If parsedReferrer is failure, then throw a TypeError.\n let parsedReferrer\n try {\n parsedReferrer = new URL(referrer, baseUrl)\n } catch (err) {\n throw new TypeError(`Referrer \"${referrer}\" is not a valid URL.`, { cause: err })\n }\n\n // 3. If one of the following is true\n // - parsedReferrer’s scheme is \"about\" and path is the string \"client\"\n // - parsedReferrer’s origin is not same origin with origin\n // then set request’s referrer to \"client\".\n if (\n (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') ||\n (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl))\n ) {\n request.referrer = 'client'\n } else {\n // 4. Otherwise, set request’s referrer to parsedReferrer.\n request.referrer = parsedReferrer\n }\n }\n }\n\n // 15. If init[\"referrerPolicy\"] exists, then set request’s referrer policy\n // to it.\n if (init.referrerPolicy !== undefined) {\n request.referrerPolicy = init.referrerPolicy\n }\n\n // 16. Let mode be init[\"mode\"] if it exists, and fallbackMode otherwise.\n let mode\n if (init.mode !== undefined) {\n mode = init.mode\n } else {\n mode = fallbackMode\n }\n\n // 17. If mode is \"navigate\", then throw a TypeError.\n if (mode === 'navigate') {\n throw webidl.errors.exception({\n header: 'Request constructor',\n message: 'invalid request mode navigate.'\n })\n }\n\n // 18. If mode is non-null, set request’s mode to mode.\n if (mode != null) {\n request.mode = mode\n }\n\n // 19. If init[\"credentials\"] exists, then set request’s credentials mode\n // to it.\n if (init.credentials !== undefined) {\n request.credentials = init.credentials\n }\n\n // 18. If init[\"cache\"] exists, then set request’s cache mode to it.\n if (init.cache !== undefined) {\n request.cache = init.cache\n }\n\n // 21. If request’s cache mode is \"only-if-cached\" and request’s mode is\n // not \"same-origin\", then throw a TypeError.\n if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {\n throw new TypeError(\n \"'only-if-cached' can be set only with 'same-origin' mode\"\n )\n }\n\n // 22. If init[\"redirect\"] exists, then set request’s redirect mode to it.\n if (init.redirect !== undefined) {\n request.redirect = init.redirect\n }\n\n // 23. If init[\"integrity\"] exists, then set request’s integrity metadata to it.\n if (init.integrity != null) {\n request.integrity = String(init.integrity)\n }\n\n // 24. If init[\"keepalive\"] exists, then set request’s keepalive to it.\n if (init.keepalive !== undefined) {\n request.keepalive = Boolean(init.keepalive)\n }\n\n // 25. If init[\"method\"] exists, then:\n if (init.method !== undefined) {\n // 1. Let method be init[\"method\"].\n let method = init.method\n\n // 2. If method is not a method or method is a forbidden method, then\n // throw a TypeError.\n if (!isValidHTTPToken(method)) {\n throw new TypeError(`'${method}' is not a valid HTTP method.`)\n }\n\n if (forbiddenMethodsSet.has(method.toUpperCase())) {\n throw new TypeError(`'${method}' HTTP method is unsupported.`)\n }\n\n // 3. Normalize method.\n method = normalizeMethodRecord[method] ?? normalizeMethod(method)\n\n // 4. Set request’s method to method.\n request.method = method\n }\n\n // 26. If init[\"signal\"] exists, then set signal to it.\n if (init.signal !== undefined) {\n signal = init.signal\n }\n\n // 27. Set this’s request to request.\n this[kState] = request\n\n // 28. Set this’s signal to a new AbortSignal object with this’s relevant\n // Realm.\n // TODO: could this be simplified with AbortSignal.any\n // (https://dom.spec.whatwg.org/#dom-abortsignal-any)\n const ac = new AbortController()\n this[kSignal] = ac.signal\n this[kSignal][kRealm] = this[kRealm]\n\n // 29. If signal is not null, then make this’s signal follow signal.\n if (signal != null) {\n if (\n !signal ||\n typeof signal.aborted !== 'boolean' ||\n typeof signal.addEventListener !== 'function'\n ) {\n throw new TypeError(\n \"Failed to construct 'Request': member signal is not of type AbortSignal.\"\n )\n }\n\n if (signal.aborted) {\n ac.abort(signal.reason)\n } else {\n // Keep a strong ref to ac while request object\n // is alive. This is needed to prevent AbortController\n // from being prematurely garbage collected.\n // See, https://github.com/nodejs/undici/issues/1926.\n this[kAbortController] = ac\n\n const acRef = new WeakRef(ac)\n const abort = function () {\n const ac = acRef.deref()\n if (ac !== undefined) {\n ac.abort(this.reason)\n }\n }\n\n // Third-party AbortControllers may not work with these.\n // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619.\n try {\n // If the max amount of listeners is equal to the default, increase it\n // This is only available in node >= v19.9.0\n if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) {\n setMaxListeners(100, signal)\n } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) {\n setMaxListeners(100, signal)\n }\n } catch {}\n\n util.addAbortListener(signal, abort)\n requestFinalizer.register(ac, { signal, abort })\n }\n }\n\n // 30. Set this’s headers to a new Headers object with this’s relevant\n // Realm, whose header list is request’s header list and guard is\n // \"request\".\n this[kHeaders] = new Headers(kConstruct)\n this[kHeaders][kHeadersList] = request.headersList\n this[kHeaders][kGuard] = 'request'\n this[kHeaders][kRealm] = this[kRealm]\n\n // 31. If this’s request’s mode is \"no-cors\", then:\n if (mode === 'no-cors') {\n // 1. If this’s request’s method is not a CORS-safelisted method,\n // then throw a TypeError.\n if (!corsSafeListedMethodsSet.has(request.method)) {\n throw new TypeError(\n `'${request.method} is unsupported in no-cors mode.`\n )\n }\n\n // 2. Set this’s headers’s guard to \"request-no-cors\".\n this[kHeaders][kGuard] = 'request-no-cors'\n }\n\n // 32. If init is not empty, then:\n if (initHasKey) {\n /** @type {HeadersList} */\n const headersList = this[kHeaders][kHeadersList]\n // 1. Let headers be a copy of this’s headers and its associated header\n // list.\n // 2. If init[\"headers\"] exists, then set headers to init[\"headers\"].\n const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList)\n\n // 3. Empty this’s headers’s header list.\n headersList.clear()\n\n // 4. If headers is a Headers object, then for each header in its header\n // list, append header’s name/header’s value to this’s headers.\n if (headers instanceof HeadersList) {\n for (const [key, val] of headers) {\n headersList.append(key, val)\n }\n // Note: Copy the `set-cookie` meta-data.\n headersList.cookies = headers.cookies\n } else {\n // 5. Otherwise, fill this’s headers with headers.\n fillHeaders(this[kHeaders], headers)\n }\n }\n\n // 33. Let inputBody be input’s request’s body if input is a Request\n // object; otherwise null.\n const inputBody = input instanceof Request ? input[kState].body : null\n\n // 34. If either init[\"body\"] exists and is non-null or inputBody is\n // non-null, and request’s method is `GET` or `HEAD`, then throw a\n // TypeError.\n if (\n (init.body != null || inputBody != null) &&\n (request.method === 'GET' || request.method === 'HEAD')\n ) {\n throw new TypeError('Request with GET/HEAD method cannot have body.')\n }\n\n // 35. Let initBody be null.\n let initBody = null\n\n // 36. If init[\"body\"] exists and is non-null, then:\n if (init.body != null) {\n // 1. Let Content-Type be null.\n // 2. Set initBody and Content-Type to the result of extracting\n // init[\"body\"], with keepalive set to request’s keepalive.\n const [extractedBody, contentType] = extractBody(\n init.body,\n request.keepalive\n )\n initBody = extractedBody\n\n // 3, If Content-Type is non-null and this’s headers’s header list does\n // not contain `Content-Type`, then append `Content-Type`/Content-Type to\n // this’s headers.\n if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) {\n this[kHeaders].append('content-type', contentType)\n }\n }\n\n // 37. Let inputOrInitBody be initBody if it is non-null; otherwise\n // inputBody.\n const inputOrInitBody = initBody ?? inputBody\n\n // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is\n // null, then:\n if (inputOrInitBody != null && inputOrInitBody.source == null) {\n // 1. If initBody is non-null and init[\"duplex\"] does not exist,\n // then throw a TypeError.\n if (initBody != null && init.duplex == null) {\n throw new TypeError('RequestInit: duplex option is required when sending a body.')\n }\n\n // 2. If this’s request’s mode is neither \"same-origin\" nor \"cors\",\n // then throw a TypeError.\n if (request.mode !== 'same-origin' && request.mode !== 'cors') {\n throw new TypeError(\n 'If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\"'\n )\n }\n\n // 3. Set this’s request’s use-CORS-preflight flag.\n request.useCORSPreflightFlag = true\n }\n\n // 39. Let finalBody be inputOrInitBody.\n let finalBody = inputOrInitBody\n\n // 40. If initBody is null and inputBody is non-null, then:\n if (initBody == null && inputBody != null) {\n // 1. If input is unusable, then throw a TypeError.\n if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) {\n throw new TypeError(\n 'Cannot construct a Request with a Request object that has already been used.'\n )\n }\n\n // 2. Set finalBody to the result of creating a proxy for inputBody.\n if (!TransformStream) {\n TransformStream = require('stream/web').TransformStream\n }\n\n // https://streams.spec.whatwg.org/#readablestream-create-a-proxy\n const identityTransform = new TransformStream()\n inputBody.stream.pipeThrough(identityTransform)\n finalBody = {\n source: inputBody.source,\n length: inputBody.length,\n stream: identityTransform.readable\n }\n }\n\n // 41. Set this’s request’s body to finalBody.\n this[kState].body = finalBody\n }\n\n // Returns request’s HTTP method, which is \"GET\" by default.\n get method () {\n webidl.brandCheck(this, Request)\n\n // The method getter steps are to return this’s request’s method.\n return this[kState].method\n }\n\n // Returns the URL of request as a string.\n get url () {\n webidl.brandCheck(this, Request)\n\n // The url getter steps are to return this’s request’s URL, serialized.\n return URLSerializer(this[kState].url)\n }\n\n // Returns a Headers object consisting of the headers associated with request.\n // Note that headers added in the network layer by the user agent will not\n // be accounted for in this object, e.g., the \"Host\" header.\n get headers () {\n webidl.brandCheck(this, Request)\n\n // The headers getter steps are to return this’s headers.\n return this[kHeaders]\n }\n\n // Returns the kind of resource requested by request, e.g., \"document\"\n // or \"script\".\n get destination () {\n webidl.brandCheck(this, Request)\n\n // The destination getter are to return this’s request’s destination.\n return this[kState].destination\n }\n\n // Returns the referrer of request. Its value can be a same-origin URL if\n // explicitly set in init, the empty string to indicate no referrer, and\n // \"about:client\" when defaulting to the global’s default. This is used\n // during fetching to determine the value of the `Referer` header of the\n // request being made.\n get referrer () {\n webidl.brandCheck(this, Request)\n\n // 1. If this’s request’s referrer is \"no-referrer\", then return the\n // empty string.\n if (this[kState].referrer === 'no-referrer') {\n return ''\n }\n\n // 2. If this’s request’s referrer is \"client\", then return\n // \"about:client\".\n if (this[kState].referrer === 'client') {\n return 'about:client'\n }\n\n // Return this’s request’s referrer, serialized.\n return this[kState].referrer.toString()\n }\n\n // Returns the referrer policy associated with request.\n // This is used during fetching to compute the value of the request’s\n // referrer.\n get referrerPolicy () {\n webidl.brandCheck(this, Request)\n\n // The referrerPolicy getter steps are to return this’s request’s referrer policy.\n return this[kState].referrerPolicy\n }\n\n // Returns the mode associated with request, which is a string indicating\n // whether the request will use CORS, or will be restricted to same-origin\n // URLs.\n get mode () {\n webidl.brandCheck(this, Request)\n\n // The mode getter steps are to return this’s request’s mode.\n return this[kState].mode\n }\n\n // Returns the credentials mode associated with request,\n // which is a string indicating whether credentials will be sent with the\n // request always, never, or only when sent to a same-origin URL.\n get credentials () {\n // The credentials getter steps are to return this’s request’s credentials mode.\n return this[kState].credentials\n }\n\n // Returns the cache mode associated with request,\n // which is a string indicating how the request will\n // interact with the browser’s cache when fetching.\n get cache () {\n webidl.brandCheck(this, Request)\n\n // The cache getter steps are to return this’s request’s cache mode.\n return this[kState].cache\n }\n\n // Returns the redirect mode associated with request,\n // which is a string indicating how redirects for the\n // request will be handled during fetching. A request\n // will follow redirects by default.\n get redirect () {\n webidl.brandCheck(this, Request)\n\n // The redirect getter steps are to return this’s request’s redirect mode.\n return this[kState].redirect\n }\n\n // Returns request’s subresource integrity metadata, which is a\n // cryptographic hash of the resource being fetched. Its value\n // consists of multiple hashes separated by whitespace. [SRI]\n get integrity () {\n webidl.brandCheck(this, Request)\n\n // The integrity getter steps are to return this’s request’s integrity\n // metadata.\n return this[kState].integrity\n }\n\n // Returns a boolean indicating whether or not request can outlive the\n // global in which it was created.\n get keepalive () {\n webidl.brandCheck(this, Request)\n\n // The keepalive getter steps are to return this’s request’s keepalive.\n return this[kState].keepalive\n }\n\n // Returns a boolean indicating whether or not request is for a reload\n // navigation.\n get isReloadNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isReloadNavigation getter steps are to return true if this’s\n // request’s reload-navigation flag is set; otherwise false.\n return this[kState].reloadNavigation\n }\n\n // Returns a boolean indicating whether or not request is for a history\n // navigation (a.k.a. back-foward navigation).\n get isHistoryNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isHistoryNavigation getter steps are to return true if this’s request’s\n // history-navigation flag is set; otherwise false.\n return this[kState].historyNavigation\n }\n\n // Returns the signal associated with request, which is an AbortSignal\n // object indicating whether or not request has been aborted, and its\n // abort event handler.\n get signal () {\n webidl.brandCheck(this, Request)\n\n // The signal getter steps are to return this’s signal.\n return this[kSignal]\n }\n\n get body () {\n webidl.brandCheck(this, Request)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Request)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n get duplex () {\n webidl.brandCheck(this, Request)\n\n return 'half'\n }\n\n // Returns a clone of request.\n clone () {\n webidl.brandCheck(this, Request)\n\n // 1. If this is unusable, then throw a TypeError.\n if (this.bodyUsed || this.body?.locked) {\n throw new TypeError('unusable')\n }\n\n // 2. Let clonedRequest be the result of cloning this’s request.\n const clonedRequest = cloneRequest(this[kState])\n\n // 3. Let clonedRequestObject be the result of creating a Request object,\n // given clonedRequest, this’s headers’s guard, and this’s relevant Realm.\n const clonedRequestObject = new Request(kConstruct)\n clonedRequestObject[kState] = clonedRequest\n clonedRequestObject[kRealm] = this[kRealm]\n clonedRequestObject[kHeaders] = new Headers(kConstruct)\n clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList\n clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]\n clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]\n\n // 4. Make clonedRequestObject’s signal follow this’s signal.\n const ac = new AbortController()\n if (this.signal.aborted) {\n ac.abort(this.signal.reason)\n } else {\n util.addAbortListener(\n this.signal,\n () => {\n ac.abort(this.signal.reason)\n }\n )\n }\n clonedRequestObject[kSignal] = ac.signal\n\n // 4. Return clonedRequestObject.\n return clonedRequestObject\n }\n}\n\nmixinBody(Request)\n\nfunction makeRequest (init) {\n // https://fetch.spec.whatwg.org/#requests\n const request = {\n method: 'GET',\n localURLsOnly: false,\n unsafeRequest: false,\n body: null,\n client: null,\n reservedClient: null,\n replacesClientId: '',\n window: 'client',\n keepalive: false,\n serviceWorkers: 'all',\n initiator: '',\n destination: '',\n priority: null,\n origin: 'client',\n policyContainer: 'client',\n referrer: 'client',\n referrerPolicy: '',\n mode: 'no-cors',\n useCORSPreflightFlag: false,\n credentials: 'same-origin',\n useCredentials: false,\n cache: 'default',\n redirect: 'follow',\n integrity: '',\n cryptoGraphicsNonceMetadata: '',\n parserMetadata: '',\n reloadNavigation: false,\n historyNavigation: false,\n userActivation: false,\n taintedOrigin: false,\n redirectCount: 0,\n responseTainting: 'basic',\n preventNoCacheCacheControlHeaderModification: false,\n done: false,\n timingAllowFailed: false,\n ...init,\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList()\n }\n request.url = request.urlList[0]\n return request\n}\n\n// https://fetch.spec.whatwg.org/#concept-request-clone\nfunction cloneRequest (request) {\n // To clone a request request, run these steps:\n\n // 1. Let newRequest be a copy of request, except for its body.\n const newRequest = makeRequest({ ...request, body: null })\n\n // 2. If request’s body is non-null, set newRequest’s body to the\n // result of cloning request’s body.\n if (request.body != null) {\n newRequest.body = cloneBody(request.body)\n }\n\n // 3. Return newRequest.\n return newRequest\n}\n\nObject.defineProperties(Request.prototype, {\n method: kEnumerableProperty,\n url: kEnumerableProperty,\n headers: kEnumerableProperty,\n redirect: kEnumerableProperty,\n clone: kEnumerableProperty,\n signal: kEnumerableProperty,\n duplex: kEnumerableProperty,\n destination: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n isHistoryNavigation: kEnumerableProperty,\n isReloadNavigation: kEnumerableProperty,\n keepalive: kEnumerableProperty,\n integrity: kEnumerableProperty,\n cache: kEnumerableProperty,\n credentials: kEnumerableProperty,\n attribute: kEnumerableProperty,\n referrerPolicy: kEnumerableProperty,\n referrer: kEnumerableProperty,\n mode: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Request',\n configurable: true\n }\n})\n\nwebidl.converters.Request = webidl.interfaceConverter(\n Request\n)\n\n// https://fetch.spec.whatwg.org/#requestinfo\nwebidl.converters.RequestInfo = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (V instanceof Request) {\n return webidl.converters.Request(V)\n }\n\n return webidl.converters.USVString(V)\n}\n\nwebidl.converters.AbortSignal = webidl.interfaceConverter(\n AbortSignal\n)\n\n// https://fetch.spec.whatwg.org/#requestinit\nwebidl.converters.RequestInit = webidl.dictionaryConverter([\n {\n key: 'method',\n converter: webidl.converters.ByteString\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n },\n {\n key: 'body',\n converter: webidl.nullableConverter(\n webidl.converters.BodyInit\n )\n },\n {\n key: 'referrer',\n converter: webidl.converters.USVString\n },\n {\n key: 'referrerPolicy',\n converter: webidl.converters.DOMString,\n // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy\n allowedValues: referrerPolicy\n },\n {\n key: 'mode',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#concept-request-mode\n allowedValues: requestMode\n },\n {\n key: 'credentials',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcredentials\n allowedValues: requestCredentials\n },\n {\n key: 'cache',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcache\n allowedValues: requestCache\n },\n {\n key: 'redirect',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestredirect\n allowedValues: requestRedirect\n },\n {\n key: 'integrity',\n converter: webidl.converters.DOMString\n },\n {\n key: 'keepalive',\n converter: webidl.converters.boolean\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(\n (signal) => webidl.converters.AbortSignal(\n signal,\n { strict: false }\n )\n )\n },\n {\n key: 'window',\n converter: webidl.converters.any\n },\n {\n key: 'duplex',\n converter: webidl.converters.DOMString,\n allowedValues: requestDuplex\n }\n])\n\nmodule.exports = { Request, makeRequest }\n","'use strict'\n\nconst { Headers, HeadersList, fill } = require('./headers')\nconst { extractBody, cloneBody, mixinBody } = require('./body')\nconst util = require('../core/util')\nconst { kEnumerableProperty } = util\nconst {\n isValidReasonPhrase,\n isCancelled,\n isAborted,\n isBlobLike,\n serializeJavascriptValueToJSONString,\n isErrorLike,\n isomorphicEncode\n} = require('./util')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n DOMException\n} = require('./constants')\nconst { kState, kHeaders, kGuard, kRealm } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { FormData } = require('./formdata')\nconst { getGlobalOrigin } = require('./global')\nconst { URLSerializer } = require('./dataURL')\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst assert = require('assert')\nconst { types } = require('util')\n\nconst ReadableStream = globalThis.ReadableStream || require('stream/web').ReadableStream\nconst textEncoder = new TextEncoder('utf-8')\n\n// https://fetch.spec.whatwg.org/#response-class\nclass Response {\n // Creates network error Response.\n static error () {\n // TODO\n const relevantRealm = { settingsObject: {} }\n\n // The static error() method steps are to return the result of creating a\n // Response object, given a new network error, \"immutable\", and this’s\n // relevant Realm.\n const responseObject = new Response()\n responseObject[kState] = makeNetworkError()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response-json\n static json (data, init = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' })\n\n if (init !== null) {\n init = webidl.converters.ResponseInit(init)\n }\n\n // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n const bytes = textEncoder.encode(\n serializeJavascriptValueToJSONString(data)\n )\n\n // 2. Let body be the result of extracting bytes.\n const body = extractBody(bytes)\n\n // 3. Let responseObject be the result of creating a Response object, given a new response,\n // \"response\", and this’s relevant Realm.\n const relevantRealm = { settingsObject: {} }\n const responseObject = new Response()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kGuard] = 'response'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 4. Perform initialize a response given responseObject, init, and (body, \"application/json\").\n initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })\n\n // 5. Return responseObject.\n return responseObject\n }\n\n // Creates a redirect Response that redirects to url with status status.\n static redirect (url, status = 302) {\n const relevantRealm = { settingsObject: {} }\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' })\n\n url = webidl.converters.USVString(url)\n status = webidl.converters['unsigned short'](status)\n\n // 1. Let parsedURL be the result of parsing url with current settings\n // object’s API base URL.\n // 2. If parsedURL is failure, then throw a TypeError.\n // TODO: base-URL?\n let parsedURL\n try {\n parsedURL = new URL(url, getGlobalOrigin())\n } catch (err) {\n throw Object.assign(new TypeError('Failed to parse URL from ' + url), {\n cause: err\n })\n }\n\n // 3. If status is not a redirect status, then throw a RangeError.\n if (!redirectStatusSet.has(status)) {\n throw new RangeError('Invalid status code ' + status)\n }\n\n // 4. Let responseObject be the result of creating a Response object,\n // given a new response, \"immutable\", and this’s relevant Realm.\n const responseObject = new Response()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 5. Set responseObject’s response’s status to status.\n responseObject[kState].status = status\n\n // 6. Let value be parsedURL, serialized and isomorphic encoded.\n const value = isomorphicEncode(URLSerializer(parsedURL))\n\n // 7. Append `Location`/value to responseObject’s response’s header list.\n responseObject[kState].headersList.append('location', value)\n\n // 8. Return responseObject.\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response\n constructor (body = null, init = {}) {\n if (body !== null) {\n body = webidl.converters.BodyInit(body)\n }\n\n init = webidl.converters.ResponseInit(init)\n\n // TODO\n this[kRealm] = { settingsObject: {} }\n\n // 1. Set this’s response to a new response.\n this[kState] = makeResponse({})\n\n // 2. Set this’s headers to a new Headers object with this’s relevant\n // Realm, whose header list is this’s response’s header list and guard\n // is \"response\".\n this[kHeaders] = new Headers(kConstruct)\n this[kHeaders][kGuard] = 'response'\n this[kHeaders][kHeadersList] = this[kState].headersList\n this[kHeaders][kRealm] = this[kRealm]\n\n // 3. Let bodyWithType be null.\n let bodyWithType = null\n\n // 4. If body is non-null, then set bodyWithType to the result of extracting body.\n if (body != null) {\n const [extractedBody, type] = extractBody(body)\n bodyWithType = { body: extractedBody, type }\n }\n\n // 5. Perform initialize a response given this, init, and bodyWithType.\n initializeResponse(this, init, bodyWithType)\n }\n\n // Returns response’s type, e.g., \"cors\".\n get type () {\n webidl.brandCheck(this, Response)\n\n // The type getter steps are to return this’s response’s type.\n return this[kState].type\n }\n\n // Returns response’s URL, if it has one; otherwise the empty string.\n get url () {\n webidl.brandCheck(this, Response)\n\n const urlList = this[kState].urlList\n\n // The url getter steps are to return the empty string if this’s\n // response’s URL is null; otherwise this’s response’s URL,\n // serialized with exclude fragment set to true.\n const url = urlList[urlList.length - 1] ?? null\n\n if (url === null) {\n return ''\n }\n\n return URLSerializer(url, true)\n }\n\n // Returns whether response was obtained through a redirect.\n get redirected () {\n webidl.brandCheck(this, Response)\n\n // The redirected getter steps are to return true if this’s response’s URL\n // list has more than one item; otherwise false.\n return this[kState].urlList.length > 1\n }\n\n // Returns response’s status.\n get status () {\n webidl.brandCheck(this, Response)\n\n // The status getter steps are to return this’s response’s status.\n return this[kState].status\n }\n\n // Returns whether response’s status is an ok status.\n get ok () {\n webidl.brandCheck(this, Response)\n\n // The ok getter steps are to return true if this’s response’s status is an\n // ok status; otherwise false.\n return this[kState].status >= 200 && this[kState].status <= 299\n }\n\n // Returns response’s status message.\n get statusText () {\n webidl.brandCheck(this, Response)\n\n // The statusText getter steps are to return this’s response’s status\n // message.\n return this[kState].statusText\n }\n\n // Returns response’s headers as Headers.\n get headers () {\n webidl.brandCheck(this, Response)\n\n // The headers getter steps are to return this’s headers.\n return this[kHeaders]\n }\n\n get body () {\n webidl.brandCheck(this, Response)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Response)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n // Returns a clone of response.\n clone () {\n webidl.brandCheck(this, Response)\n\n // 1. If this is unusable, then throw a TypeError.\n if (this.bodyUsed || (this.body && this.body.locked)) {\n throw webidl.errors.exception({\n header: 'Response.clone',\n message: 'Body has already been consumed.'\n })\n }\n\n // 2. Let clonedResponse be the result of cloning this’s response.\n const clonedResponse = cloneResponse(this[kState])\n\n // 3. Return the result of creating a Response object, given\n // clonedResponse, this’s headers’s guard, and this’s relevant Realm.\n const clonedResponseObject = new Response()\n clonedResponseObject[kState] = clonedResponse\n clonedResponseObject[kRealm] = this[kRealm]\n clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList\n clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]\n clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]\n\n return clonedResponseObject\n }\n}\n\nmixinBody(Response)\n\nObject.defineProperties(Response.prototype, {\n type: kEnumerableProperty,\n url: kEnumerableProperty,\n status: kEnumerableProperty,\n ok: kEnumerableProperty,\n redirected: kEnumerableProperty,\n statusText: kEnumerableProperty,\n headers: kEnumerableProperty,\n clone: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Response',\n configurable: true\n }\n})\n\nObject.defineProperties(Response, {\n json: kEnumerableProperty,\n redirect: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\n// https://fetch.spec.whatwg.org/#concept-response-clone\nfunction cloneResponse (response) {\n // To clone a response response, run these steps:\n\n // 1. If response is a filtered response, then return a new identical\n // filtered response whose internal response is a clone of response’s\n // internal response.\n if (response.internalResponse) {\n return filterResponse(\n cloneResponse(response.internalResponse),\n response.type\n )\n }\n\n // 2. Let newResponse be a copy of response, except for its body.\n const newResponse = makeResponse({ ...response, body: null })\n\n // 3. If response’s body is non-null, then set newResponse’s body to the\n // result of cloning response’s body.\n if (response.body != null) {\n newResponse.body = cloneBody(response.body)\n }\n\n // 4. Return newResponse.\n return newResponse\n}\n\nfunction makeResponse (init) {\n return {\n aborted: false,\n rangeRequested: false,\n timingAllowPassed: false,\n requestIncludesCredentials: false,\n type: 'default',\n status: 200,\n timingInfo: null,\n cacheState: '',\n statusText: '',\n ...init,\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList(),\n urlList: init.urlList ? [...init.urlList] : []\n }\n}\n\nfunction makeNetworkError (reason) {\n const isError = isErrorLike(reason)\n return makeResponse({\n type: 'error',\n status: 0,\n error: isError\n ? reason\n : new Error(reason ? String(reason) : reason),\n aborted: reason && reason.name === 'AbortError'\n })\n}\n\nfunction makeFilteredResponse (response, state) {\n state = {\n internalResponse: response,\n ...state\n }\n\n return new Proxy(response, {\n get (target, p) {\n return p in state ? state[p] : target[p]\n },\n set (target, p, value) {\n assert(!(p in state))\n target[p] = value\n return true\n }\n })\n}\n\n// https://fetch.spec.whatwg.org/#concept-filtered-response\nfunction filterResponse (response, type) {\n // Set response to the following filtered response with response as its\n // internal response, depending on request’s response tainting:\n if (type === 'basic') {\n // A basic filtered response is a filtered response whose type is \"basic\"\n // and header list excludes any headers in internal response’s header list\n // whose name is a forbidden response-header name.\n\n // Note: undici does not implement forbidden response-header names\n return makeFilteredResponse(response, {\n type: 'basic',\n headersList: response.headersList\n })\n } else if (type === 'cors') {\n // A CORS filtered response is a filtered response whose type is \"cors\"\n // and header list excludes any headers in internal response’s header\n // list whose name is not a CORS-safelisted response-header name, given\n // internal response’s CORS-exposed header-name list.\n\n // Note: undici does not implement CORS-safelisted response-header names\n return makeFilteredResponse(response, {\n type: 'cors',\n headersList: response.headersList\n })\n } else if (type === 'opaque') {\n // An opaque filtered response is a filtered response whose type is\n // \"opaque\", URL list is the empty list, status is 0, status message\n // is the empty byte sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaque',\n urlList: Object.freeze([]),\n status: 0,\n statusText: '',\n body: null\n })\n } else if (type === 'opaqueredirect') {\n // An opaque-redirect filtered response is a filtered response whose type\n // is \"opaqueredirect\", status is 0, status message is the empty byte\n // sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaqueredirect',\n status: 0,\n statusText: '',\n headersList: [],\n body: null\n })\n } else {\n assert(false)\n }\n}\n\n// https://fetch.spec.whatwg.org/#appropriate-network-error\nfunction makeAppropriateNetworkError (fetchParams, err = null) {\n // 1. Assert: fetchParams is canceled.\n assert(isCancelled(fetchParams))\n\n // 2. Return an aborted network error if fetchParams is aborted;\n // otherwise return a network error.\n return isAborted(fetchParams)\n ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))\n : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))\n}\n\n// https://whatpr.org/fetch/1392.html#initialize-a-response\nfunction initializeResponse (response, init, body) {\n // 1. If init[\"status\"] is not in the range 200 to 599, inclusive, then\n // throw a RangeError.\n if (init.status !== null && (init.status < 200 || init.status > 599)) {\n throw new RangeError('init[\"status\"] must be in the range of 200 to 599, inclusive.')\n }\n\n // 2. If init[\"statusText\"] does not match the reason-phrase token production,\n // then throw a TypeError.\n if ('statusText' in init && init.statusText != null) {\n // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:\n // reason-phrase = *( HTAB / SP / VCHAR / obs-text )\n if (!isValidReasonPhrase(String(init.statusText))) {\n throw new TypeError('Invalid statusText')\n }\n }\n\n // 3. Set response’s response’s status to init[\"status\"].\n if ('status' in init && init.status != null) {\n response[kState].status = init.status\n }\n\n // 4. Set response’s response’s status message to init[\"statusText\"].\n if ('statusText' in init && init.statusText != null) {\n response[kState].statusText = init.statusText\n }\n\n // 5. If init[\"headers\"] exists, then fill response’s headers with init[\"headers\"].\n if ('headers' in init && init.headers != null) {\n fill(response[kHeaders], init.headers)\n }\n\n // 6. If body was given, then:\n if (body) {\n // 1. If response's status is a null body status, then throw a TypeError.\n if (nullBodyStatus.includes(response.status)) {\n throw webidl.errors.exception({\n header: 'Response constructor',\n message: 'Invalid response status code ' + response.status\n })\n }\n\n // 2. Set response's body to body's body.\n response[kState].body = body.body\n\n // 3. If body's type is non-null and response's header list does not contain\n // `Content-Type`, then append (`Content-Type`, body's type) to response's header list.\n if (body.type != null && !response[kState].headersList.contains('Content-Type')) {\n response[kState].headersList.append('content-type', body.type)\n }\n }\n}\n\nwebidl.converters.ReadableStream = webidl.interfaceConverter(\n ReadableStream\n)\n\nwebidl.converters.FormData = webidl.interfaceConverter(\n FormData\n)\n\nwebidl.converters.URLSearchParams = webidl.interfaceConverter(\n URLSearchParams\n)\n\n// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit\nwebidl.converters.XMLHttpRequestBodyInit = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) {\n return webidl.converters.BufferSource(V)\n }\n\n if (util.isFormDataLike(V)) {\n return webidl.converters.FormData(V, { strict: false })\n }\n\n if (V instanceof URLSearchParams) {\n return webidl.converters.URLSearchParams(V)\n }\n\n return webidl.converters.DOMString(V)\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit\nwebidl.converters.BodyInit = function (V) {\n if (V instanceof ReadableStream) {\n return webidl.converters.ReadableStream(V)\n }\n\n // Note: the spec doesn't include async iterables,\n // this is an undici extension.\n if (V?.[Symbol.asyncIterator]) {\n return V\n }\n\n return webidl.converters.XMLHttpRequestBodyInit(V)\n}\n\nwebidl.converters.ResponseInit = webidl.dictionaryConverter([\n {\n key: 'status',\n converter: webidl.converters['unsigned short'],\n defaultValue: 200\n },\n {\n key: 'statusText',\n converter: webidl.converters.ByteString,\n defaultValue: ''\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n }\n])\n\nmodule.exports = {\n makeNetworkError,\n makeResponse,\n makeAppropriateNetworkError,\n filterResponse,\n Response,\n cloneResponse\n}\n","'use strict'\n\nmodule.exports = {\n kUrl: Symbol('url'),\n kHeaders: Symbol('headers'),\n kSignal: Symbol('signal'),\n kState: Symbol('state'),\n kGuard: Symbol('guard'),\n kRealm: Symbol('realm')\n}\n","'use strict'\n\nconst { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants')\nconst { getGlobalOrigin } = require('./global')\nconst { performance } = require('perf_hooks')\nconst { isBlobLike, toUSVString, ReadableStreamFrom } = require('../core/util')\nconst assert = require('assert')\nconst { isUint8Array } = require('util/types')\n\n// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable\n/** @type {import('crypto')|undefined} */\nlet crypto\n\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\nfunction responseURL (response) {\n // https://fetch.spec.whatwg.org/#responses\n // A response has an associated URL. It is a pointer to the last URL\n // in response’s URL list and null if response’s URL list is empty.\n const urlList = response.urlList\n const length = urlList.length\n return length === 0 ? null : urlList[length - 1].toString()\n}\n\n// https://fetch.spec.whatwg.org/#concept-response-location-url\nfunction responseLocationURL (response, requestFragment) {\n // 1. If response’s status is not a redirect status, then return null.\n if (!redirectStatusSet.has(response.status)) {\n return null\n }\n\n // 2. Let location be the result of extracting header list values given\n // `Location` and response’s header list.\n let location = response.headersList.get('location')\n\n // 3. If location is a header value, then set location to the result of\n // parsing location with response’s URL.\n if (location !== null && isValidHeaderValue(location)) {\n location = new URL(location, responseURL(response))\n }\n\n // 4. If location is a URL whose fragment is null, then set location’s\n // fragment to requestFragment.\n if (location && !location.hash) {\n location.hash = requestFragment\n }\n\n // 5. Return location.\n return location\n}\n\n/** @returns {URL} */\nfunction requestCurrentURL (request) {\n return request.urlList[request.urlList.length - 1]\n}\n\nfunction requestBadPort (request) {\n // 1. Let url be request’s current URL.\n const url = requestCurrentURL(request)\n\n // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port,\n // then return blocked.\n if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) {\n return 'blocked'\n }\n\n // 3. Return allowed.\n return 'allowed'\n}\n\nfunction isErrorLike (object) {\n return object instanceof Error || (\n object?.constructor?.name === 'Error' ||\n object?.constructor?.name === 'DOMException'\n )\n}\n\n// Check whether |statusText| is a ByteString and\n// matches the Reason-Phrase token production.\n// RFC 2616: https://tools.ietf.org/html/rfc2616\n// RFC 7230: https://tools.ietf.org/html/rfc7230\n// \"reason-phrase = *( HTAB / SP / VCHAR / obs-text )\"\n// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116\nfunction isValidReasonPhrase (statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i)\n if (\n !(\n (\n c === 0x09 || // HTAB\n (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n (c >= 0x80 && c <= 0xff)\n ) // obs-text\n )\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n * @param {number} c\n */\nfunction isTokenCharCode (c) {\n switch (c) {\n case 0x22:\n case 0x28:\n case 0x29:\n case 0x2c:\n case 0x2f:\n case 0x3a:\n case 0x3b:\n case 0x3c:\n case 0x3d:\n case 0x3e:\n case 0x3f:\n case 0x40:\n case 0x5b:\n case 0x5c:\n case 0x5d:\n case 0x7b:\n case 0x7d:\n // DQUOTE and \"(),/:;<=>?@[\\]{}\"\n return false\n default:\n // VCHAR %x21-7E\n return c >= 0x21 && c <= 0x7e\n }\n}\n\n/**\n * @param {string} characters\n */\nfunction isValidHTTPToken (characters) {\n if (characters.length === 0) {\n return false\n }\n for (let i = 0; i < characters.length; ++i) {\n if (!isTokenCharCode(characters.charCodeAt(i))) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-name\n * @param {string} potentialValue\n */\nfunction isValidHeaderName (potentialValue) {\n return isValidHTTPToken(potentialValue)\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value\n * @param {string} potentialValue\n */\nfunction isValidHeaderValue (potentialValue) {\n // - Has no leading or trailing HTTP tab or space bytes.\n // - Contains no 0x00 (NUL) or HTTP newline bytes.\n if (\n potentialValue.startsWith('\\t') ||\n potentialValue.startsWith(' ') ||\n potentialValue.endsWith('\\t') ||\n potentialValue.endsWith(' ')\n ) {\n return false\n }\n\n if (\n potentialValue.includes('\\0') ||\n potentialValue.includes('\\r') ||\n potentialValue.includes('\\n')\n ) {\n return false\n }\n\n return true\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect\nfunction setRequestReferrerPolicyOnRedirect (request, actualResponse) {\n // Given a request request and a response actualResponse, this algorithm\n // updates request’s referrer policy according to the Referrer-Policy\n // header (if any) in actualResponse.\n\n // 1. Let policy be the result of executing § 8.1 Parse a referrer policy\n // from a Referrer-Policy header on actualResponse.\n\n // 8.1 Parse a referrer policy from a Referrer-Policy header\n // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list.\n const { headersList } = actualResponse\n // 2. Let policy be the empty string.\n // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token.\n // 4. Return policy.\n const policyHeader = (headersList.get('referrer-policy') ?? '').split(',')\n\n // Note: As the referrer-policy can contain multiple policies\n // separated by comma, we need to loop through all of them\n // and pick the first valid one.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy\n let policy = ''\n if (policyHeader.length > 0) {\n // The right-most policy takes precedence.\n // The left-most policy is the fallback.\n for (let i = policyHeader.length; i !== 0; i--) {\n const token = policyHeader[i - 1].trim()\n if (referrerPolicyTokens.has(token)) {\n policy = token\n break\n }\n }\n }\n\n // 2. If policy is not the empty string, then set request’s referrer policy to policy.\n if (policy !== '') {\n request.referrerPolicy = policy\n }\n}\n\n// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check\nfunction crossOriginResourcePolicyCheck () {\n // TODO\n return 'allowed'\n}\n\n// https://fetch.spec.whatwg.org/#concept-cors-check\nfunction corsCheck () {\n // TODO\n return 'success'\n}\n\n// https://fetch.spec.whatwg.org/#concept-tao-check\nfunction TAOCheck () {\n // TODO\n return 'success'\n}\n\nfunction appendFetchMetadata (httpRequest) {\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header\n\n // 1. Assert: r’s url is a potentially trustworthy URL.\n // TODO\n\n // 2. Let header be a Structured Header whose value is a token.\n let header = null\n\n // 3. Set header’s value to r’s mode.\n header = httpRequest.mode\n\n // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list.\n httpRequest.headersList.set('sec-fetch-mode', header)\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header\n // TODO\n}\n\n// https://fetch.spec.whatwg.org/#append-a-request-origin-header\nfunction appendRequestOriginHeader (request) {\n // 1. Let serializedOrigin be the result of byte-serializing a request origin with request.\n let serializedOrigin = request.origin\n\n // 2. If request’s response tainting is \"cors\" or request’s mode is \"websocket\", then append (`Origin`, serializedOrigin) to request’s header list.\n if (request.responseTainting === 'cors' || request.mode === 'websocket') {\n if (serializedOrigin) {\n request.headersList.append('origin', serializedOrigin)\n }\n\n // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then:\n } else if (request.method !== 'GET' && request.method !== 'HEAD') {\n // 1. Switch on request’s referrer policy:\n switch (request.referrerPolicy) {\n case 'no-referrer':\n // Set serializedOrigin to `null`.\n serializedOrigin = null\n break\n case 'no-referrer-when-downgrade':\n case 'strict-origin':\n case 'strict-origin-when-cross-origin':\n // If request’s origin is a tuple origin, its scheme is \"https\", and request’s current URL’s scheme is not \"https\", then set serializedOrigin to `null`.\n if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n case 'same-origin':\n // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`.\n if (!sameOrigin(request, requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n default:\n // Do nothing.\n }\n\n if (serializedOrigin) {\n // 2. Append (`Origin`, serializedOrigin) to request’s header list.\n request.headersList.append('origin', serializedOrigin)\n }\n }\n}\n\nfunction coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {\n // TODO\n return performance.now()\n}\n\n// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info\nfunction createOpaqueTimingInfo (timingInfo) {\n return {\n startTime: timingInfo.startTime ?? 0,\n redirectStartTime: 0,\n redirectEndTime: 0,\n postRedirectStartTime: timingInfo.startTime ?? 0,\n finalServiceWorkerStartTime: 0,\n finalNetworkResponseStartTime: 0,\n finalNetworkRequestStartTime: 0,\n endTime: 0,\n encodedBodySize: 0,\n decodedBodySize: 0,\n finalConnectionTimingInfo: null\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#policy-container\nfunction makePolicyContainer () {\n // Note: the fetch spec doesn't make use of embedder policy or CSP list\n return {\n referrerPolicy: 'strict-origin-when-cross-origin'\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container\nfunction clonePolicyContainer (policyContainer) {\n return {\n referrerPolicy: policyContainer.referrerPolicy\n }\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer\nfunction determineRequestsReferrer (request) {\n // 1. Let policy be request's referrer policy.\n const policy = request.referrerPolicy\n\n // Note: policy cannot (shouldn't) be null or an empty string.\n assert(policy)\n\n // 2. Let environment be request’s client.\n\n let referrerSource = null\n\n // 3. Switch on request’s referrer:\n if (request.referrer === 'client') {\n // Note: node isn't a browser and doesn't implement document/iframes,\n // so we bypass this step and replace it with our own.\n\n const globalOrigin = getGlobalOrigin()\n\n if (!globalOrigin || globalOrigin.origin === 'null') {\n return 'no-referrer'\n }\n\n // note: we need to clone it as it's mutated\n referrerSource = new URL(globalOrigin)\n } else if (request.referrer instanceof URL) {\n // Let referrerSource be request’s referrer.\n referrerSource = request.referrer\n }\n\n // 4. Let request’s referrerURL be the result of stripping referrerSource for\n // use as a referrer.\n let referrerURL = stripURLForReferrer(referrerSource)\n\n // 5. Let referrerOrigin be the result of stripping referrerSource for use as\n // a referrer, with the origin-only flag set to true.\n const referrerOrigin = stripURLForReferrer(referrerSource, true)\n\n // 6. If the result of serializing referrerURL is a string whose length is\n // greater than 4096, set referrerURL to referrerOrigin.\n if (referrerURL.toString().length > 4096) {\n referrerURL = referrerOrigin\n }\n\n const areSameOrigin = sameOrigin(request, referrerURL)\n const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) &&\n !isURLPotentiallyTrustworthy(request.url)\n\n // 8. Execute the switch statements corresponding to the value of policy:\n switch (policy) {\n case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true)\n case 'unsafe-url': return referrerURL\n case 'same-origin':\n return areSameOrigin ? referrerOrigin : 'no-referrer'\n case 'origin-when-cross-origin':\n return areSameOrigin ? referrerURL : referrerOrigin\n case 'strict-origin-when-cross-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If the origin of referrerURL and the origin of request’s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(referrerURL, currentURL)) {\n return referrerURL\n }\n\n // 2. If referrerURL is a potentially trustworthy URL and request’s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n\n // 3. Return referrerOrigin.\n return referrerOrigin\n }\n case 'strict-origin': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request’s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n case 'no-referrer-when-downgrade': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request’s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n\n default: // eslint-disable-line\n return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url\n * @param {URL} url\n * @param {boolean|undefined} originOnly\n */\nfunction stripURLForReferrer (url, originOnly) {\n // 1. Assert: url is a URL.\n assert(url instanceof URL)\n\n // 2. If url’s scheme is a local scheme, then return no referrer.\n if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') {\n return 'no-referrer'\n }\n\n // 3. Set url’s username to the empty string.\n url.username = ''\n\n // 4. Set url’s password to the empty string.\n url.password = ''\n\n // 5. Set url’s fragment to null.\n url.hash = ''\n\n // 6. If the origin-only flag is true, then:\n if (originOnly) {\n // 1. Set url’s path to « the empty string ».\n url.pathname = ''\n\n // 2. Set url’s query to null.\n url.search = ''\n }\n\n // 7. Return url.\n return url\n}\n\nfunction isURLPotentiallyTrustworthy (url) {\n if (!(url instanceof URL)) {\n return false\n }\n\n // If child of about, return true\n if (url.href === 'about:blank' || url.href === 'about:srcdoc') {\n return true\n }\n\n // If scheme is data, return true\n if (url.protocol === 'data:') return true\n\n // If file, return true\n if (url.protocol === 'file:') return true\n\n return isOriginPotentiallyTrustworthy(url.origin)\n\n function isOriginPotentiallyTrustworthy (origin) {\n // If origin is explicitly null, return false\n if (origin == null || origin === 'null') return false\n\n const originAsURL = new URL(origin)\n\n // If secure, return true\n if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') {\n return true\n }\n\n // If localhost or variants, return true\n if (/^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^\\[(?:0*:)*?:?0*1\\]$/.test(originAsURL.hostname) ||\n (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) ||\n (originAsURL.hostname.endsWith('.localhost'))) {\n return true\n }\n\n // If any other, return false\n return false\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist\n * @param {Uint8Array} bytes\n * @param {string} metadataList\n */\nfunction bytesMatch (bytes, metadataList) {\n // If node is not built with OpenSSL support, we cannot check\n // a request's integrity, so allow it by default (the spec will\n // allow requests if an invalid hash is given, as precedence).\n /* istanbul ignore if: only if node is built with --without-ssl */\n if (crypto === undefined) {\n return true\n }\n\n // 1. Let parsedMetadata be the result of parsing metadataList.\n const parsedMetadata = parseMetadata(metadataList)\n\n // 2. If parsedMetadata is no metadata, return true.\n if (parsedMetadata === 'no metadata') {\n return true\n }\n\n // 3. If parsedMetadata is the empty set, return true.\n if (parsedMetadata.length === 0) {\n return true\n }\n\n // 4. Let metadata be the result of getting the strongest\n // metadata from parsedMetadata.\n const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo))\n // get the strongest algorithm\n const strongest = list[0].algo\n // get all entries that use the strongest algorithm; ignore weaker\n const metadata = list.filter((item) => item.algo === strongest)\n\n // 5. For each item in metadata:\n for (const item of metadata) {\n // 1. Let algorithm be the alg component of item.\n const algorithm = item.algo\n\n // 2. Let expectedValue be the val component of item.\n let expectedValue = item.hash\n\n // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e\n // \"be liberal with padding\". This is annoying, and it's not even in the spec.\n\n if (expectedValue.endsWith('==')) {\n expectedValue = expectedValue.slice(0, -2)\n }\n\n // 3. Let actualValue be the result of applying algorithm to bytes.\n let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')\n\n if (actualValue.endsWith('==')) {\n actualValue = actualValue.slice(0, -2)\n }\n\n // 4. If actualValue is a case-sensitive match for expectedValue,\n // return true.\n if (actualValue === expectedValue) {\n return true\n }\n\n let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url')\n\n if (actualBase64URL.endsWith('==')) {\n actualBase64URL = actualBase64URL.slice(0, -2)\n }\n\n if (actualBase64URL === expectedValue) {\n return true\n }\n }\n\n // 6. Return false.\n return false\n}\n\n// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options\n// https://www.w3.org/TR/CSP2/#source-list-syntax\n// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1\nconst parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={0,2}))( +[\\x21-\\x7e]?)?/i\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata\n * @param {string} metadata\n */\nfunction parseMetadata (metadata) {\n // 1. Let result be the empty set.\n /** @type {{ algo: string, hash: string }[]} */\n const result = []\n\n // 2. Let empty be equal to true.\n let empty = true\n\n const supportedHashes = crypto.getHashes()\n\n // 3. For each token returned by splitting metadata on spaces:\n for (const token of metadata.split(' ')) {\n // 1. Set empty to false.\n empty = false\n\n // 2. Parse token as a hash-with-options.\n const parsedToken = parseHashWithOptions.exec(token)\n\n // 3. If token does not parse, continue to the next token.\n if (parsedToken === null || parsedToken.groups === undefined) {\n // Note: Chromium blocks the request at this point, but Firefox\n // gives a warning that an invalid integrity was given. The\n // correct behavior is to ignore these, and subsequently not\n // check the integrity of the resource.\n continue\n }\n\n // 4. Let algorithm be the hash-algo component of token.\n const algorithm = parsedToken.groups.algo\n\n // 5. If algorithm is a hash function recognized by the user\n // agent, add the parsed token to result.\n if (supportedHashes.includes(algorithm.toLowerCase())) {\n result.push(parsedToken.groups)\n }\n }\n\n // 4. Return no metadata if empty is true, otherwise return result.\n if (empty === true) {\n return 'no metadata'\n }\n\n return result\n}\n\n// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request\nfunction tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {\n // TODO\n}\n\n/**\n * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}\n * @param {URL} A\n * @param {URL} B\n */\nfunction sameOrigin (A, B) {\n // 1. If A and B are the same opaque origin, then return true.\n if (A.origin === B.origin && A.origin === 'null') {\n return true\n }\n\n // 2. If A and B are both tuple origins and their schemes,\n // hosts, and port are identical, then return true.\n if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {\n return true\n }\n\n // 3. Return false.\n return false\n}\n\nfunction createDeferredPromise () {\n let res\n let rej\n const promise = new Promise((resolve, reject) => {\n res = resolve\n rej = reject\n })\n\n return { promise, resolve: res, reject: rej }\n}\n\nfunction isAborted (fetchParams) {\n return fetchParams.controller.state === 'aborted'\n}\n\nfunction isCancelled (fetchParams) {\n return fetchParams.controller.state === 'aborted' ||\n fetchParams.controller.state === 'terminated'\n}\n\nconst normalizeMethodRecord = {\n delete: 'DELETE',\n DELETE: 'DELETE',\n get: 'GET',\n GET: 'GET',\n head: 'HEAD',\n HEAD: 'HEAD',\n options: 'OPTIONS',\n OPTIONS: 'OPTIONS',\n post: 'POST',\n POST: 'POST',\n put: 'PUT',\n PUT: 'PUT'\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(normalizeMethodRecord, null)\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-method-normalize\n * @param {string} method\n */\nfunction normalizeMethod (method) {\n return normalizeMethodRecord[method.toLowerCase()] ?? method\n}\n\n// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string\nfunction serializeJavascriptValueToJSONString (value) {\n // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »).\n const result = JSON.stringify(value)\n\n // 2. If result is undefined, then throw a TypeError.\n if (result === undefined) {\n throw new TypeError('Value is not JSON serializable')\n }\n\n // 3. Assert: result is a string.\n assert(typeof result === 'string')\n\n // 4. Return result.\n return result\n}\n\n// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object\nconst esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {() => unknown[]} iterator\n * @param {string} name name of the instance\n * @param {'key'|'value'|'key+value'} kind\n */\nfunction makeIterator (iterator, name, kind) {\n const object = {\n index: 0,\n kind,\n target: iterator\n }\n\n const i = {\n next () {\n // 1. Let interface be the interface for which the iterator prototype object exists.\n\n // 2. Let thisValue be the this value.\n\n // 3. Let object be ? ToObject(thisValue).\n\n // 4. If object is a platform object, then perform a security\n // check, passing:\n\n // 5. If object is not a default iterator object for interface,\n // then throw a TypeError.\n if (Object.getPrototypeOf(this) !== i) {\n throw new TypeError(\n `'next' called on an object that does not implement interface ${name} Iterator.`\n )\n }\n\n // 6. Let index be object’s index.\n // 7. Let kind be object’s kind.\n // 8. Let values be object’s target's value pairs to iterate over.\n const { index, kind, target } = object\n const values = target()\n\n // 9. Let len be the length of values.\n const len = values.length\n\n // 10. If index is greater than or equal to len, then return\n // CreateIterResultObject(undefined, true).\n if (index >= len) {\n return { value: undefined, done: true }\n }\n\n // 11. Let pair be the entry in values at index index.\n const pair = values[index]\n\n // 12. Set object’s index to index + 1.\n object.index = index + 1\n\n // 13. Return the iterator result for pair and kind.\n return iteratorResult(pair, kind)\n },\n // The class string of an iterator prototype object for a given interface is the\n // result of concatenating the identifier of the interface and the string \" Iterator\".\n [Symbol.toStringTag]: `${name} Iterator`\n }\n\n // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%.\n Object.setPrototypeOf(i, esIteratorPrototype)\n // esIteratorPrototype needs to be the prototype of i\n // which is the prototype of an empty object. Yes, it's confusing.\n return Object.setPrototypeOf({}, i)\n}\n\n// https://webidl.spec.whatwg.org/#iterator-result\nfunction iteratorResult (pair, kind) {\n let result\n\n // 1. Let result be a value determined by the value of kind:\n switch (kind) {\n case 'key': {\n // 1. Let idlKey be pair’s key.\n // 2. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 3. result is key.\n result = pair[0]\n break\n }\n case 'value': {\n // 1. Let idlValue be pair’s value.\n // 2. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 3. result is value.\n result = pair[1]\n break\n }\n case 'key+value': {\n // 1. Let idlKey be pair’s key.\n // 2. Let idlValue be pair’s value.\n // 3. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 4. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 5. Let array be ! ArrayCreate(2).\n // 6. Call ! CreateDataProperty(array, \"0\", key).\n // 7. Call ! CreateDataProperty(array, \"1\", value).\n // 8. result is array.\n result = pair\n break\n }\n }\n\n // 2. Return CreateIterResultObject(result, false).\n return { value: result, done: false }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-fully-read\n */\nasync function fullyReadBody (body, processBody, processBodyError) {\n // 1. If taskDestination is null, then set taskDestination to\n // the result of starting a new parallel queue.\n\n // 2. Let successSteps given a byte sequence bytes be to queue a\n // fetch task to run processBody given bytes, with taskDestination.\n const successSteps = processBody\n\n // 3. Let errorSteps be to queue a fetch task to run processBodyError,\n // with taskDestination.\n const errorSteps = processBodyError\n\n // 4. Let reader be the result of getting a reader for body’s stream.\n // If that threw an exception, then run errorSteps with that\n // exception and return.\n let reader\n\n try {\n reader = body.stream.getReader()\n } catch (e) {\n errorSteps(e)\n return\n }\n\n // 5. Read all bytes from reader, given successSteps and errorSteps.\n try {\n const result = await readAllBytes(reader)\n successSteps(result)\n } catch (e) {\n errorSteps(e)\n }\n}\n\n/** @type {ReadableStream} */\nlet ReadableStream = globalThis.ReadableStream\n\nfunction isReadableStreamLike (stream) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n return stream instanceof ReadableStream || (\n stream[Symbol.toStringTag] === 'ReadableStream' &&\n typeof stream.tee === 'function'\n )\n}\n\nconst MAXIMUM_ARGUMENT_LENGTH = 65535\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-decode\n * @param {number[]|Uint8Array} input\n */\nfunction isomorphicDecode (input) {\n // 1. To isomorphic decode a byte sequence input, return a string whose code point\n // length is equal to input’s length and whose code points have the same values\n // as the values of input’s bytes, in the same order.\n\n if (input.length < MAXIMUM_ARGUMENT_LENGTH) {\n return String.fromCharCode(...input)\n }\n\n return input.reduce((previous, current) => previous + String.fromCharCode(current), '')\n}\n\n/**\n * @param {ReadableStreamController} controller\n */\nfunction readableStreamClose (controller) {\n try {\n controller.close()\n } catch (err) {\n // TODO: add comment explaining why this error occurs.\n if (!err.message.includes('Controller is already closed')) {\n throw err\n }\n }\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-encode\n * @param {string} input\n */\nfunction isomorphicEncode (input) {\n // 1. Assert: input contains no code points greater than U+00FF.\n for (let i = 0; i < input.length; i++) {\n assert(input.charCodeAt(i) <= 0xFF)\n }\n\n // 2. Return a byte sequence whose length is equal to input’s code\n // point length and whose bytes have the same values as the\n // values of input’s code points, in the same order\n return input\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes\n * @see https://streams.spec.whatwg.org/#read-loop\n * @param {ReadableStreamDefaultReader} reader\n */\nasync function readAllBytes (reader) {\n const bytes = []\n let byteLength = 0\n\n while (true) {\n const { done, value: chunk } = await reader.read()\n\n if (done) {\n // 1. Call successSteps with bytes.\n return Buffer.concat(bytes, byteLength)\n }\n\n // 1. If chunk is not a Uint8Array object, call failureSteps\n // with a TypeError and abort these steps.\n if (!isUint8Array(chunk)) {\n throw new TypeError('Received non-Uint8Array chunk')\n }\n\n // 2. Append the bytes represented by chunk to bytes.\n bytes.push(chunk)\n byteLength += chunk.length\n\n // 3. Read-loop given reader, bytes, successSteps, and failureSteps.\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#is-local\n * @param {URL} url\n */\nfunction urlIsLocal (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'\n}\n\n/**\n * @param {string|URL} url\n */\nfunction urlHasHttpsScheme (url) {\n if (typeof url === 'string') {\n return url.startsWith('https:')\n }\n\n return url.protocol === 'https:'\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-scheme\n * @param {URL} url\n */\nfunction urlIsHttpHttpsScheme (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'http:' || protocol === 'https:'\n}\n\n/**\n * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0.\n */\nconst hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key))\n\nmodule.exports = {\n isAborted,\n isCancelled,\n createDeferredPromise,\n ReadableStreamFrom,\n toUSVString,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n coarsenedSharedCurrentTime,\n determineRequestsReferrer,\n makePolicyContainer,\n clonePolicyContainer,\n appendFetchMetadata,\n appendRequestOriginHeader,\n TAOCheck,\n corsCheck,\n crossOriginResourcePolicyCheck,\n createOpaqueTimingInfo,\n setRequestReferrerPolicyOnRedirect,\n isValidHTTPToken,\n requestBadPort,\n requestCurrentURL,\n responseURL,\n responseLocationURL,\n isBlobLike,\n isURLPotentiallyTrustworthy,\n isValidReasonPhrase,\n sameOrigin,\n normalizeMethod,\n serializeJavascriptValueToJSONString,\n makeIterator,\n isValidHeaderName,\n isValidHeaderValue,\n hasOwn,\n isErrorLike,\n fullyReadBody,\n bytesMatch,\n isReadableStreamLike,\n readableStreamClose,\n isomorphicEncode,\n isomorphicDecode,\n urlIsLocal,\n urlHasHttpsScheme,\n urlIsHttpHttpsScheme,\n readAllBytes,\n normalizeMethodRecord\n}\n","'use strict'\n\nconst { types } = require('util')\nconst { hasOwn, toUSVString } = require('./util')\n\n/** @type {import('../../types/webidl').Webidl} */\nconst webidl = {}\nwebidl.converters = {}\nwebidl.util = {}\nwebidl.errors = {}\n\nwebidl.errors.exception = function (message) {\n return new TypeError(`${message.header}: ${message.message}`)\n}\n\nwebidl.errors.conversionFailed = function (context) {\n const plural = context.types.length === 1 ? '' : ' one of'\n const message =\n `${context.argument} could not be converted to` +\n `${plural}: ${context.types.join(', ')}.`\n\n return webidl.errors.exception({\n header: context.prefix,\n message\n })\n}\n\nwebidl.errors.invalidArgument = function (context) {\n return webidl.errors.exception({\n header: context.prefix,\n message: `\"${context.value}\" is an invalid ${context.type}.`\n })\n}\n\n// https://webidl.spec.whatwg.org/#implements\nwebidl.brandCheck = function (V, I, opts = undefined) {\n if (opts?.strict !== false && !(V instanceof I)) {\n throw new TypeError('Illegal invocation')\n } else {\n return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]\n }\n}\n\nwebidl.argumentLengthCheck = function ({ length }, min, ctx) {\n if (length < min) {\n throw webidl.errors.exception({\n message: `${min} argument${min !== 1 ? 's' : ''} required, ` +\n `but${length ? ' only' : ''} ${length} found.`,\n ...ctx\n })\n }\n}\n\nwebidl.illegalConstructor = function () {\n throw webidl.errors.exception({\n header: 'TypeError',\n message: 'Illegal constructor'\n })\n}\n\n// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values\nwebidl.util.Type = function (V) {\n switch (typeof V) {\n case 'undefined': return 'Undefined'\n case 'boolean': return 'Boolean'\n case 'string': return 'String'\n case 'symbol': return 'Symbol'\n case 'number': return 'Number'\n case 'bigint': return 'BigInt'\n case 'function':\n case 'object': {\n if (V === null) {\n return 'Null'\n }\n\n return 'Object'\n }\n }\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint\nwebidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) {\n let upperBound\n let lowerBound\n\n // 1. If bitLength is 64, then:\n if (bitLength === 64) {\n // 1. Let upperBound be 2^53 − 1.\n upperBound = Math.pow(2, 53) - 1\n\n // 2. If signedness is \"unsigned\", then let lowerBound be 0.\n if (signedness === 'unsigned') {\n lowerBound = 0\n } else {\n // 3. Otherwise let lowerBound be −2^53 + 1.\n lowerBound = Math.pow(-2, 53) + 1\n }\n } else if (signedness === 'unsigned') {\n // 2. Otherwise, if signedness is \"unsigned\", then:\n\n // 1. Let lowerBound be 0.\n lowerBound = 0\n\n // 2. Let upperBound be 2^bitLength − 1.\n upperBound = Math.pow(2, bitLength) - 1\n } else {\n // 3. Otherwise:\n\n // 1. Let lowerBound be -2^bitLength − 1.\n lowerBound = Math.pow(-2, bitLength) - 1\n\n // 2. Let upperBound be 2^bitLength − 1 − 1.\n upperBound = Math.pow(2, bitLength - 1) - 1\n }\n\n // 4. Let x be ? ToNumber(V).\n let x = Number(V)\n\n // 5. If x is −0, then set x to +0.\n if (x === 0) {\n x = 0\n }\n\n // 6. If the conversion is to an IDL type associated\n // with the [EnforceRange] extended attribute, then:\n if (opts.enforceRange === true) {\n // 1. If x is NaN, +∞, or −∞, then throw a TypeError.\n if (\n Number.isNaN(x) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Could not convert ${V} to an integer.`\n })\n }\n\n // 2. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 3. If x < lowerBound or x > upperBound, then\n // throw a TypeError.\n if (x < lowerBound || x > upperBound) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.`\n })\n }\n\n // 4. Return x.\n return x\n }\n\n // 7. If x is not NaN and the conversion is to an IDL\n // type associated with the [Clamp] extended\n // attribute, then:\n if (!Number.isNaN(x) && opts.clamp === true) {\n // 1. Set x to min(max(x, lowerBound), upperBound).\n x = Math.min(Math.max(x, lowerBound), upperBound)\n\n // 2. Round x to the nearest integer, choosing the\n // even integer if it lies halfway between two,\n // and choosing +0 rather than −0.\n if (Math.floor(x) % 2 === 0) {\n x = Math.floor(x)\n } else {\n x = Math.ceil(x)\n }\n\n // 3. Return x.\n return x\n }\n\n // 8. If x is NaN, +0, +∞, or −∞, then return +0.\n if (\n Number.isNaN(x) ||\n (x === 0 && Object.is(0, x)) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n return 0\n }\n\n // 9. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 10. Set x to x modulo 2^bitLength.\n x = x % Math.pow(2, bitLength)\n\n // 11. If signedness is \"signed\" and x ≥ 2^bitLength − 1,\n // then return x − 2^bitLength.\n if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {\n return x - Math.pow(2, bitLength)\n }\n\n // 12. Otherwise, return x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart\nwebidl.util.IntegerPart = function (n) {\n // 1. Let r be floor(abs(n)).\n const r = Math.floor(Math.abs(n))\n\n // 2. If n < 0, then return -1 × r.\n if (n < 0) {\n return -1 * r\n }\n\n // 3. Otherwise, return r.\n return r\n}\n\n// https://webidl.spec.whatwg.org/#es-sequence\nwebidl.sequenceConverter = function (converter) {\n return (V) => {\n // 1. If Type(V) is not Object, throw a TypeError.\n if (webidl.util.Type(V) !== 'Object') {\n throw webidl.errors.exception({\n header: 'Sequence',\n message: `Value of type ${webidl.util.Type(V)} is not an Object.`\n })\n }\n\n // 2. Let method be ? GetMethod(V, @@iterator).\n /** @type {Generator} */\n const method = V?.[Symbol.iterator]?.()\n const seq = []\n\n // 3. If method is undefined, throw a TypeError.\n if (\n method === undefined ||\n typeof method.next !== 'function'\n ) {\n throw webidl.errors.exception({\n header: 'Sequence',\n message: 'Object is not an iterator.'\n })\n }\n\n // https://webidl.spec.whatwg.org/#create-sequence-from-iterable\n while (true) {\n const { done, value } = method.next()\n\n if (done) {\n break\n }\n\n seq.push(converter(value))\n }\n\n return seq\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-to-record\nwebidl.recordConverter = function (keyConverter, valueConverter) {\n return (O) => {\n // 1. If Type(O) is not Object, throw a TypeError.\n if (webidl.util.Type(O) !== 'Object') {\n throw webidl.errors.exception({\n header: 'Record',\n message: `Value of type ${webidl.util.Type(O)} is not an Object.`\n })\n }\n\n // 2. Let result be a new empty instance of record.\n const result = {}\n\n if (!types.isProxy(O)) {\n // Object.keys only returns enumerable properties\n const keys = Object.keys(O)\n\n for (const key of keys) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key])\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n\n // 5. Return result.\n return result\n }\n\n // 3. Let keys be ? O.[[OwnPropertyKeys]]().\n const keys = Reflect.ownKeys(O)\n\n // 4. For each key of keys.\n for (const key of keys) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const desc = Reflect.getOwnPropertyDescriptor(O, key)\n\n // 2. If desc is not undefined and desc.[[Enumerable]] is true:\n if (desc?.enumerable) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key])\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n }\n\n // 5. Return result.\n return result\n }\n}\n\nwebidl.interfaceConverter = function (i) {\n return (V, opts = {}) => {\n if (opts.strict !== false && !(V instanceof i)) {\n throw webidl.errors.exception({\n header: i.name,\n message: `Expected ${V} to be an instance of ${i.name}.`\n })\n }\n\n return V\n }\n}\n\nwebidl.dictionaryConverter = function (converters) {\n return (dictionary) => {\n const type = webidl.util.Type(dictionary)\n const dict = {}\n\n if (type === 'Null' || type === 'Undefined') {\n return dict\n } else if (type !== 'Object') {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`\n })\n }\n\n for (const options of converters) {\n const { key, defaultValue, required, converter } = options\n\n if (required === true) {\n if (!hasOwn(dictionary, key)) {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `Missing required key \"${key}\".`\n })\n }\n }\n\n let value = dictionary[key]\n const hasDefault = hasOwn(options, 'defaultValue')\n\n // Only use defaultValue if value is undefined and\n // a defaultValue options was provided.\n if (hasDefault && value !== null) {\n value = value ?? defaultValue\n }\n\n // A key can be optional and have no default value.\n // When this happens, do not perform a conversion,\n // and do not assign the key a value.\n if (required || hasDefault || value !== undefined) {\n value = converter(value)\n\n if (\n options.allowedValues &&\n !options.allowedValues.includes(value)\n ) {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.`\n })\n }\n\n dict[key] = value\n }\n }\n\n return dict\n }\n}\n\nwebidl.nullableConverter = function (converter) {\n return (V) => {\n if (V === null) {\n return V\n }\n\n return converter(V)\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-DOMString\nwebidl.converters.DOMString = function (V, opts = {}) {\n // 1. If V is null and the conversion is to an IDL type\n // associated with the [LegacyNullToEmptyString]\n // extended attribute, then return the DOMString value\n // that represents the empty string.\n if (V === null && opts.legacyNullToEmptyString) {\n return ''\n }\n\n // 2. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw new TypeError('Could not convert argument of type symbol to string.')\n }\n\n // 3. Return the IDL DOMString value that represents the\n // same sequence of code units as the one the\n // ECMAScript String value x represents.\n return String(V)\n}\n\n// https://webidl.spec.whatwg.org/#es-ByteString\nwebidl.converters.ByteString = function (V) {\n // 1. Let x be ? ToString(V).\n // Note: DOMString converter perform ? ToString(V)\n const x = webidl.converters.DOMString(V)\n\n // 2. If the value of any element of x is greater than\n // 255, then throw a TypeError.\n for (let index = 0; index < x.length; index++) {\n if (x.charCodeAt(index) > 255) {\n throw new TypeError(\n 'Cannot convert argument to a ByteString because the character at ' +\n `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`\n )\n }\n }\n\n // 3. Return an IDL ByteString value whose length is the\n // length of x, and where the value of each element is\n // the value of the corresponding element of x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-USVString\nwebidl.converters.USVString = toUSVString\n\n// https://webidl.spec.whatwg.org/#es-boolean\nwebidl.converters.boolean = function (V) {\n // 1. Let x be the result of computing ToBoolean(V).\n const x = Boolean(V)\n\n // 2. Return the IDL boolean value that is the one that represents\n // the same truth value as the ECMAScript Boolean value x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-any\nwebidl.converters.any = function (V) {\n return V\n}\n\n// https://webidl.spec.whatwg.org/#es-long-long\nwebidl.converters['long long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 64, \"signed\").\n const x = webidl.util.ConvertToInt(V, 64, 'signed')\n\n // 2. Return the IDL long long value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long-long\nwebidl.converters['unsigned long long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 64, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 64, 'unsigned')\n\n // 2. Return the IDL unsigned long long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long\nwebidl.converters['unsigned long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 32, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 32, 'unsigned')\n\n // 2. Return the IDL unsigned long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-short\nwebidl.converters['unsigned short'] = function (V, opts) {\n // 1. Let x be ? ConvertToInt(V, 16, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts)\n\n // 2. Return the IDL unsigned short value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#idl-ArrayBuffer\nwebidl.converters.ArrayBuffer = function (V, opts = {}) {\n // 1. If Type(V) is not Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances\n // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isAnyArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix: `${V}`,\n argument: `${V}`,\n types: ['ArrayBuffer']\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V) is true, then throw a\n // TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n // Note: resizable ArrayBuffers are currently a proposal.\n\n // 4. Return the IDL ArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\nwebidl.converters.TypedArray = function (V, T, opts = {}) {\n // 1. Let T be the IDL type V is being converted to.\n\n // 2. If Type(V) is not Object, or V does not have a\n // [[TypedArrayName]] internal slot with a value\n // equal to T’s name, then throw a TypeError.\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isTypedArray(V) ||\n V.constructor.name !== T.name\n ) {\n throw webidl.errors.conversionFailed({\n prefix: `${T.name}`,\n argument: `${V}`,\n types: [T.name]\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 4. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n // Note: resizable array buffers are currently a proposal\n\n // 5. Return the IDL value of type T that is a reference\n // to the same object as V.\n return V\n}\n\nwebidl.converters.DataView = function (V, opts = {}) {\n // 1. If Type(V) is not Object, or V does not have a\n // [[DataView]] internal slot, then throw a TypeError.\n if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) {\n throw webidl.errors.exception({\n header: 'DataView',\n message: 'Object is not a DataView.'\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,\n // then throw a TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n // Note: resizable ArrayBuffers are currently a proposal\n\n // 4. Return the IDL DataView value that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#BufferSource\nwebidl.converters.BufferSource = function (V, opts = {}) {\n if (types.isAnyArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, opts)\n }\n\n if (types.isTypedArray(V)) {\n return webidl.converters.TypedArray(V, V.constructor)\n }\n\n if (types.isDataView(V)) {\n return webidl.converters.DataView(V, opts)\n }\n\n throw new TypeError(`Could not convert ${V} to a BufferSource.`)\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.ByteString\n)\n\nwebidl.converters['sequence>'] = webidl.sequenceConverter(\n webidl.converters['sequence']\n)\n\nwebidl.converters['record'] = webidl.recordConverter(\n webidl.converters.ByteString,\n webidl.converters.ByteString\n)\n\nmodule.exports = {\n webidl\n}\n","'use strict'\n\n/**\n * @see https://encoding.spec.whatwg.org/#concept-encoding-get\n * @param {string|undefined} label\n */\nfunction getEncoding (label) {\n if (!label) {\n return 'failure'\n }\n\n // 1. Remove any leading and trailing ASCII whitespace from label.\n // 2. If label is an ASCII case-insensitive match for any of the\n // labels listed in the table below, then return the\n // corresponding encoding; otherwise return failure.\n switch (label.trim().toLowerCase()) {\n case 'unicode-1-1-utf-8':\n case 'unicode11utf8':\n case 'unicode20utf8':\n case 'utf-8':\n case 'utf8':\n case 'x-unicode20utf8':\n return 'UTF-8'\n case '866':\n case 'cp866':\n case 'csibm866':\n case 'ibm866':\n return 'IBM866'\n case 'csisolatin2':\n case 'iso-8859-2':\n case 'iso-ir-101':\n case 'iso8859-2':\n case 'iso88592':\n case 'iso_8859-2':\n case 'iso_8859-2:1987':\n case 'l2':\n case 'latin2':\n return 'ISO-8859-2'\n case 'csisolatin3':\n case 'iso-8859-3':\n case 'iso-ir-109':\n case 'iso8859-3':\n case 'iso88593':\n case 'iso_8859-3':\n case 'iso_8859-3:1988':\n case 'l3':\n case 'latin3':\n return 'ISO-8859-3'\n case 'csisolatin4':\n case 'iso-8859-4':\n case 'iso-ir-110':\n case 'iso8859-4':\n case 'iso88594':\n case 'iso_8859-4':\n case 'iso_8859-4:1988':\n case 'l4':\n case 'latin4':\n return 'ISO-8859-4'\n case 'csisolatincyrillic':\n case 'cyrillic':\n case 'iso-8859-5':\n case 'iso-ir-144':\n case 'iso8859-5':\n case 'iso88595':\n case 'iso_8859-5':\n case 'iso_8859-5:1988':\n return 'ISO-8859-5'\n case 'arabic':\n case 'asmo-708':\n case 'csiso88596e':\n case 'csiso88596i':\n case 'csisolatinarabic':\n case 'ecma-114':\n case 'iso-8859-6':\n case 'iso-8859-6-e':\n case 'iso-8859-6-i':\n case 'iso-ir-127':\n case 'iso8859-6':\n case 'iso88596':\n case 'iso_8859-6':\n case 'iso_8859-6:1987':\n return 'ISO-8859-6'\n case 'csisolatingreek':\n case 'ecma-118':\n case 'elot_928':\n case 'greek':\n case 'greek8':\n case 'iso-8859-7':\n case 'iso-ir-126':\n case 'iso8859-7':\n case 'iso88597':\n case 'iso_8859-7':\n case 'iso_8859-7:1987':\n case 'sun_eu_greek':\n return 'ISO-8859-7'\n case 'csiso88598e':\n case 'csisolatinhebrew':\n case 'hebrew':\n case 'iso-8859-8':\n case 'iso-8859-8-e':\n case 'iso-ir-138':\n case 'iso8859-8':\n case 'iso88598':\n case 'iso_8859-8':\n case 'iso_8859-8:1988':\n case 'visual':\n return 'ISO-8859-8'\n case 'csiso88598i':\n case 'iso-8859-8-i':\n case 'logical':\n return 'ISO-8859-8-I'\n case 'csisolatin6':\n case 'iso-8859-10':\n case 'iso-ir-157':\n case 'iso8859-10':\n case 'iso885910':\n case 'l6':\n case 'latin6':\n return 'ISO-8859-10'\n case 'iso-8859-13':\n case 'iso8859-13':\n case 'iso885913':\n return 'ISO-8859-13'\n case 'iso-8859-14':\n case 'iso8859-14':\n case 'iso885914':\n return 'ISO-8859-14'\n case 'csisolatin9':\n case 'iso-8859-15':\n case 'iso8859-15':\n case 'iso885915':\n case 'iso_8859-15':\n case 'l9':\n return 'ISO-8859-15'\n case 'iso-8859-16':\n return 'ISO-8859-16'\n case 'cskoi8r':\n case 'koi':\n case 'koi8':\n case 'koi8-r':\n case 'koi8_r':\n return 'KOI8-R'\n case 'koi8-ru':\n case 'koi8-u':\n return 'KOI8-U'\n case 'csmacintosh':\n case 'mac':\n case 'macintosh':\n case 'x-mac-roman':\n return 'macintosh'\n case 'iso-8859-11':\n case 'iso8859-11':\n case 'iso885911':\n case 'tis-620':\n case 'windows-874':\n return 'windows-874'\n case 'cp1250':\n case 'windows-1250':\n case 'x-cp1250':\n return 'windows-1250'\n case 'cp1251':\n case 'windows-1251':\n case 'x-cp1251':\n return 'windows-1251'\n case 'ansi_x3.4-1968':\n case 'ascii':\n case 'cp1252':\n case 'cp819':\n case 'csisolatin1':\n case 'ibm819':\n case 'iso-8859-1':\n case 'iso-ir-100':\n case 'iso8859-1':\n case 'iso88591':\n case 'iso_8859-1':\n case 'iso_8859-1:1987':\n case 'l1':\n case 'latin1':\n case 'us-ascii':\n case 'windows-1252':\n case 'x-cp1252':\n return 'windows-1252'\n case 'cp1253':\n case 'windows-1253':\n case 'x-cp1253':\n return 'windows-1253'\n case 'cp1254':\n case 'csisolatin5':\n case 'iso-8859-9':\n case 'iso-ir-148':\n case 'iso8859-9':\n case 'iso88599':\n case 'iso_8859-9':\n case 'iso_8859-9:1989':\n case 'l5':\n case 'latin5':\n case 'windows-1254':\n case 'x-cp1254':\n return 'windows-1254'\n case 'cp1255':\n case 'windows-1255':\n case 'x-cp1255':\n return 'windows-1255'\n case 'cp1256':\n case 'windows-1256':\n case 'x-cp1256':\n return 'windows-1256'\n case 'cp1257':\n case 'windows-1257':\n case 'x-cp1257':\n return 'windows-1257'\n case 'cp1258':\n case 'windows-1258':\n case 'x-cp1258':\n return 'windows-1258'\n case 'x-mac-cyrillic':\n case 'x-mac-ukrainian':\n return 'x-mac-cyrillic'\n case 'chinese':\n case 'csgb2312':\n case 'csiso58gb231280':\n case 'gb2312':\n case 'gb_2312':\n case 'gb_2312-80':\n case 'gbk':\n case 'iso-ir-58':\n case 'x-gbk':\n return 'GBK'\n case 'gb18030':\n return 'gb18030'\n case 'big5':\n case 'big5-hkscs':\n case 'cn-big5':\n case 'csbig5':\n case 'x-x-big5':\n return 'Big5'\n case 'cseucpkdfmtjapanese':\n case 'euc-jp':\n case 'x-euc-jp':\n return 'EUC-JP'\n case 'csiso2022jp':\n case 'iso-2022-jp':\n return 'ISO-2022-JP'\n case 'csshiftjis':\n case 'ms932':\n case 'ms_kanji':\n case 'shift-jis':\n case 'shift_jis':\n case 'sjis':\n case 'windows-31j':\n case 'x-sjis':\n return 'Shift_JIS'\n case 'cseuckr':\n case 'csksc56011987':\n case 'euc-kr':\n case 'iso-ir-149':\n case 'korean':\n case 'ks_c_5601-1987':\n case 'ks_c_5601-1989':\n case 'ksc5601':\n case 'ksc_5601':\n case 'windows-949':\n return 'EUC-KR'\n case 'csiso2022kr':\n case 'hz-gb-2312':\n case 'iso-2022-cn':\n case 'iso-2022-cn-ext':\n case 'iso-2022-kr':\n case 'replacement':\n return 'replacement'\n case 'unicodefffe':\n case 'utf-16be':\n return 'UTF-16BE'\n case 'csunicode':\n case 'iso-10646-ucs-2':\n case 'ucs-2':\n case 'unicode':\n case 'unicodefeff':\n case 'utf-16':\n case 'utf-16le':\n return 'UTF-16LE'\n case 'x-user-defined':\n return 'x-user-defined'\n default: return 'failure'\n }\n}\n\nmodule.exports = {\n getEncoding\n}\n","'use strict'\n\nconst {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n} = require('./util')\nconst {\n kState,\n kError,\n kResult,\n kEvents,\n kAborted\n} = require('./symbols')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\n\nclass FileReader extends EventTarget {\n constructor () {\n super()\n\n this[kState] = 'empty'\n this[kResult] = null\n this[kError] = null\n this[kEvents] = {\n loadend: null,\n error: null,\n abort: null,\n load: null,\n progress: null,\n loadstart: null\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer\n * @param {import('buffer').Blob} blob\n */\n readAsArrayBuffer (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsArrayBuffer(blob) method, when invoked,\n // must initiate a read operation for blob with ArrayBuffer.\n readOperation(this, blob, 'ArrayBuffer')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsBinaryString\n * @param {import('buffer').Blob} blob\n */\n readAsBinaryString (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsBinaryString(blob) method, when invoked,\n // must initiate a read operation for blob with BinaryString.\n readOperation(this, blob, 'BinaryString')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsDataText\n * @param {import('buffer').Blob} blob\n * @param {string?} encoding\n */\n readAsText (blob, encoding = undefined) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n if (encoding !== undefined) {\n encoding = webidl.converters.DOMString(encoding)\n }\n\n // The readAsText(blob, encoding) method, when invoked,\n // must initiate a read operation for blob with Text and encoding.\n readOperation(this, blob, 'Text', encoding)\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL\n * @param {import('buffer').Blob} blob\n */\n readAsDataURL (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsDataURL(blob) method, when invoked, must\n // initiate a read operation for blob with DataURL.\n readOperation(this, blob, 'DataURL')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-abort\n */\n abort () {\n // 1. If this's state is \"empty\" or if this's state is\n // \"done\" set this's result to null and terminate\n // this algorithm.\n if (this[kState] === 'empty' || this[kState] === 'done') {\n this[kResult] = null\n return\n }\n\n // 2. If this's state is \"loading\" set this's state to\n // \"done\" and set this's result to null.\n if (this[kState] === 'loading') {\n this[kState] = 'done'\n this[kResult] = null\n }\n\n // 3. If there are any tasks from this on the file reading\n // task source in an affiliated task queue, then remove\n // those tasks from that task queue.\n this[kAborted] = true\n\n // 4. Terminate the algorithm for the read method being processed.\n // TODO\n\n // 5. Fire a progress event called abort at this.\n fireAProgressEvent('abort', this)\n\n // 6. If this's state is not \"loading\", fire a progress\n // event called loadend at this.\n if (this[kState] !== 'loading') {\n fireAProgressEvent('loadend', this)\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate\n */\n get readyState () {\n webidl.brandCheck(this, FileReader)\n\n switch (this[kState]) {\n case 'empty': return this.EMPTY\n case 'loading': return this.LOADING\n case 'done': return this.DONE\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-result\n */\n get result () {\n webidl.brandCheck(this, FileReader)\n\n // The result attribute’s getter, when invoked, must return\n // this's result.\n return this[kResult]\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-error\n */\n get error () {\n webidl.brandCheck(this, FileReader)\n\n // The error attribute’s getter, when invoked, must return\n // this's error.\n return this[kError]\n }\n\n get onloadend () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadend\n }\n\n set onloadend (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadend) {\n this.removeEventListener('loadend', this[kEvents].loadend)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadend = fn\n this.addEventListener('loadend', fn)\n } else {\n this[kEvents].loadend = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].error) {\n this.removeEventListener('error', this[kEvents].error)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].error = fn\n this.addEventListener('error', fn)\n } else {\n this[kEvents].error = null\n }\n }\n\n get onloadstart () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadstart\n }\n\n set onloadstart (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadstart) {\n this.removeEventListener('loadstart', this[kEvents].loadstart)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadstart = fn\n this.addEventListener('loadstart', fn)\n } else {\n this[kEvents].loadstart = null\n }\n }\n\n get onprogress () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].progress\n }\n\n set onprogress (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].progress) {\n this.removeEventListener('progress', this[kEvents].progress)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].progress = fn\n this.addEventListener('progress', fn)\n } else {\n this[kEvents].progress = null\n }\n }\n\n get onload () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].load\n }\n\n set onload (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].load) {\n this.removeEventListener('load', this[kEvents].load)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].load = fn\n this.addEventListener('load', fn)\n } else {\n this[kEvents].load = null\n }\n }\n\n get onabort () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].abort\n }\n\n set onabort (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].abort) {\n this.removeEventListener('abort', this[kEvents].abort)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].abort = fn\n this.addEventListener('abort', fn)\n } else {\n this[kEvents].abort = null\n }\n }\n}\n\n// https://w3c.github.io/FileAPI/#dom-filereader-empty\nFileReader.EMPTY = FileReader.prototype.EMPTY = 0\n// https://w3c.github.io/FileAPI/#dom-filereader-loading\nFileReader.LOADING = FileReader.prototype.LOADING = 1\n// https://w3c.github.io/FileAPI/#dom-filereader-done\nFileReader.DONE = FileReader.prototype.DONE = 2\n\nObject.defineProperties(FileReader.prototype, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors,\n readAsArrayBuffer: kEnumerableProperty,\n readAsBinaryString: kEnumerableProperty,\n readAsText: kEnumerableProperty,\n readAsDataURL: kEnumerableProperty,\n abort: kEnumerableProperty,\n readyState: kEnumerableProperty,\n result: kEnumerableProperty,\n error: kEnumerableProperty,\n onloadstart: kEnumerableProperty,\n onprogress: kEnumerableProperty,\n onload: kEnumerableProperty,\n onabort: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onloadend: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'FileReader',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(FileReader, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors\n})\n\nmodule.exports = {\n FileReader\n}\n","'use strict'\n\nconst { webidl } = require('../fetch/webidl')\n\nconst kState = Symbol('ProgressEvent state')\n\n/**\n * @see https://xhr.spec.whatwg.org/#progressevent\n */\nclass ProgressEvent extends Event {\n constructor (type, eventInitDict = {}) {\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {})\n\n super(type, eventInitDict)\n\n this[kState] = {\n lengthComputable: eventInitDict.lengthComputable,\n loaded: eventInitDict.loaded,\n total: eventInitDict.total\n }\n }\n\n get lengthComputable () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].lengthComputable\n }\n\n get loaded () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].loaded\n }\n\n get total () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].total\n }\n}\n\nwebidl.converters.ProgressEventInit = webidl.dictionaryConverter([\n {\n key: 'lengthComputable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'loaded',\n converter: webidl.converters['unsigned long long'],\n defaultValue: 0\n },\n {\n key: 'total',\n converter: webidl.converters['unsigned long long'],\n defaultValue: 0\n },\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n])\n\nmodule.exports = {\n ProgressEvent\n}\n","'use strict'\n\nmodule.exports = {\n kState: Symbol('FileReader state'),\n kResult: Symbol('FileReader result'),\n kError: Symbol('FileReader error'),\n kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'),\n kEvents: Symbol('FileReader events'),\n kAborted: Symbol('FileReader aborted')\n}\n","'use strict'\n\nconst {\n kState,\n kError,\n kResult,\n kAborted,\n kLastProgressEventFired\n} = require('./symbols')\nconst { ProgressEvent } = require('./progressevent')\nconst { getEncoding } = require('./encoding')\nconst { DOMException } = require('../fetch/constants')\nconst { serializeAMimeType, parseMIMEType } = require('../fetch/dataURL')\nconst { types } = require('util')\nconst { StringDecoder } = require('string_decoder')\nconst { btoa } = require('buffer')\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#readOperation\n * @param {import('./filereader').FileReader} fr\n * @param {import('buffer').Blob} blob\n * @param {string} type\n * @param {string?} encodingName\n */\nfunction readOperation (fr, blob, type, encodingName) {\n // 1. If fr’s state is \"loading\", throw an InvalidStateError\n // DOMException.\n if (fr[kState] === 'loading') {\n throw new DOMException('Invalid state', 'InvalidStateError')\n }\n\n // 2. Set fr’s state to \"loading\".\n fr[kState] = 'loading'\n\n // 3. Set fr’s result to null.\n fr[kResult] = null\n\n // 4. Set fr’s error to null.\n fr[kError] = null\n\n // 5. Let stream be the result of calling get stream on blob.\n /** @type {import('stream/web').ReadableStream} */\n const stream = blob.stream()\n\n // 6. Let reader be the result of getting a reader from stream.\n const reader = stream.getReader()\n\n // 7. Let bytes be an empty byte sequence.\n /** @type {Uint8Array[]} */\n const bytes = []\n\n // 8. Let chunkPromise be the result of reading a chunk from\n // stream with reader.\n let chunkPromise = reader.read()\n\n // 9. Let isFirstChunk be true.\n let isFirstChunk = true\n\n // 10. In parallel, while true:\n // Note: \"In parallel\" just means non-blocking\n // Note 2: readOperation itself cannot be async as double\n // reading the body would then reject the promise, instead\n // of throwing an error.\n ;(async () => {\n while (!fr[kAborted]) {\n // 1. Wait for chunkPromise to be fulfilled or rejected.\n try {\n const { done, value } = await chunkPromise\n\n // 2. If chunkPromise is fulfilled, and isFirstChunk is\n // true, queue a task to fire a progress event called\n // loadstart at fr.\n if (isFirstChunk && !fr[kAborted]) {\n queueMicrotask(() => {\n fireAProgressEvent('loadstart', fr)\n })\n }\n\n // 3. Set isFirstChunk to false.\n isFirstChunk = false\n\n // 4. If chunkPromise is fulfilled with an object whose\n // done property is false and whose value property is\n // a Uint8Array object, run these steps:\n if (!done && types.isUint8Array(value)) {\n // 1. Let bs be the byte sequence represented by the\n // Uint8Array object.\n\n // 2. Append bs to bytes.\n bytes.push(value)\n\n // 3. If roughly 50ms have passed since these steps\n // were last invoked, queue a task to fire a\n // progress event called progress at fr.\n if (\n (\n fr[kLastProgressEventFired] === undefined ||\n Date.now() - fr[kLastProgressEventFired] >= 50\n ) &&\n !fr[kAborted]\n ) {\n fr[kLastProgressEventFired] = Date.now()\n queueMicrotask(() => {\n fireAProgressEvent('progress', fr)\n })\n }\n\n // 4. Set chunkPromise to the result of reading a\n // chunk from stream with reader.\n chunkPromise = reader.read()\n } else if (done) {\n // 5. Otherwise, if chunkPromise is fulfilled with an\n // object whose done property is true, queue a task\n // to run the following steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr’s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Let result be the result of package data given\n // bytes, type, blob’s type, and encodingName.\n try {\n const result = packageData(bytes, type, blob.type, encodingName)\n\n // 4. Else:\n\n if (fr[kAborted]) {\n return\n }\n\n // 1. Set fr’s result to result.\n fr[kResult] = result\n\n // 2. Fire a progress event called load at the fr.\n fireAProgressEvent('load', fr)\n } catch (error) {\n // 3. If package data threw an exception error:\n\n // 1. Set fr’s error to error.\n fr[kError] = error\n\n // 2. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n }\n\n // 5. If fr’s state is not \"loading\", fire a progress\n // event called loadend at the fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n } catch (error) {\n if (fr[kAborted]) {\n return\n }\n\n // 6. Otherwise, if chunkPromise is rejected with an\n // error error, queue a task to run the following\n // steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr’s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Set fr’s error to error.\n fr[kError] = error\n\n // 3. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n\n // 4. If fr’s state is not \"loading\", fire a progress\n // event called loadend at fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n }\n })()\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#fire-a-progress-event\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e The name of the event\n * @param {import('./filereader').FileReader} reader\n */\nfunction fireAProgressEvent (e, reader) {\n // The progress event e does not bubble. e.bubbles must be false\n // The progress event e is NOT cancelable. e.cancelable must be false\n const event = new ProgressEvent(e, {\n bubbles: false,\n cancelable: false\n })\n\n reader.dispatchEvent(event)\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#blob-package-data\n * @param {Uint8Array[]} bytes\n * @param {string} type\n * @param {string?} mimeType\n * @param {string?} encodingName\n */\nfunction packageData (bytes, type, mimeType, encodingName) {\n // 1. A Blob has an associated package data algorithm, given\n // bytes, a type, a optional mimeType, and a optional\n // encodingName, which switches on type and runs the\n // associated steps:\n\n switch (type) {\n case 'DataURL': {\n // 1. Return bytes as a DataURL [RFC2397] subject to\n // the considerations below:\n // * Use mimeType as part of the Data URL if it is\n // available in keeping with the Data URL\n // specification [RFC2397].\n // * If mimeType is not available return a Data URL\n // without a media-type. [RFC2397].\n\n // https://datatracker.ietf.org/doc/html/rfc2397#section-3\n // dataurl := \"data:\" [ mediatype ] [ \";base64\" ] \",\" data\n // mediatype := [ type \"/\" subtype ] *( \";\" parameter )\n // data := *urlchar\n // parameter := attribute \"=\" value\n let dataURL = 'data:'\n\n const parsed = parseMIMEType(mimeType || 'application/octet-stream')\n\n if (parsed !== 'failure') {\n dataURL += serializeAMimeType(parsed)\n }\n\n dataURL += ';base64,'\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n dataURL += btoa(decoder.write(chunk))\n }\n\n dataURL += btoa(decoder.end())\n\n return dataURL\n }\n case 'Text': {\n // 1. Let encoding be failure\n let encoding = 'failure'\n\n // 2. If the encodingName is present, set encoding to the\n // result of getting an encoding from encodingName.\n if (encodingName) {\n encoding = getEncoding(encodingName)\n }\n\n // 3. If encoding is failure, and mimeType is present:\n if (encoding === 'failure' && mimeType) {\n // 1. Let type be the result of parse a MIME type\n // given mimeType.\n const type = parseMIMEType(mimeType)\n\n // 2. If type is not failure, set encoding to the result\n // of getting an encoding from type’s parameters[\"charset\"].\n if (type !== 'failure') {\n encoding = getEncoding(type.parameters.get('charset'))\n }\n }\n\n // 4. If encoding is failure, then set encoding to UTF-8.\n if (encoding === 'failure') {\n encoding = 'UTF-8'\n }\n\n // 5. Decode bytes using fallback encoding encoding, and\n // return the result.\n return decode(bytes, encoding)\n }\n case 'ArrayBuffer': {\n // Return a new ArrayBuffer whose contents are bytes.\n const sequence = combineByteSequences(bytes)\n\n return sequence.buffer\n }\n case 'BinaryString': {\n // Return bytes as a binary string, in which every byte\n // is represented by a code unit of equal value [0..255].\n let binaryString = ''\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n binaryString += decoder.write(chunk)\n }\n\n binaryString += decoder.end()\n\n return binaryString\n }\n }\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#decode\n * @param {Uint8Array[]} ioQueue\n * @param {string} encoding\n */\nfunction decode (ioQueue, encoding) {\n const bytes = combineByteSequences(ioQueue)\n\n // 1. Let BOMEncoding be the result of BOM sniffing ioQueue.\n const BOMEncoding = BOMSniffing(bytes)\n\n let slice = 0\n\n // 2. If BOMEncoding is non-null:\n if (BOMEncoding !== null) {\n // 1. Set encoding to BOMEncoding.\n encoding = BOMEncoding\n\n // 2. Read three bytes from ioQueue, if BOMEncoding is\n // UTF-8; otherwise read two bytes.\n // (Do nothing with those bytes.)\n slice = BOMEncoding === 'UTF-8' ? 3 : 2\n }\n\n // 3. Process a queue with an instance of encoding’s\n // decoder, ioQueue, output, and \"replacement\".\n\n // 4. Return output.\n\n const sliced = bytes.slice(slice)\n return new TextDecoder(encoding).decode(sliced)\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#bom-sniff\n * @param {Uint8Array} ioQueue\n */\nfunction BOMSniffing (ioQueue) {\n // 1. Let BOM be the result of peeking 3 bytes from ioQueue,\n // converted to a byte sequence.\n const [a, b, c] = ioQueue\n\n // 2. For each of the rows in the table below, starting with\n // the first one and going down, if BOM starts with the\n // bytes given in the first column, then return the\n // encoding given in the cell in the second column of that\n // row. Otherwise, return null.\n if (a === 0xEF && b === 0xBB && c === 0xBF) {\n return 'UTF-8'\n } else if (a === 0xFE && b === 0xFF) {\n return 'UTF-16BE'\n } else if (a === 0xFF && b === 0xFE) {\n return 'UTF-16LE'\n }\n\n return null\n}\n\n/**\n * @param {Uint8Array[]} sequences\n */\nfunction combineByteSequences (sequences) {\n const size = sequences.reduce((a, b) => {\n return a + b.byteLength\n }, 0)\n\n let offset = 0\n\n return sequences.reduce((a, b) => {\n a.set(b, offset)\n offset += b.byteLength\n return a\n }, new Uint8Array(size))\n}\n\nmodule.exports = {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n}\n","'use strict'\n\n// We include a version number for the Dispatcher API. In case of breaking changes,\n// this version number must be increased to avoid conflicts.\nconst globalDispatcher = Symbol.for('undici.globalDispatcher.1')\nconst { InvalidArgumentError } = require('./core/errors')\nconst Agent = require('./agent')\n\nif (getGlobalDispatcher() === undefined) {\n setGlobalDispatcher(new Agent())\n}\n\nfunction setGlobalDispatcher (agent) {\n if (!agent || typeof agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument agent must implement Agent')\n }\n Object.defineProperty(globalThis, globalDispatcher, {\n value: agent,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nfunction getGlobalDispatcher () {\n return globalThis[globalDispatcher]\n}\n\nmodule.exports = {\n setGlobalDispatcher,\n getGlobalDispatcher\n}\n","'use strict'\n\nmodule.exports = class DecoratorHandler {\n constructor (handler) {\n this.handler = handler\n }\n\n onConnect (...args) {\n return this.handler.onConnect(...args)\n }\n\n onError (...args) {\n return this.handler.onError(...args)\n }\n\n onUpgrade (...args) {\n return this.handler.onUpgrade(...args)\n }\n\n onHeaders (...args) {\n return this.handler.onHeaders(...args)\n }\n\n onData (...args) {\n return this.handler.onData(...args)\n }\n\n onComplete (...args) {\n return this.handler.onComplete(...args)\n }\n\n onBodySent (...args) {\n return this.handler.onBodySent(...args)\n }\n}\n","'use strict'\n\nconst util = require('../core/util')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('assert')\nconst { InvalidArgumentError } = require('../core/errors')\nconst EE = require('events')\n\nconst redirectableStatusCodes = [300, 301, 302, 303, 307, 308]\n\nconst kBody = Symbol('body')\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nclass RedirectHandler {\n constructor (dispatch, maxRedirections, opts, handler) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n util.validateHandler(handler, opts.method, opts.upgrade)\n\n this.dispatch = dispatch\n this.location = null\n this.abort = null\n this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy\n this.maxRedirections = maxRedirections\n this.handler = handler\n this.history = []\n\n if (util.isStream(this.opts.body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (util.bodyLength(this.opts.body) === 0) {\n this.opts.body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof this.opts.body.readableDidRead !== 'boolean') {\n this.opts.body[kBodyUsed] = false\n EE.prototype.on.call(this.opts.body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n } else if (\n this.opts.body &&\n typeof this.opts.body !== 'string' &&\n !ArrayBuffer.isView(this.opts.body) &&\n util.isIterable(this.opts.body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n }\n }\n\n onConnect (abort) {\n this.abort = abort\n this.handler.onConnect(abort, { history: this.history })\n }\n\n onUpgrade (statusCode, headers, socket) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n\n onError (error) {\n this.handler.onError(error)\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body)\n ? null\n : parseLocation(statusCode, headers)\n\n if (this.opts.origin) {\n this.history.push(new URL(this.opts.path, this.opts.origin))\n }\n\n if (!this.location) {\n return this.handler.onHeaders(statusCode, headers, resume, statusText)\n }\n\n const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))\n const path = search ? `${pathname}${search}` : pathname\n\n // Remove headers referring to the original URL.\n // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers.\n // https://tools.ietf.org/html/rfc7231#section-6.4\n this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin)\n this.opts.path = path\n this.opts.origin = origin\n this.opts.maxRedirections = 0\n this.opts.query = null\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.4\n // In case of HTTP 303, always replace method to be either HEAD or GET\n if (statusCode === 303 && this.opts.method !== 'HEAD') {\n this.opts.method = 'GET'\n this.opts.body = null\n }\n }\n\n onData (chunk) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response bodies.\n\n Redirection is used to serve the requested resource from another URL, so it is assumes that\n no body is generated (and thus can be ignored). Even though generating a body is not prohibited.\n\n For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually\n (which means it's optional and not mandated) contain just an hyperlink to the value of\n the Location response header, so the body can be ignored safely.\n\n For status 300, which is \"Multiple Choices\", the spec mentions both generating a Location\n response header AND a response body with the other possible location to follow.\n Since the spec explicitily chooses not to specify a format for such body and leave it to\n servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.\n */\n } else {\n return this.handler.onData(chunk)\n }\n }\n\n onComplete (trailers) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections\n and neither are useful if present.\n\n See comment on onData method above for more detailed informations.\n */\n\n this.location = null\n this.abort = null\n\n this.dispatch(this.opts, this)\n } else {\n this.handler.onComplete(trailers)\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) {\n this.handler.onBodySent(chunk)\n }\n }\n}\n\nfunction parseLocation (statusCode, headers) {\n if (redirectableStatusCodes.indexOf(statusCode) === -1) {\n return null\n }\n\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toString().toLowerCase() === 'location') {\n return headers[i + 1]\n }\n }\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4.4\nfunction shouldRemoveHeader (header, removeContent, unknownOrigin) {\n return (\n (header.length === 4 && header.toString().toLowerCase() === 'host') ||\n (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||\n (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||\n (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')\n )\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4\nfunction cleanRequestHeaders (headers, removeContent, unknownOrigin) {\n const ret = []\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {\n ret.push(headers[i], headers[i + 1])\n }\n }\n } else if (headers && typeof headers === 'object') {\n for (const key of Object.keys(headers)) {\n if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {\n ret.push(key, headers[key])\n }\n }\n } else {\n assert(headers == null, 'headers must be an object or an array')\n }\n return ret\n}\n\nmodule.exports = RedirectHandler\n","const assert = require('assert')\n\nconst { kRetryHandlerDefaultRetry } = require('../core/symbols')\nconst { RequestRetryError } = require('../core/errors')\nconst { isDisturbed, parseHeaders, parseRangeHeader } = require('../core/util')\n\nfunction calculateRetryAfterHeader (retryAfter) {\n const current = Date.now()\n const diff = new Date(retryAfter).getTime() - current\n\n return diff\n}\n\nclass RetryHandler {\n constructor (opts, handlers) {\n const { retryOptions, ...dispatchOpts } = opts\n const {\n // Retry scoped\n retry: retryFn,\n maxRetries,\n maxTimeout,\n minTimeout,\n timeoutFactor,\n // Response scoped\n methods,\n errorCodes,\n retryAfter,\n statusCodes\n } = retryOptions ?? {}\n\n this.dispatch = handlers.dispatch\n this.handler = handlers.handler\n this.opts = dispatchOpts\n this.abort = null\n this.aborted = false\n this.retryOpts = {\n retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry],\n retryAfter: retryAfter ?? true,\n maxTimeout: maxTimeout ?? 30 * 1000, // 30s,\n timeout: minTimeout ?? 500, // .5s\n timeoutFactor: timeoutFactor ?? 2,\n maxRetries: maxRetries ?? 5,\n // What errors we should retry\n methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],\n // Indicates which errors to retry\n statusCodes: statusCodes ?? [500, 502, 503, 504, 429],\n // List of errors to retry\n errorCodes: errorCodes ?? [\n 'ECONNRESET',\n 'ECONNREFUSED',\n 'ENOTFOUND',\n 'ENETDOWN',\n 'ENETUNREACH',\n 'EHOSTDOWN',\n 'EHOSTUNREACH',\n 'EPIPE'\n ]\n }\n\n this.retryCount = 0\n this.start = 0\n this.end = null\n this.etag = null\n this.resume = null\n\n // Handle possible onConnect duplication\n this.handler.onConnect(reason => {\n this.aborted = true\n if (this.abort) {\n this.abort(reason)\n } else {\n this.reason = reason\n }\n })\n }\n\n onRequestSent () {\n if (this.handler.onRequestSent) {\n this.handler.onRequestSent()\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n if (this.handler.onUpgrade) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n }\n\n onConnect (abort) {\n if (this.aborted) {\n abort(this.reason)\n } else {\n this.abort = abort\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) return this.handler.onBodySent(chunk)\n }\n\n static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {\n const { statusCode, code, headers } = err\n const { method, retryOptions } = opts\n const {\n maxRetries,\n timeout,\n maxTimeout,\n timeoutFactor,\n statusCodes,\n errorCodes,\n methods\n } = retryOptions\n let { counter, currentTimeout } = state\n\n currentTimeout =\n currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout\n\n // Any code that is not a Undici's originated and allowed to retry\n if (\n code &&\n code !== 'UND_ERR_REQ_RETRY' &&\n code !== 'UND_ERR_SOCKET' &&\n !errorCodes.includes(code)\n ) {\n cb(err)\n return\n }\n\n // If a set of method are provided and the current method is not in the list\n if (Array.isArray(methods) && !methods.includes(method)) {\n cb(err)\n return\n }\n\n // If a set of status code are provided and the current status code is not in the list\n if (\n statusCode != null &&\n Array.isArray(statusCodes) &&\n !statusCodes.includes(statusCode)\n ) {\n cb(err)\n return\n }\n\n // If we reached the max number of retries\n if (counter > maxRetries) {\n cb(err)\n return\n }\n\n let retryAfterHeader = headers != null && headers['retry-after']\n if (retryAfterHeader) {\n retryAfterHeader = Number(retryAfterHeader)\n retryAfterHeader = isNaN(retryAfterHeader)\n ? calculateRetryAfterHeader(retryAfterHeader)\n : retryAfterHeader * 1e3 // Retry-After is in seconds\n }\n\n const retryTimeout =\n retryAfterHeader > 0\n ? Math.min(retryAfterHeader, maxTimeout)\n : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout)\n\n state.currentTimeout = retryTimeout\n\n setTimeout(() => cb(null), retryTimeout)\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const headers = parseHeaders(rawHeaders)\n\n this.retryCount += 1\n\n if (statusCode >= 300) {\n this.abort(\n new RequestRetryError('Request failed', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n // Checkpoint for resume from where we left it\n if (this.resume != null) {\n this.resume = null\n\n if (statusCode !== 206) {\n return true\n }\n\n const contentRange = parseRangeHeader(headers['content-range'])\n // If no content range\n if (!contentRange) {\n this.abort(\n new RequestRetryError('Content-Range mismatch', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n // Let's start with a weak etag check\n if (this.etag != null && this.etag !== headers.etag) {\n this.abort(\n new RequestRetryError('ETag mismatch', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n const { start, size, end = size } = contentRange\n\n assert(this.start === start, 'content-range mismatch')\n assert(this.end == null || this.end === end, 'content-range mismatch')\n\n this.resume = resume\n return true\n }\n\n if (this.end == null) {\n if (statusCode === 206) {\n // First time we receive 206\n const range = parseRangeHeader(headers['content-range'])\n\n if (range == null) {\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const { start, size, end = size } = range\n\n assert(\n start != null && Number.isFinite(start) && this.start !== start,\n 'content-range mismatch'\n )\n assert(Number.isFinite(start))\n assert(\n end != null && Number.isFinite(end) && this.end !== end,\n 'invalid content-length'\n )\n\n this.start = start\n this.end = end\n }\n\n // We make our best to checkpoint the body for further range headers\n if (this.end == null) {\n const contentLength = headers['content-length']\n this.end = contentLength != null ? Number(contentLength) : null\n }\n\n assert(Number.isFinite(this.start))\n assert(\n this.end == null || Number.isFinite(this.end),\n 'invalid content-length'\n )\n\n this.resume = resume\n this.etag = headers.etag != null ? headers.etag : null\n\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const err = new RequestRetryError('Request failed', statusCode, {\n headers,\n count: this.retryCount\n })\n\n this.abort(err)\n\n return false\n }\n\n onData (chunk) {\n this.start += chunk.length\n\n return this.handler.onData(chunk)\n }\n\n onComplete (rawTrailers) {\n this.retryCount = 0\n return this.handler.onComplete(rawTrailers)\n }\n\n onError (err) {\n if (this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount++, currentTimeout: this.retryAfter },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n onRetry.bind(this)\n )\n\n function onRetry (err) {\n if (err != null || this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n if (this.start !== 0) {\n this.opts = {\n ...this.opts,\n headers: {\n ...this.opts.headers,\n range: `bytes=${this.start}-${this.end ?? ''}`\n }\n }\n }\n\n try {\n this.dispatch(this.opts, this)\n } catch (err) {\n this.handler.onError(err)\n }\n }\n }\n}\n\nmodule.exports = RetryHandler\n","'use strict'\n\nconst RedirectHandler = require('../handler/RedirectHandler')\n\nfunction createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n const { maxRedirections = defaultMaxRedirections } = opts\n\n if (!maxRedirections) {\n return dispatch(opts, handler)\n }\n\n const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler)\n opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting.\n return dispatch(opts, redirectHandler)\n }\n }\n}\n\nmodule.exports = createRedirectInterceptor\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0;\nconst utils_1 = require(\"./utils\");\n// C headers\nvar ERROR;\n(function (ERROR) {\n ERROR[ERROR[\"OK\"] = 0] = \"OK\";\n ERROR[ERROR[\"INTERNAL\"] = 1] = \"INTERNAL\";\n ERROR[ERROR[\"STRICT\"] = 2] = \"STRICT\";\n ERROR[ERROR[\"LF_EXPECTED\"] = 3] = \"LF_EXPECTED\";\n ERROR[ERROR[\"UNEXPECTED_CONTENT_LENGTH\"] = 4] = \"UNEXPECTED_CONTENT_LENGTH\";\n ERROR[ERROR[\"CLOSED_CONNECTION\"] = 5] = \"CLOSED_CONNECTION\";\n ERROR[ERROR[\"INVALID_METHOD\"] = 6] = \"INVALID_METHOD\";\n ERROR[ERROR[\"INVALID_URL\"] = 7] = \"INVALID_URL\";\n ERROR[ERROR[\"INVALID_CONSTANT\"] = 8] = \"INVALID_CONSTANT\";\n ERROR[ERROR[\"INVALID_VERSION\"] = 9] = \"INVALID_VERSION\";\n ERROR[ERROR[\"INVALID_HEADER_TOKEN\"] = 10] = \"INVALID_HEADER_TOKEN\";\n ERROR[ERROR[\"INVALID_CONTENT_LENGTH\"] = 11] = \"INVALID_CONTENT_LENGTH\";\n ERROR[ERROR[\"INVALID_CHUNK_SIZE\"] = 12] = \"INVALID_CHUNK_SIZE\";\n ERROR[ERROR[\"INVALID_STATUS\"] = 13] = \"INVALID_STATUS\";\n ERROR[ERROR[\"INVALID_EOF_STATE\"] = 14] = \"INVALID_EOF_STATE\";\n ERROR[ERROR[\"INVALID_TRANSFER_ENCODING\"] = 15] = \"INVALID_TRANSFER_ENCODING\";\n ERROR[ERROR[\"CB_MESSAGE_BEGIN\"] = 16] = \"CB_MESSAGE_BEGIN\";\n ERROR[ERROR[\"CB_HEADERS_COMPLETE\"] = 17] = \"CB_HEADERS_COMPLETE\";\n ERROR[ERROR[\"CB_MESSAGE_COMPLETE\"] = 18] = \"CB_MESSAGE_COMPLETE\";\n ERROR[ERROR[\"CB_CHUNK_HEADER\"] = 19] = \"CB_CHUNK_HEADER\";\n ERROR[ERROR[\"CB_CHUNK_COMPLETE\"] = 20] = \"CB_CHUNK_COMPLETE\";\n ERROR[ERROR[\"PAUSED\"] = 21] = \"PAUSED\";\n ERROR[ERROR[\"PAUSED_UPGRADE\"] = 22] = \"PAUSED_UPGRADE\";\n ERROR[ERROR[\"PAUSED_H2_UPGRADE\"] = 23] = \"PAUSED_H2_UPGRADE\";\n ERROR[ERROR[\"USER\"] = 24] = \"USER\";\n})(ERROR = exports.ERROR || (exports.ERROR = {}));\nvar TYPE;\n(function (TYPE) {\n TYPE[TYPE[\"BOTH\"] = 0] = \"BOTH\";\n TYPE[TYPE[\"REQUEST\"] = 1] = \"REQUEST\";\n TYPE[TYPE[\"RESPONSE\"] = 2] = \"RESPONSE\";\n})(TYPE = exports.TYPE || (exports.TYPE = {}));\nvar FLAGS;\n(function (FLAGS) {\n FLAGS[FLAGS[\"CONNECTION_KEEP_ALIVE\"] = 1] = \"CONNECTION_KEEP_ALIVE\";\n FLAGS[FLAGS[\"CONNECTION_CLOSE\"] = 2] = \"CONNECTION_CLOSE\";\n FLAGS[FLAGS[\"CONNECTION_UPGRADE\"] = 4] = \"CONNECTION_UPGRADE\";\n FLAGS[FLAGS[\"CHUNKED\"] = 8] = \"CHUNKED\";\n FLAGS[FLAGS[\"UPGRADE\"] = 16] = \"UPGRADE\";\n FLAGS[FLAGS[\"CONTENT_LENGTH\"] = 32] = \"CONTENT_LENGTH\";\n FLAGS[FLAGS[\"SKIPBODY\"] = 64] = \"SKIPBODY\";\n FLAGS[FLAGS[\"TRAILING\"] = 128] = \"TRAILING\";\n // 1 << 8 is unused\n FLAGS[FLAGS[\"TRANSFER_ENCODING\"] = 512] = \"TRANSFER_ENCODING\";\n})(FLAGS = exports.FLAGS || (exports.FLAGS = {}));\nvar LENIENT_FLAGS;\n(function (LENIENT_FLAGS) {\n LENIENT_FLAGS[LENIENT_FLAGS[\"HEADERS\"] = 1] = \"HEADERS\";\n LENIENT_FLAGS[LENIENT_FLAGS[\"CHUNKED_LENGTH\"] = 2] = \"CHUNKED_LENGTH\";\n LENIENT_FLAGS[LENIENT_FLAGS[\"KEEP_ALIVE\"] = 4] = \"KEEP_ALIVE\";\n})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {}));\nvar METHODS;\n(function (METHODS) {\n METHODS[METHODS[\"DELETE\"] = 0] = \"DELETE\";\n METHODS[METHODS[\"GET\"] = 1] = \"GET\";\n METHODS[METHODS[\"HEAD\"] = 2] = \"HEAD\";\n METHODS[METHODS[\"POST\"] = 3] = \"POST\";\n METHODS[METHODS[\"PUT\"] = 4] = \"PUT\";\n /* pathological */\n METHODS[METHODS[\"CONNECT\"] = 5] = \"CONNECT\";\n METHODS[METHODS[\"OPTIONS\"] = 6] = \"OPTIONS\";\n METHODS[METHODS[\"TRACE\"] = 7] = \"TRACE\";\n /* WebDAV */\n METHODS[METHODS[\"COPY\"] = 8] = \"COPY\";\n METHODS[METHODS[\"LOCK\"] = 9] = \"LOCK\";\n METHODS[METHODS[\"MKCOL\"] = 10] = \"MKCOL\";\n METHODS[METHODS[\"MOVE\"] = 11] = \"MOVE\";\n METHODS[METHODS[\"PROPFIND\"] = 12] = \"PROPFIND\";\n METHODS[METHODS[\"PROPPATCH\"] = 13] = \"PROPPATCH\";\n METHODS[METHODS[\"SEARCH\"] = 14] = \"SEARCH\";\n METHODS[METHODS[\"UNLOCK\"] = 15] = \"UNLOCK\";\n METHODS[METHODS[\"BIND\"] = 16] = \"BIND\";\n METHODS[METHODS[\"REBIND\"] = 17] = \"REBIND\";\n METHODS[METHODS[\"UNBIND\"] = 18] = \"UNBIND\";\n METHODS[METHODS[\"ACL\"] = 19] = \"ACL\";\n /* subversion */\n METHODS[METHODS[\"REPORT\"] = 20] = \"REPORT\";\n METHODS[METHODS[\"MKACTIVITY\"] = 21] = \"MKACTIVITY\";\n METHODS[METHODS[\"CHECKOUT\"] = 22] = \"CHECKOUT\";\n METHODS[METHODS[\"MERGE\"] = 23] = \"MERGE\";\n /* upnp */\n METHODS[METHODS[\"M-SEARCH\"] = 24] = \"M-SEARCH\";\n METHODS[METHODS[\"NOTIFY\"] = 25] = \"NOTIFY\";\n METHODS[METHODS[\"SUBSCRIBE\"] = 26] = \"SUBSCRIBE\";\n METHODS[METHODS[\"UNSUBSCRIBE\"] = 27] = \"UNSUBSCRIBE\";\n /* RFC-5789 */\n METHODS[METHODS[\"PATCH\"] = 28] = \"PATCH\";\n METHODS[METHODS[\"PURGE\"] = 29] = \"PURGE\";\n /* CalDAV */\n METHODS[METHODS[\"MKCALENDAR\"] = 30] = \"MKCALENDAR\";\n /* RFC-2068, section 19.6.1.2 */\n METHODS[METHODS[\"LINK\"] = 31] = \"LINK\";\n METHODS[METHODS[\"UNLINK\"] = 32] = \"UNLINK\";\n /* icecast */\n METHODS[METHODS[\"SOURCE\"] = 33] = \"SOURCE\";\n /* RFC-7540, section 11.6 */\n METHODS[METHODS[\"PRI\"] = 34] = \"PRI\";\n /* RFC-2326 RTSP */\n METHODS[METHODS[\"DESCRIBE\"] = 35] = \"DESCRIBE\";\n METHODS[METHODS[\"ANNOUNCE\"] = 36] = \"ANNOUNCE\";\n METHODS[METHODS[\"SETUP\"] = 37] = \"SETUP\";\n METHODS[METHODS[\"PLAY\"] = 38] = \"PLAY\";\n METHODS[METHODS[\"PAUSE\"] = 39] = \"PAUSE\";\n METHODS[METHODS[\"TEARDOWN\"] = 40] = \"TEARDOWN\";\n METHODS[METHODS[\"GET_PARAMETER\"] = 41] = \"GET_PARAMETER\";\n METHODS[METHODS[\"SET_PARAMETER\"] = 42] = \"SET_PARAMETER\";\n METHODS[METHODS[\"REDIRECT\"] = 43] = \"REDIRECT\";\n METHODS[METHODS[\"RECORD\"] = 44] = \"RECORD\";\n /* RAOP */\n METHODS[METHODS[\"FLUSH\"] = 45] = \"FLUSH\";\n})(METHODS = exports.METHODS || (exports.METHODS = {}));\nexports.METHODS_HTTP = [\n METHODS.DELETE,\n METHODS.GET,\n METHODS.HEAD,\n METHODS.POST,\n METHODS.PUT,\n METHODS.CONNECT,\n METHODS.OPTIONS,\n METHODS.TRACE,\n METHODS.COPY,\n METHODS.LOCK,\n METHODS.MKCOL,\n METHODS.MOVE,\n METHODS.PROPFIND,\n METHODS.PROPPATCH,\n METHODS.SEARCH,\n METHODS.UNLOCK,\n METHODS.BIND,\n METHODS.REBIND,\n METHODS.UNBIND,\n METHODS.ACL,\n METHODS.REPORT,\n METHODS.MKACTIVITY,\n METHODS.CHECKOUT,\n METHODS.MERGE,\n METHODS['M-SEARCH'],\n METHODS.NOTIFY,\n METHODS.SUBSCRIBE,\n METHODS.UNSUBSCRIBE,\n METHODS.PATCH,\n METHODS.PURGE,\n METHODS.MKCALENDAR,\n METHODS.LINK,\n METHODS.UNLINK,\n METHODS.PRI,\n // TODO(indutny): should we allow it with HTTP?\n METHODS.SOURCE,\n];\nexports.METHODS_ICE = [\n METHODS.SOURCE,\n];\nexports.METHODS_RTSP = [\n METHODS.OPTIONS,\n METHODS.DESCRIBE,\n METHODS.ANNOUNCE,\n METHODS.SETUP,\n METHODS.PLAY,\n METHODS.PAUSE,\n METHODS.TEARDOWN,\n METHODS.GET_PARAMETER,\n METHODS.SET_PARAMETER,\n METHODS.REDIRECT,\n METHODS.RECORD,\n METHODS.FLUSH,\n // For AirPlay\n METHODS.GET,\n METHODS.POST,\n];\nexports.METHOD_MAP = utils_1.enumToMap(METHODS);\nexports.H_METHOD_MAP = {};\nObject.keys(exports.METHOD_MAP).forEach((key) => {\n if (/^H/.test(key)) {\n exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key];\n }\n});\nvar FINISH;\n(function (FINISH) {\n FINISH[FINISH[\"SAFE\"] = 0] = \"SAFE\";\n FINISH[FINISH[\"SAFE_WITH_CB\"] = 1] = \"SAFE_WITH_CB\";\n FINISH[FINISH[\"UNSAFE\"] = 2] = \"UNSAFE\";\n})(FINISH = exports.FINISH || (exports.FINISH = {}));\nexports.ALPHA = [];\nfor (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) {\n // Upper case\n exports.ALPHA.push(String.fromCharCode(i));\n // Lower case\n exports.ALPHA.push(String.fromCharCode(i + 0x20));\n}\nexports.NUM_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n};\nexports.HEX_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF,\n a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf,\n};\nexports.NUM = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n];\nexports.ALPHANUM = exports.ALPHA.concat(exports.NUM);\nexports.MARK = ['-', '_', '.', '!', '~', '*', '\\'', '(', ')'];\nexports.USERINFO_CHARS = exports.ALPHANUM\n .concat(exports.MARK)\n .concat(['%', ';', ':', '&', '=', '+', '$', ',']);\n// TODO(indutny): use RFC\nexports.STRICT_URL_CHAR = [\n '!', '\"', '$', '%', '&', '\\'',\n '(', ')', '*', '+', ',', '-', '.', '/',\n ':', ';', '<', '=', '>',\n '@', '[', '\\\\', ']', '^', '_',\n '`',\n '{', '|', '}', '~',\n].concat(exports.ALPHANUM);\nexports.URL_CHAR = exports.STRICT_URL_CHAR\n .concat(['\\t', '\\f']);\n// All characters with 0x80 bit set to 1\nfor (let i = 0x80; i <= 0xff; i++) {\n exports.URL_CHAR.push(i);\n}\nexports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);\n/* Tokens as defined by rfc 2616. Also lowercases them.\n * token = 1*\n * separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n * | \",\" | \";\" | \":\" | \"\\\" | <\">\n * | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n * | \"{\" | \"}\" | SP | HT\n */\nexports.STRICT_TOKEN = [\n '!', '#', '$', '%', '&', '\\'',\n '*', '+', '-', '.',\n '^', '_', '`',\n '|', '~',\n].concat(exports.ALPHANUM);\nexports.TOKEN = exports.STRICT_TOKEN.concat([' ']);\n/*\n * Verify that a char is a valid visible (printable) US-ASCII\n * character or %x80-FF\n */\nexports.HEADER_CHARS = ['\\t'];\nfor (let i = 32; i <= 255; i++) {\n if (i !== 127) {\n exports.HEADER_CHARS.push(i);\n }\n}\n// ',' = \\x44\nexports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44);\nexports.MAJOR = exports.NUM_MAP;\nexports.MINOR = exports.MAJOR;\nvar HEADER_STATE;\n(function (HEADER_STATE) {\n HEADER_STATE[HEADER_STATE[\"GENERAL\"] = 0] = \"GENERAL\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION\"] = 1] = \"CONNECTION\";\n HEADER_STATE[HEADER_STATE[\"CONTENT_LENGTH\"] = 2] = \"CONTENT_LENGTH\";\n HEADER_STATE[HEADER_STATE[\"TRANSFER_ENCODING\"] = 3] = \"TRANSFER_ENCODING\";\n HEADER_STATE[HEADER_STATE[\"UPGRADE\"] = 4] = \"UPGRADE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_KEEP_ALIVE\"] = 5] = \"CONNECTION_KEEP_ALIVE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_CLOSE\"] = 6] = \"CONNECTION_CLOSE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_UPGRADE\"] = 7] = \"CONNECTION_UPGRADE\";\n HEADER_STATE[HEADER_STATE[\"TRANSFER_ENCODING_CHUNKED\"] = 8] = \"TRANSFER_ENCODING_CHUNKED\";\n})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {}));\nexports.SPECIAL_HEADERS = {\n 'connection': HEADER_STATE.CONNECTION,\n 'content-length': HEADER_STATE.CONTENT_LENGTH,\n 'proxy-connection': HEADER_STATE.CONNECTION,\n 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING,\n 'upgrade': HEADER_STATE.UPGRADE,\n};\n//# sourceMappingURL=constants.js.map","module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJs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ADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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FCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAU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YWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8='\n","module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJs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IAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEB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QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQID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YWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=='\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enumToMap = void 0;\nfunction enumToMap(obj) {\n const res = {};\n Object.keys(obj).forEach((key) => {\n const value = obj[key];\n if (typeof value === 'number') {\n res[key] = value;\n }\n });\n return res;\n}\nexports.enumToMap = enumToMap;\n//# sourceMappingURL=utils.js.map","'use strict'\n\nconst { kClients } = require('../core/symbols')\nconst Agent = require('../agent')\nconst {\n kAgent,\n kMockAgentSet,\n kMockAgentGet,\n kDispatches,\n kIsMockActive,\n kNetConnect,\n kGetNetConnect,\n kOptions,\n kFactory\n} = require('./mock-symbols')\nconst MockClient = require('./mock-client')\nconst MockPool = require('./mock-pool')\nconst { matchValue, buildMockOptions } = require('./mock-utils')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst Dispatcher = require('../dispatcher')\nconst Pluralizer = require('./pluralizer')\nconst PendingInterceptorsFormatter = require('./pending-interceptors-formatter')\n\nclass FakeWeakRef {\n constructor (value) {\n this.value = value\n }\n\n deref () {\n return this.value\n }\n}\n\nclass MockAgent extends Dispatcher {\n constructor (opts) {\n super(opts)\n\n this[kNetConnect] = true\n this[kIsMockActive] = true\n\n // Instantiate Agent and encapsulate\n if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n const agent = opts && opts.agent ? opts.agent : new Agent(opts)\n this[kAgent] = agent\n\n this[kClients] = agent[kClients]\n this[kOptions] = buildMockOptions(opts)\n }\n\n get (origin) {\n let dispatcher = this[kMockAgentGet](origin)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n }\n return dispatcher\n }\n\n dispatch (opts, handler) {\n // Call MockAgent.get to perform additional setup before dispatching as normal\n this.get(opts.origin)\n return this[kAgent].dispatch(opts, handler)\n }\n\n async close () {\n await this[kAgent].close()\n this[kClients].clear()\n }\n\n deactivate () {\n this[kIsMockActive] = false\n }\n\n activate () {\n this[kIsMockActive] = true\n }\n\n enableNetConnect (matcher) {\n if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {\n if (Array.isArray(this[kNetConnect])) {\n this[kNetConnect].push(matcher)\n } else {\n this[kNetConnect] = [matcher]\n }\n } else if (typeof matcher === 'undefined') {\n this[kNetConnect] = true\n } else {\n throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')\n }\n }\n\n disableNetConnect () {\n this[kNetConnect] = false\n }\n\n // This is required to bypass issues caused by using global symbols - see:\n // https://github.com/nodejs/undici/issues/1447\n get isMockActive () {\n return this[kIsMockActive]\n }\n\n [kMockAgentSet] (origin, dispatcher) {\n this[kClients].set(origin, new FakeWeakRef(dispatcher))\n }\n\n [kFactory] (origin) {\n const mockOptions = Object.assign({ agent: this }, this[kOptions])\n return this[kOptions] && this[kOptions].connections === 1\n ? new MockClient(origin, mockOptions)\n : new MockPool(origin, mockOptions)\n }\n\n [kMockAgentGet] (origin) {\n // First check if we can immediately find it\n const ref = this[kClients].get(origin)\n if (ref) {\n return ref.deref()\n }\n\n // If the origin is not a string create a dummy parent pool and return to user\n if (typeof origin !== 'string') {\n const dispatcher = this[kFactory]('http://localhost:9999')\n this[kMockAgentSet](origin, dispatcher)\n return dispatcher\n }\n\n // If we match, create a pool and assign the same dispatches\n for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) {\n const nonExplicitDispatcher = nonExplicitRef.deref()\n if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {\n const dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]\n return dispatcher\n }\n }\n }\n\n [kGetNetConnect] () {\n return this[kNetConnect]\n }\n\n pendingInterceptors () {\n const mockAgentClients = this[kClients]\n\n return Array.from(mockAgentClients.entries())\n .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin })))\n .filter(({ pending }) => pending)\n }\n\n assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {\n const pending = this.pendingInterceptors()\n\n if (pending.length === 0) {\n return\n }\n\n const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length)\n\n throw new UndiciError(`\n${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending:\n\n${pendingInterceptorsFormatter.format(pending)}\n`.trim())\n }\n}\n\nmodule.exports = MockAgent\n","'use strict'\n\nconst { promisify } = require('util')\nconst Client = require('../client')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockClient provides an API that extends the Client to influence the mockDispatches.\n */\nclass MockClient extends Client {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockClient\n","'use strict'\n\nconst { UndiciError } = require('../core/errors')\n\nclass MockNotMatchedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, MockNotMatchedError)\n this.name = 'MockNotMatchedError'\n this.message = message || 'The request does not match any registered mock dispatches'\n this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'\n }\n}\n\nmodule.exports = {\n MockNotMatchedError\n}\n","'use strict'\n\nconst { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kDispatchKey,\n kDefaultHeaders,\n kDefaultTrailers,\n kContentLength,\n kMockDispatch\n} = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { buildURL } = require('../core/util')\n\n/**\n * Defines the scope API for an interceptor reply\n */\nclass MockScope {\n constructor (mockDispatch) {\n this[kMockDispatch] = mockDispatch\n }\n\n /**\n * Delay a reply by a set amount in ms.\n */\n delay (waitInMs) {\n if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {\n throw new InvalidArgumentError('waitInMs must be a valid integer > 0')\n }\n\n this[kMockDispatch].delay = waitInMs\n return this\n }\n\n /**\n * For a defined reply, never mark as consumed.\n */\n persist () {\n this[kMockDispatch].persist = true\n return this\n }\n\n /**\n * Allow one to define a reply for a set amount of matching requests.\n */\n times (repeatTimes) {\n if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {\n throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')\n }\n\n this[kMockDispatch].times = repeatTimes\n return this\n }\n}\n\n/**\n * Defines an interceptor for a Mock\n */\nclass MockInterceptor {\n constructor (opts, mockDispatches) {\n if (typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object')\n }\n if (typeof opts.path === 'undefined') {\n throw new InvalidArgumentError('opts.path must be defined')\n }\n if (typeof opts.method === 'undefined') {\n opts.method = 'GET'\n }\n // See https://github.com/nodejs/undici/issues/1245\n // As per RFC 3986, clients are not supposed to send URI\n // fragments to servers when they retrieve a document,\n if (typeof opts.path === 'string') {\n if (opts.query) {\n opts.path = buildURL(opts.path, opts.query)\n } else {\n // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811\n const parsedURL = new URL(opts.path, 'data://')\n opts.path = parsedURL.pathname + parsedURL.search\n }\n }\n if (typeof opts.method === 'string') {\n opts.method = opts.method.toUpperCase()\n }\n\n this[kDispatchKey] = buildKey(opts)\n this[kDispatches] = mockDispatches\n this[kDefaultHeaders] = {}\n this[kDefaultTrailers] = {}\n this[kContentLength] = false\n }\n\n createMockScopeDispatchData (statusCode, data, responseOptions = {}) {\n const responseData = getResponseData(data)\n const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}\n const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }\n const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }\n\n return { statusCode, data, headers, trailers }\n }\n\n validateReplyParameters (statusCode, data, responseOptions) {\n if (typeof statusCode === 'undefined') {\n throw new InvalidArgumentError('statusCode must be defined')\n }\n if (typeof data === 'undefined') {\n throw new InvalidArgumentError('data must be defined')\n }\n if (typeof responseOptions !== 'object') {\n throw new InvalidArgumentError('responseOptions must be an object')\n }\n }\n\n /**\n * Mock an undici request with a defined reply.\n */\n reply (replyData) {\n // Values of reply aren't available right now as they\n // can only be available when the reply callback is invoked.\n if (typeof replyData === 'function') {\n // We'll first wrap the provided callback in another function,\n // this function will properly resolve the data from the callback\n // when invoked.\n const wrappedDefaultsCallback = (opts) => {\n // Our reply options callback contains the parameter for statusCode, data and options.\n const resolvedData = replyData(opts)\n\n // Check if it is in the right format\n if (typeof resolvedData !== 'object') {\n throw new InvalidArgumentError('reply options callback must return an object')\n }\n\n const { statusCode, data = '', responseOptions = {} } = resolvedData\n this.validateReplyParameters(statusCode, data, responseOptions)\n // Since the values can be obtained immediately we return them\n // from this higher order function that will be resolved later.\n return {\n ...this.createMockScopeDispatchData(statusCode, data, responseOptions)\n }\n }\n\n // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)\n return new MockScope(newMockDispatch)\n }\n\n // We can have either one or three parameters, if we get here,\n // we should have 1-3 parameters. So we spread the arguments of\n // this function to obtain the parameters, since replyData will always\n // just be the statusCode.\n const [statusCode, data = '', responseOptions = {}] = [...arguments]\n this.validateReplyParameters(statusCode, data, responseOptions)\n\n // Send in-already provided data like usual\n const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions)\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Mock an undici request with a defined error.\n */\n replyWithError (error) {\n if (typeof error === 'undefined') {\n throw new InvalidArgumentError('error must be defined')\n }\n\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Set default reply headers on the interceptor for subsequent replies\n */\n defaultReplyHeaders (headers) {\n if (typeof headers === 'undefined') {\n throw new InvalidArgumentError('headers must be defined')\n }\n\n this[kDefaultHeaders] = headers\n return this\n }\n\n /**\n * Set default reply trailers on the interceptor for subsequent replies\n */\n defaultReplyTrailers (trailers) {\n if (typeof trailers === 'undefined') {\n throw new InvalidArgumentError('trailers must be defined')\n }\n\n this[kDefaultTrailers] = trailers\n return this\n }\n\n /**\n * Set reply content length header for replies on the interceptor\n */\n replyContentLength () {\n this[kContentLength] = true\n return this\n }\n}\n\nmodule.exports.MockInterceptor = MockInterceptor\nmodule.exports.MockScope = MockScope\n","'use strict'\n\nconst { promisify } = require('util')\nconst Pool = require('../pool')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockPool provides an API that extends the Pool to influence the mockDispatches.\n */\nclass MockPool extends Pool {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockPool\n","'use strict'\n\nmodule.exports = {\n kAgent: Symbol('agent'),\n kOptions: Symbol('options'),\n kFactory: Symbol('factory'),\n kDispatches: Symbol('dispatches'),\n kDispatchKey: Symbol('dispatch key'),\n kDefaultHeaders: Symbol('default headers'),\n kDefaultTrailers: Symbol('default trailers'),\n kContentLength: Symbol('content length'),\n kMockAgent: Symbol('mock agent'),\n kMockAgentSet: Symbol('mock agent set'),\n kMockAgentGet: Symbol('mock agent get'),\n kMockDispatch: Symbol('mock dispatch'),\n kClose: Symbol('close'),\n kOriginalClose: Symbol('original agent close'),\n kOrigin: Symbol('origin'),\n kIsMockActive: Symbol('is mock active'),\n kNetConnect: Symbol('net connect'),\n kGetNetConnect: Symbol('get net connect'),\n kConnected: Symbol('connected')\n}\n","'use strict'\n\nconst { MockNotMatchedError } = require('./mock-errors')\nconst {\n kDispatches,\n kMockAgent,\n kOriginalDispatch,\n kOrigin,\n kGetNetConnect\n} = require('./mock-symbols')\nconst { buildURL, nop } = require('../core/util')\nconst { STATUS_CODES } = require('http')\nconst {\n types: {\n isPromise\n }\n} = require('util')\n\nfunction matchValue (match, value) {\n if (typeof match === 'string') {\n return match === value\n }\n if (match instanceof RegExp) {\n return match.test(value)\n }\n if (typeof match === 'function') {\n return match(value) === true\n }\n return false\n}\n\nfunction lowerCaseEntries (headers) {\n return Object.fromEntries(\n Object.entries(headers).map(([headerName, headerValue]) => {\n return [headerName.toLocaleLowerCase(), headerValue]\n })\n )\n}\n\n/**\n * @param {import('../../index').Headers|string[]|Record} headers\n * @param {string} key\n */\nfunction getHeaderByName (headers, key) {\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {\n return headers[i + 1]\n }\n }\n\n return undefined\n } else if (typeof headers.get === 'function') {\n return headers.get(key)\n } else {\n return lowerCaseEntries(headers)[key.toLocaleLowerCase()]\n }\n}\n\n/** @param {string[]} headers */\nfunction buildHeadersFromArray (headers) { // fetch HeadersList\n const clone = headers.slice()\n const entries = []\n for (let index = 0; index < clone.length; index += 2) {\n entries.push([clone[index], clone[index + 1]])\n }\n return Object.fromEntries(entries)\n}\n\nfunction matchHeaders (mockDispatch, headers) {\n if (typeof mockDispatch.headers === 'function') {\n if (Array.isArray(headers)) { // fetch HeadersList\n headers = buildHeadersFromArray(headers)\n }\n return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})\n }\n if (typeof mockDispatch.headers === 'undefined') {\n return true\n }\n if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {\n return false\n }\n\n for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {\n const headerValue = getHeaderByName(headers, matchHeaderName)\n\n if (!matchValue(matchHeaderValue, headerValue)) {\n return false\n }\n }\n return true\n}\n\nfunction safeUrl (path) {\n if (typeof path !== 'string') {\n return path\n }\n\n const pathSegments = path.split('?')\n\n if (pathSegments.length !== 2) {\n return path\n }\n\n const qp = new URLSearchParams(pathSegments.pop())\n qp.sort()\n return [...pathSegments, qp.toString()].join('?')\n}\n\nfunction matchKey (mockDispatch, { path, method, body, headers }) {\n const pathMatch = matchValue(mockDispatch.path, path)\n const methodMatch = matchValue(mockDispatch.method, method)\n const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true\n const headersMatch = matchHeaders(mockDispatch, headers)\n return pathMatch && methodMatch && bodyMatch && headersMatch\n}\n\nfunction getResponseData (data) {\n if (Buffer.isBuffer(data)) {\n return data\n } else if (typeof data === 'object') {\n return JSON.stringify(data)\n } else {\n return data.toString()\n }\n}\n\nfunction getMockDispatch (mockDispatches, key) {\n const basePath = key.query ? buildURL(key.path, key.query) : key.path\n const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath\n\n // Match path\n let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)\n }\n\n // Match method\n matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`)\n }\n\n // Match body\n matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`)\n }\n\n // Match headers\n matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`)\n }\n\n return matchedMockDispatches[0]\n}\n\nfunction addMockDispatch (mockDispatches, key, data) {\n const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }\n const replyData = typeof data === 'function' ? { callback: data } : { ...data }\n const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }\n mockDispatches.push(newMockDispatch)\n return newMockDispatch\n}\n\nfunction deleteMockDispatch (mockDispatches, key) {\n const index = mockDispatches.findIndex(dispatch => {\n if (!dispatch.consumed) {\n return false\n }\n return matchKey(dispatch, key)\n })\n if (index !== -1) {\n mockDispatches.splice(index, 1)\n }\n}\n\nfunction buildKey (opts) {\n const { path, method, body, headers, query } = opts\n return {\n path,\n method,\n body,\n headers,\n query\n }\n}\n\nfunction generateKeyValues (data) {\n return Object.entries(data).reduce((keyValuePairs, [key, value]) => [\n ...keyValuePairs,\n Buffer.from(`${key}`),\n Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`)\n ], [])\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n * @param {number} statusCode\n */\nfunction getStatusText (statusCode) {\n return STATUS_CODES[statusCode] || 'unknown'\n}\n\nasync function getResponse (body) {\n const buffers = []\n for await (const data of body) {\n buffers.push(data)\n }\n return Buffer.concat(buffers).toString('utf8')\n}\n\n/**\n * Mock dispatch function used to simulate undici dispatches\n */\nfunction mockDispatch (opts, handler) {\n // Get mock dispatch from built key\n const key = buildKey(opts)\n const mockDispatch = getMockDispatch(this[kDispatches], key)\n\n mockDispatch.timesInvoked++\n\n // Here's where we resolve a callback if a callback is present for the dispatch data.\n if (mockDispatch.data.callback) {\n mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) }\n }\n\n // Parse mockDispatch data\n const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch\n const { timesInvoked, times } = mockDispatch\n\n // If it's used up and not persistent, mark as consumed\n mockDispatch.consumed = !persist && timesInvoked >= times\n mockDispatch.pending = timesInvoked < times\n\n // If specified, trigger dispatch error\n if (error !== null) {\n deleteMockDispatch(this[kDispatches], key)\n handler.onError(error)\n return true\n }\n\n // Handle the request with a delay if necessary\n if (typeof delay === 'number' && delay > 0) {\n setTimeout(() => {\n handleReply(this[kDispatches])\n }, delay)\n } else {\n handleReply(this[kDispatches])\n }\n\n function handleReply (mockDispatches, _data = data) {\n // fetch's HeadersList is a 1D string array\n const optsHeaders = Array.isArray(opts.headers)\n ? buildHeadersFromArray(opts.headers)\n : opts.headers\n const body = typeof _data === 'function'\n ? _data({ ...opts, headers: optsHeaders })\n : _data\n\n // util.types.isPromise is likely needed for jest.\n if (isPromise(body)) {\n // If handleReply is asynchronous, throwing an error\n // in the callback will reject the promise, rather than\n // synchronously throw the error, which breaks some tests.\n // Rather, we wait for the callback to resolve if it is a\n // promise, and then re-run handleReply with the new body.\n body.then((newData) => handleReply(mockDispatches, newData))\n return\n }\n\n const responseData = getResponseData(body)\n const responseHeaders = generateKeyValues(headers)\n const responseTrailers = generateKeyValues(trailers)\n\n handler.abort = nop\n handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode))\n handler.onData(Buffer.from(responseData))\n handler.onComplete(responseTrailers)\n deleteMockDispatch(mockDispatches, key)\n }\n\n function resume () {}\n\n return true\n}\n\nfunction buildMockDispatch () {\n const agent = this[kMockAgent]\n const origin = this[kOrigin]\n const originalDispatch = this[kOriginalDispatch]\n\n return function dispatch (opts, handler) {\n if (agent.isMockActive) {\n try {\n mockDispatch.call(this, opts, handler)\n } catch (error) {\n if (error instanceof MockNotMatchedError) {\n const netConnect = agent[kGetNetConnect]()\n if (netConnect === false) {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)\n }\n if (checkNetConnect(netConnect, origin)) {\n originalDispatch.call(this, opts, handler)\n } else {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`)\n }\n } else {\n throw error\n }\n }\n } else {\n originalDispatch.call(this, opts, handler)\n }\n }\n}\n\nfunction checkNetConnect (netConnect, origin) {\n const url = new URL(origin)\n if (netConnect === true) {\n return true\n } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {\n return true\n }\n return false\n}\n\nfunction buildMockOptions (opts) {\n if (opts) {\n const { agent, ...mockOptions } = opts\n return mockOptions\n }\n}\n\nmodule.exports = {\n getResponseData,\n getMockDispatch,\n addMockDispatch,\n deleteMockDispatch,\n buildKey,\n generateKeyValues,\n matchValue,\n getResponse,\n getStatusText,\n mockDispatch,\n buildMockDispatch,\n checkNetConnect,\n buildMockOptions,\n getHeaderByName\n}\n","'use strict'\n\nconst { Transform } = require('stream')\nconst { Console } = require('console')\n\n/**\n * Gets the output of `console.table(…)` as a string.\n */\nmodule.exports = class PendingInterceptorsFormatter {\n constructor ({ disableColors } = {}) {\n this.transform = new Transform({\n transform (chunk, _enc, cb) {\n cb(null, chunk)\n }\n })\n\n this.logger = new Console({\n stdout: this.transform,\n inspectOptions: {\n colors: !disableColors && !process.env.CI\n }\n })\n }\n\n format (pendingInterceptors) {\n const withPrettyHeaders = pendingInterceptors.map(\n ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({\n Method: method,\n Origin: origin,\n Path: path,\n 'Status code': statusCode,\n Persistent: persist ? '✅' : '❌',\n Invocations: timesInvoked,\n Remaining: persist ? Infinity : times - timesInvoked\n }))\n\n this.logger.table(withPrettyHeaders)\n return this.transform.read().toString()\n }\n}\n","'use strict'\n\nconst singulars = {\n pronoun: 'it',\n is: 'is',\n was: 'was',\n this: 'this'\n}\n\nconst plurals = {\n pronoun: 'they',\n is: 'are',\n was: 'were',\n this: 'these'\n}\n\nmodule.exports = class Pluralizer {\n constructor (singular, plural) {\n this.singular = singular\n this.plural = plural\n }\n\n pluralize (count) {\n const one = count === 1\n const keys = one ? singulars : plurals\n const noun = one ? this.singular : this.plural\n return { ...keys, count, noun }\n }\n}\n","/* eslint-disable */\n\n'use strict'\n\n// Extracted from node/lib/internal/fixed_queue.js\n\n// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.\nconst kSize = 2048;\nconst kMask = kSize - 1;\n\n// The FixedQueue is implemented as a singly-linked list of fixed-size\n// circular buffers. It looks something like this:\n//\n// head tail\n// | |\n// v v\n// +-----------+ <-----\\ +-----------+ <------\\ +-----------+\n// | [null] | \\----- | next | \\------- | next |\n// +-----------+ +-----------+ +-----------+\n// | item | <-- bottom | item | <-- bottom | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | bottom --> | item |\n// | item | | item | | item |\n// | ... | | ... | | ... |\n// | item | | item | | item |\n// | item | | item | | item |\n// | [empty] | <-- top | item | | item |\n// | [empty] | | item | | item |\n// | [empty] | | [empty] | <-- top top --> | [empty] |\n// +-----------+ +-----------+ +-----------+\n//\n// Or, if there is only one circular buffer, it looks something\n// like either of these:\n//\n// head tail head tail\n// | | | |\n// v v v v\n// +-----------+ +-----------+\n// | [null] | | [null] |\n// +-----------+ +-----------+\n// | [empty] | | item |\n// | [empty] | | item |\n// | item | <-- bottom top --> | [empty] |\n// | item | | [empty] |\n// | [empty] | <-- top bottom --> | item |\n// | [empty] | | item |\n// +-----------+ +-----------+\n//\n// Adding a value means moving `top` forward by one, removing means\n// moving `bottom` forward by one. After reaching the end, the queue\n// wraps around.\n//\n// When `top === bottom` the current queue is empty and when\n// `top + 1 === bottom` it's full. This wastes a single space of storage\n// but allows much quicker checks.\n\nclass FixedCircularBuffer {\n constructor() {\n this.bottom = 0;\n this.top = 0;\n this.list = new Array(kSize);\n this.next = null;\n }\n\n isEmpty() {\n return this.top === this.bottom;\n }\n\n isFull() {\n return ((this.top + 1) & kMask) === this.bottom;\n }\n\n push(data) {\n this.list[this.top] = data;\n this.top = (this.top + 1) & kMask;\n }\n\n shift() {\n const nextItem = this.list[this.bottom];\n if (nextItem === undefined)\n return null;\n this.list[this.bottom] = undefined;\n this.bottom = (this.bottom + 1) & kMask;\n return nextItem;\n }\n}\n\nmodule.exports = class FixedQueue {\n constructor() {\n this.head = this.tail = new FixedCircularBuffer();\n }\n\n isEmpty() {\n return this.head.isEmpty();\n }\n\n push(data) {\n if (this.head.isFull()) {\n // Head is full: Creates a new queue, sets the old queue's `.next` to it,\n // and sets it as the new main queue.\n this.head = this.head.next = new FixedCircularBuffer();\n }\n this.head.push(data);\n }\n\n shift() {\n const tail = this.tail;\n const next = tail.shift();\n if (tail.isEmpty() && tail.next !== null) {\n // If there is another queue, it forms the new tail.\n this.tail = tail.next;\n }\n return next;\n }\n};\n","'use strict'\n\nconst DispatcherBase = require('./dispatcher-base')\nconst FixedQueue = require('./node/fixed-queue')\nconst { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('./core/symbols')\nconst PoolStats = require('./pool-stats')\n\nconst kClients = Symbol('clients')\nconst kNeedDrain = Symbol('needDrain')\nconst kQueue = Symbol('queue')\nconst kClosedResolve = Symbol('closed resolve')\nconst kOnDrain = Symbol('onDrain')\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kGetDispatcher = Symbol('get dispatcher')\nconst kAddClient = Symbol('add client')\nconst kRemoveClient = Symbol('remove client')\nconst kStats = Symbol('stats')\n\nclass PoolBase extends DispatcherBase {\n constructor () {\n super()\n\n this[kQueue] = new FixedQueue()\n this[kClients] = []\n this[kQueued] = 0\n\n const pool = this\n\n this[kOnDrain] = function onDrain (origin, targets) {\n const queue = pool[kQueue]\n\n let needDrain = false\n\n while (!needDrain) {\n const item = queue.shift()\n if (!item) {\n break\n }\n pool[kQueued]--\n needDrain = !this.dispatch(item.opts, item.handler)\n }\n\n this[kNeedDrain] = needDrain\n\n if (!this[kNeedDrain] && pool[kNeedDrain]) {\n pool[kNeedDrain] = false\n pool.emit('drain', origin, [pool, ...targets])\n }\n\n if (pool[kClosedResolve] && queue.isEmpty()) {\n Promise\n .all(pool[kClients].map(c => c.close()))\n .then(pool[kClosedResolve])\n }\n }\n\n this[kOnConnect] = (origin, targets) => {\n pool.emit('connect', origin, [pool, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n pool.emit('disconnect', origin, [pool, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n pool.emit('connectionError', origin, [pool, ...targets], err)\n }\n\n this[kStats] = new PoolStats(this)\n }\n\n get [kBusy] () {\n return this[kNeedDrain]\n }\n\n get [kConnected] () {\n return this[kClients].filter(client => client[kConnected]).length\n }\n\n get [kFree] () {\n return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length\n }\n\n get [kPending] () {\n let ret = this[kQueued]\n for (const { [kPending]: pending } of this[kClients]) {\n ret += pending\n }\n return ret\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { [kRunning]: running } of this[kClients]) {\n ret += running\n }\n return ret\n }\n\n get [kSize] () {\n let ret = this[kQueued]\n for (const { [kSize]: size } of this[kClients]) {\n ret += size\n }\n return ret\n }\n\n get stats () {\n return this[kStats]\n }\n\n async [kClose] () {\n if (this[kQueue].isEmpty()) {\n return Promise.all(this[kClients].map(c => c.close()))\n } else {\n return new Promise((resolve) => {\n this[kClosedResolve] = resolve\n })\n }\n }\n\n async [kDestroy] (err) {\n while (true) {\n const item = this[kQueue].shift()\n if (!item) {\n break\n }\n item.handler.onError(err)\n }\n\n return Promise.all(this[kClients].map(c => c.destroy(err)))\n }\n\n [kDispatch] (opts, handler) {\n const dispatcher = this[kGetDispatcher]()\n\n if (!dispatcher) {\n this[kNeedDrain] = true\n this[kQueue].push({ opts, handler })\n this[kQueued]++\n } else if (!dispatcher.dispatch(opts, handler)) {\n dispatcher[kNeedDrain] = true\n this[kNeedDrain] = !this[kGetDispatcher]()\n }\n\n return !this[kNeedDrain]\n }\n\n [kAddClient] (client) {\n client\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].push(client)\n\n if (this[kNeedDrain]) {\n process.nextTick(() => {\n if (this[kNeedDrain]) {\n this[kOnDrain](client[kUrl], [this, client])\n }\n })\n }\n\n return this\n }\n\n [kRemoveClient] (client) {\n client.close(() => {\n const idx = this[kClients].indexOf(client)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n })\n\n this[kNeedDrain] = this[kClients].some(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n }\n}\n\nmodule.exports = {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n}\n","const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('./core/symbols')\nconst kPool = Symbol('pool')\n\nclass PoolStats {\n constructor (pool) {\n this[kPool] = pool\n }\n\n get connected () {\n return this[kPool][kConnected]\n }\n\n get free () {\n return this[kPool][kFree]\n }\n\n get pending () {\n return this[kPool][kPending]\n }\n\n get queued () {\n return this[kPool][kQueued]\n }\n\n get running () {\n return this[kPool][kRunning]\n }\n\n get size () {\n return this[kPool][kSize]\n }\n}\n\nmodule.exports = PoolStats\n","'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('./core/errors')\nconst util = require('./core/util')\nconst { kUrl, kInterceptors } = require('./core/symbols')\nconst buildConnector = require('./core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass Pool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n ...options\n } = {}) {\n super()\n\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool)\n ? options.interceptors.Pool\n : []\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2 }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n }\n\n [kGetDispatcher] () {\n let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain])\n\n if (dispatcher) {\n return dispatcher\n }\n\n if (!this[kConnections] || this[kClients].length < this[kConnections]) {\n dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n }\n\n return dispatcher\n }\n}\n\nmodule.exports = Pool\n","'use strict'\n\nconst { kProxy, kClose, kDestroy, kInterceptors } = require('./core/symbols')\nconst { URL } = require('url')\nconst Agent = require('./agent')\nconst Pool = require('./pool')\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError, RequestAbortedError } = require('./core/errors')\nconst buildConnector = require('./core/connect')\n\nconst kAgent = Symbol('proxy agent')\nconst kClient = Symbol('proxy client')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kRequestTls = Symbol('request tls settings')\nconst kProxyTls = Symbol('proxy tls settings')\nconst kConnectEndpoint = Symbol('connect endpoint function')\n\nfunction defaultProtocolPort (protocol) {\n return protocol === 'https:' ? 443 : 80\n}\n\nfunction buildProxyOptions (opts) {\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n return {\n uri: opts.uri,\n protocol: opts.protocol || 'https'\n }\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass ProxyAgent extends DispatcherBase {\n constructor (opts) {\n super(opts)\n this[kProxy] = buildProxyOptions(opts)\n this[kAgent] = new Agent(opts)\n this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent)\n ? opts.interceptors.ProxyAgent\n : []\n\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n const { clientFactory = defaultFactory } = opts\n\n if (typeof clientFactory !== 'function') {\n throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')\n }\n\n this[kRequestTls] = opts.requestTls\n this[kProxyTls] = opts.proxyTls\n this[kProxyHeaders] = opts.headers || {}\n\n const resolvedUrl = new URL(opts.uri)\n const { origin, port, host, username, password } = resolvedUrl\n\n if (opts.auth && opts.token) {\n throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')\n } else if (opts.auth) {\n /* @deprecated in favour of opts.token */\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`\n } else if (opts.token) {\n this[kProxyHeaders]['proxy-authorization'] = opts.token\n } else if (username && password) {\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`\n }\n\n const connect = buildConnector({ ...opts.proxyTls })\n this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })\n this[kClient] = clientFactory(resolvedUrl, { connect })\n this[kAgent] = new Agent({\n ...opts,\n connect: async (opts, callback) => {\n let requestedHost = opts.host\n if (!opts.port) {\n requestedHost += `:${defaultProtocolPort(opts.protocol)}`\n }\n try {\n const { socket, statusCode } = await this[kClient].connect({\n origin,\n port,\n path: requestedHost,\n signal: opts.signal,\n headers: {\n ...this[kProxyHeaders],\n host\n }\n })\n if (statusCode !== 200) {\n socket.on('error', () => {}).destroy()\n callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`))\n }\n if (opts.protocol !== 'https:') {\n callback(null, socket)\n return\n }\n let servername\n if (this[kRequestTls]) {\n servername = this[kRequestTls].servername\n } else {\n servername = opts.servername\n }\n this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)\n } catch (err) {\n callback(err)\n }\n }\n })\n }\n\n dispatch (opts, handler) {\n const { host } = new URL(opts.origin)\n const headers = buildHeaders(opts.headers)\n throwIfProxyAuthIsSent(headers)\n return this[kAgent].dispatch(\n {\n ...opts,\n headers: {\n ...headers,\n host\n }\n },\n handler\n )\n }\n\n async [kClose] () {\n await this[kAgent].close()\n await this[kClient].close()\n }\n\n async [kDestroy] () {\n await this[kAgent].destroy()\n await this[kClient].destroy()\n }\n}\n\n/**\n * @param {string[] | Record} headers\n * @returns {Record}\n */\nfunction buildHeaders (headers) {\n // When using undici.fetch, the headers list is stored\n // as an array.\n if (Array.isArray(headers)) {\n /** @type {Record} */\n const headersPair = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n headersPair[headers[i]] = headers[i + 1]\n }\n\n return headersPair\n }\n\n return headers\n}\n\n/**\n * @param {Record} headers\n *\n * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers\n * Nevertheless, it was changed and to avoid a security vulnerability by end users\n * this check was created.\n * It should be removed in the next major version for performance reasons\n */\nfunction throwIfProxyAuthIsSent (headers) {\n const existProxyAuth = headers && Object.keys(headers)\n .find((key) => key.toLowerCase() === 'proxy-authorization')\n if (existProxyAuth) {\n throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')\n }\n}\n\nmodule.exports = ProxyAgent\n","'use strict'\n\nlet fastNow = Date.now()\nlet fastNowTimeout\n\nconst fastTimers = []\n\nfunction onTimeout () {\n fastNow = Date.now()\n\n let len = fastTimers.length\n let idx = 0\n while (idx < len) {\n const timer = fastTimers[idx]\n\n if (timer.state === 0) {\n timer.state = fastNow + timer.delay\n } else if (timer.state > 0 && fastNow >= timer.state) {\n timer.state = -1\n timer.callback(timer.opaque)\n }\n\n if (timer.state === -1) {\n timer.state = -2\n if (idx !== len - 1) {\n fastTimers[idx] = fastTimers.pop()\n } else {\n fastTimers.pop()\n }\n len -= 1\n } else {\n idx += 1\n }\n }\n\n if (fastTimers.length > 0) {\n refreshTimeout()\n }\n}\n\nfunction refreshTimeout () {\n if (fastNowTimeout && fastNowTimeout.refresh) {\n fastNowTimeout.refresh()\n } else {\n clearTimeout(fastNowTimeout)\n fastNowTimeout = setTimeout(onTimeout, 1e3)\n if (fastNowTimeout.unref) {\n fastNowTimeout.unref()\n }\n }\n}\n\nclass Timeout {\n constructor (callback, delay, opaque) {\n this.callback = callback\n this.delay = delay\n this.opaque = opaque\n\n // -2 not in timer list\n // -1 in timer list but inactive\n // 0 in timer list waiting for time\n // > 0 in timer list waiting for time to expire\n this.state = -2\n\n this.refresh()\n }\n\n refresh () {\n if (this.state === -2) {\n fastTimers.push(this)\n if (!fastNowTimeout || fastTimers.length === 1) {\n refreshTimeout()\n }\n }\n\n this.state = 0\n }\n\n clear () {\n this.state = -1\n }\n}\n\nmodule.exports = {\n setTimeout (callback, delay, opaque) {\n return delay < 1e3\n ? setTimeout(callback, delay, opaque)\n : new Timeout(callback, delay, opaque)\n },\n clearTimeout (timeout) {\n if (timeout instanceof Timeout) {\n timeout.clear()\n } else {\n clearTimeout(timeout)\n }\n }\n}\n","'use strict'\n\nconst diagnosticsChannel = require('diagnostics_channel')\nconst { uid, states } = require('./constants')\nconst {\n kReadyState,\n kSentClose,\n kByteParser,\n kReceivedClose\n} = require('./symbols')\nconst { fireEvent, failWebsocketConnection } = require('./util')\nconst { CloseEvent } = require('./events')\nconst { makeRequest } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { Headers } = require('../fetch/headers')\nconst { getGlobalDispatcher } = require('../global')\nconst { kHeadersList } = require('../core/symbols')\n\nconst channels = {}\nchannels.open = diagnosticsChannel.channel('undici:websocket:open')\nchannels.close = diagnosticsChannel.channel('undici:websocket:close')\nchannels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error')\n\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#concept-websocket-establish\n * @param {URL} url\n * @param {string|string[]} protocols\n * @param {import('./websocket').WebSocket} ws\n * @param {(response: any) => void} onEstablish\n * @param {Partial} options\n */\nfunction establishWebSocketConnection (url, protocols, ws, onEstablish, options) {\n // 1. Let requestURL be a copy of url, with its scheme set to \"http\", if url’s\n // scheme is \"ws\", and to \"https\" otherwise.\n const requestURL = url\n\n requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'\n\n // 2. Let request be a new request, whose URL is requestURL, client is client,\n // service-workers mode is \"none\", referrer is \"no-referrer\", mode is\n // \"websocket\", credentials mode is \"include\", cache mode is \"no-store\" ,\n // and redirect mode is \"error\".\n const request = makeRequest({\n urlList: [requestURL],\n serviceWorkers: 'none',\n referrer: 'no-referrer',\n mode: 'websocket',\n credentials: 'include',\n cache: 'no-store',\n redirect: 'error'\n })\n\n // Note: undici extension, allow setting custom headers.\n if (options.headers) {\n const headersList = new Headers(options.headers)[kHeadersList]\n\n request.headersList = headersList\n }\n\n // 3. Append (`Upgrade`, `websocket`) to request’s header list.\n // 4. Append (`Connection`, `Upgrade`) to request’s header list.\n // Note: both of these are handled by undici currently.\n // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397\n\n // 5. Let keyValue be a nonce consisting of a randomly selected\n // 16-byte value that has been forgiving-base64-encoded and\n // isomorphic encoded.\n const keyValue = crypto.randomBytes(16).toString('base64')\n\n // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s\n // header list.\n request.headersList.append('sec-websocket-key', keyValue)\n\n // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s\n // header list.\n request.headersList.append('sec-websocket-version', '13')\n\n // 8. For each protocol in protocols, combine\n // (`Sec-WebSocket-Protocol`, protocol) in request’s header\n // list.\n for (const protocol of protocols) {\n request.headersList.append('sec-websocket-protocol', protocol)\n }\n\n // 9. Let permessageDeflate be a user-agent defined\n // \"permessage-deflate\" extension header value.\n // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673\n // TODO: enable once permessage-deflate is supported\n const permessageDeflate = '' // 'permessage-deflate; 15'\n\n // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to\n // request’s header list.\n // request.headersList.append('sec-websocket-extensions', permessageDeflate)\n\n // 11. Fetch request with useParallelQueue set to true, and\n // processResponse given response being these steps:\n const controller = fetching({\n request,\n useParallelQueue: true,\n dispatcher: options.dispatcher ?? getGlobalDispatcher(),\n processResponse (response) {\n // 1. If response is a network error or its status is not 101,\n // fail the WebSocket connection.\n if (response.type === 'error' || response.status !== 101) {\n failWebsocketConnection(ws, 'Received network error or non-101 status code.')\n return\n }\n\n // 2. If protocols is not the empty list and extracting header\n // list values given `Sec-WebSocket-Protocol` and response’s\n // header list results in null, failure, or the empty byte\n // sequence, then fail the WebSocket connection.\n if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(ws, 'Server did not respond with sent protocols.')\n return\n }\n\n // 3. Follow the requirements stated step 2 to step 6, inclusive,\n // of the last set of steps in section 4.1 of The WebSocket\n // Protocol to validate response. This either results in fail\n // the WebSocket connection or the WebSocket connection is\n // established.\n\n // 2. If the response lacks an |Upgrade| header field or the |Upgrade|\n // header field contains a value that is not an ASCII case-\n // insensitive match for the value \"websocket\", the client MUST\n // _Fail the WebSocket Connection_.\n if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {\n failWebsocketConnection(ws, 'Server did not set Upgrade header to \"websocket\".')\n return\n }\n\n // 3. If the response lacks a |Connection| header field or the\n // |Connection| header field doesn't contain a token that is an\n // ASCII case-insensitive match for the value \"Upgrade\", the client\n // MUST _Fail the WebSocket Connection_.\n if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {\n failWebsocketConnection(ws, 'Server did not set Connection header to \"upgrade\".')\n return\n }\n\n // 4. If the response lacks a |Sec-WebSocket-Accept| header field or\n // the |Sec-WebSocket-Accept| contains a value other than the\n // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-\n // Key| (as a string, not base64-decoded) with the string \"258EAFA5-\n // E914-47DA-95CA-C5AB0DC85B11\" but ignoring any leading and\n // trailing whitespace, the client MUST _Fail the WebSocket\n // Connection_.\n const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')\n const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64')\n if (secWSAccept !== digest) {\n failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.')\n return\n }\n\n // 5. If the response includes a |Sec-WebSocket-Extensions| header\n // field and this header field indicates the use of an extension\n // that was not present in the client's handshake (the server has\n // indicated an extension not requested by the client), the client\n // MUST _Fail the WebSocket Connection_. (The parsing of this\n // header field to determine which extensions are requested is\n // discussed in Section 9.1.)\n const secExtension = response.headersList.get('Sec-WebSocket-Extensions')\n\n if (secExtension !== null && secExtension !== permessageDeflate) {\n failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.')\n return\n }\n\n // 6. If the response includes a |Sec-WebSocket-Protocol| header field\n // and this header field indicates the use of a subprotocol that was\n // not present in the client's handshake (the server has indicated a\n // subprotocol not requested by the client), the client MUST _Fail\n // the WebSocket Connection_.\n const secProtocol = response.headersList.get('Sec-WebSocket-Protocol')\n\n if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.')\n return\n }\n\n response.socket.on('data', onSocketData)\n response.socket.on('close', onSocketClose)\n response.socket.on('error', onSocketError)\n\n if (channels.open.hasSubscribers) {\n channels.open.publish({\n address: response.socket.address(),\n protocol: secProtocol,\n extensions: secExtension\n })\n }\n\n onEstablish(response)\n }\n })\n\n return controller\n}\n\n/**\n * @param {Buffer} chunk\n */\nfunction onSocketData (chunk) {\n if (!this.ws[kByteParser].write(chunk)) {\n this.pause()\n }\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4\n */\nfunction onSocketClose () {\n const { ws } = this\n\n // If the TCP connection was closed after the\n // WebSocket closing handshake was completed, the WebSocket connection\n // is said to have been closed _cleanly_.\n const wasClean = ws[kSentClose] && ws[kReceivedClose]\n\n let code = 1005\n let reason = ''\n\n const result = ws[kByteParser].closingInfo\n\n if (result) {\n code = result.code ?? 1005\n reason = result.reason\n } else if (!ws[kSentClose]) {\n // If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n code = 1006\n }\n\n // 1. Change the ready state to CLOSED (3).\n ws[kReadyState] = states.CLOSED\n\n // 2. If the user agent was required to fail the WebSocket\n // connection, or if the WebSocket connection was closed\n // after being flagged as full, fire an event named error\n // at the WebSocket object.\n // TODO\n\n // 3. Fire an event named close at the WebSocket object,\n // using CloseEvent, with the wasClean attribute\n // initialized to true if the connection closed cleanly\n // and false otherwise, the code attribute initialized to\n // the WebSocket connection close code, and the reason\n // attribute initialized to the result of applying UTF-8\n // decode without BOM to the WebSocket connection close\n // reason.\n fireEvent('close', ws, CloseEvent, {\n wasClean, code, reason\n })\n\n if (channels.close.hasSubscribers) {\n channels.close.publish({\n websocket: ws,\n code,\n reason\n })\n }\n}\n\nfunction onSocketError (error) {\n const { ws } = this\n\n ws[kReadyState] = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(error)\n }\n\n this.destroy()\n}\n\nmodule.exports = {\n establishWebSocketConnection\n}\n","'use strict'\n\n// This is a Globally Unique Identifier unique used\n// to validate that the endpoint accepts websocket\n// connections.\n// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3\nconst uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\nconst states = {\n CONNECTING: 0,\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3\n}\n\nconst opcodes = {\n CONTINUATION: 0x0,\n TEXT: 0x1,\n BINARY: 0x2,\n CLOSE: 0x8,\n PING: 0x9,\n PONG: 0xA\n}\n\nconst maxUnsigned16Bit = 2 ** 16 - 1 // 65535\n\nconst parserStates = {\n INFO: 0,\n PAYLOADLENGTH_16: 2,\n PAYLOADLENGTH_64: 3,\n READ_DATA: 4\n}\n\nconst emptyBuffer = Buffer.allocUnsafe(0)\n\nmodule.exports = {\n uid,\n staticPropertyDescriptors,\n states,\n opcodes,\n maxUnsigned16Bit,\n parserStates,\n emptyBuffer\n}\n","'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\nconst { MessagePort } = require('worker_threads')\n\n/**\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent\n */\nclass MessageEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' })\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.MessageEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n }\n\n get data () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.data\n }\n\n get origin () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.origin\n }\n\n get lastEventId () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.lastEventId\n }\n\n get source () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.source\n }\n\n get ports () {\n webidl.brandCheck(this, MessageEvent)\n\n if (!Object.isFrozen(this.#eventInit.ports)) {\n Object.freeze(this.#eventInit.ports)\n }\n\n return this.#eventInit.ports\n }\n\n initMessageEvent (\n type,\n bubbles = false,\n cancelable = false,\n data = null,\n origin = '',\n lastEventId = '',\n source = null,\n ports = []\n ) {\n webidl.brandCheck(this, MessageEvent)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' })\n\n return new MessageEvent(type, {\n bubbles, cancelable, data, origin, lastEventId, source, ports\n })\n }\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#the-closeevent-interface\n */\nclass CloseEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' })\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.CloseEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n }\n\n get wasClean () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.wasClean\n }\n\n get code () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.code\n }\n\n get reason () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.reason\n }\n}\n\n// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface\nclass ErrorEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' })\n\n super(type, eventInitDict)\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})\n\n this.#eventInit = eventInitDict\n }\n\n get message () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.message\n }\n\n get filename () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.filename\n }\n\n get lineno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.lineno\n }\n\n get colno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.colno\n }\n\n get error () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.error\n }\n}\n\nObject.defineProperties(MessageEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'MessageEvent',\n configurable: true\n },\n data: kEnumerableProperty,\n origin: kEnumerableProperty,\n lastEventId: kEnumerableProperty,\n source: kEnumerableProperty,\n ports: kEnumerableProperty,\n initMessageEvent: kEnumerableProperty\n})\n\nObject.defineProperties(CloseEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'CloseEvent',\n configurable: true\n },\n reason: kEnumerableProperty,\n code: kEnumerableProperty,\n wasClean: kEnumerableProperty\n})\n\nObject.defineProperties(ErrorEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'ErrorEvent',\n configurable: true\n },\n message: kEnumerableProperty,\n filename: kEnumerableProperty,\n lineno: kEnumerableProperty,\n colno: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\nwebidl.converters.MessagePort = webidl.interfaceConverter(MessagePort)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.MessagePort\n)\n\nconst eventInit = [\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n]\n\nwebidl.converters.MessageEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'data',\n converter: webidl.converters.any,\n defaultValue: null\n },\n {\n key: 'origin',\n converter: webidl.converters.USVString,\n defaultValue: ''\n },\n {\n key: 'lastEventId',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'source',\n // Node doesn't implement WindowProxy or ServiceWorker, so the only\n // valid value for source is a MessagePort.\n converter: webidl.nullableConverter(webidl.converters.MessagePort),\n defaultValue: null\n },\n {\n key: 'ports',\n converter: webidl.converters['sequence'],\n get defaultValue () {\n return []\n }\n }\n])\n\nwebidl.converters.CloseEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'wasClean',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'code',\n converter: webidl.converters['unsigned short'],\n defaultValue: 0\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: ''\n }\n])\n\nwebidl.converters.ErrorEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'message',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'filename',\n converter: webidl.converters.USVString,\n defaultValue: ''\n },\n {\n key: 'lineno',\n converter: webidl.converters['unsigned long'],\n defaultValue: 0\n },\n {\n key: 'colno',\n converter: webidl.converters['unsigned long'],\n defaultValue: 0\n },\n {\n key: 'error',\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = {\n MessageEvent,\n CloseEvent,\n ErrorEvent\n}\n","'use strict'\n\nconst { maxUnsigned16Bit } = require('./constants')\n\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\nclass WebsocketFrameSend {\n /**\n * @param {Buffer|undefined} data\n */\n constructor (data) {\n this.frameData = data\n this.maskKey = crypto.randomBytes(4)\n }\n\n createFrame (opcode) {\n const bodyLength = this.frameData?.byteLength ?? 0\n\n /** @type {number} */\n let payloadLength = bodyLength // 0-125\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n\n const buffer = Buffer.allocUnsafe(bodyLength + offset)\n\n // Clear first 2 bytes, everything else is overwritten\n buffer[0] = buffer[1] = 0\n buffer[0] |= 0x80 // FIN\n buffer[0] = (buffer[0] & 0xF0) + opcode // opcode\n\n /*! ws. MIT License. Einar Otto Stangvik */\n buffer[offset - 4] = this.maskKey[0]\n buffer[offset - 3] = this.maskKey[1]\n buffer[offset - 2] = this.maskKey[2]\n buffer[offset - 1] = this.maskKey[3]\n\n buffer[1] = payloadLength\n\n if (payloadLength === 126) {\n buffer.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n // Clear extended payload length\n buffer[2] = buffer[3] = 0\n buffer.writeUIntBE(bodyLength, 4, 6)\n }\n\n buffer[1] |= 0x80 // MASK\n\n // mask body\n for (let i = 0; i < bodyLength; i++) {\n buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]\n }\n\n return buffer\n }\n}\n\nmodule.exports = {\n WebsocketFrameSend\n}\n","'use strict'\n\nconst { Writable } = require('stream')\nconst diagnosticsChannel = require('diagnostics_channel')\nconst { parserStates, opcodes, states, emptyBuffer } = require('./constants')\nconst { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols')\nconst { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = require('./util')\nconst { WebsocketFrameSend } = require('./frame')\n\n// This code was influenced by ws released under the MIT license.\n// Copyright (c) 2011 Einar Otto Stangvik \n// Copyright (c) 2013 Arnout Kazemier and contributors\n// Copyright (c) 2016 Luigi Pinca and contributors\n\nconst channels = {}\nchannels.ping = diagnosticsChannel.channel('undici:websocket:ping')\nchannels.pong = diagnosticsChannel.channel('undici:websocket:pong')\n\nclass ByteParser extends Writable {\n #buffers = []\n #byteOffset = 0\n\n #state = parserStates.INFO\n\n #info = {}\n #fragments = []\n\n constructor (ws) {\n super()\n\n this.ws = ws\n }\n\n /**\n * @param {Buffer} chunk\n * @param {() => void} callback\n */\n _write (chunk, _, callback) {\n this.#buffers.push(chunk)\n this.#byteOffset += chunk.length\n\n this.run(callback)\n }\n\n /**\n * Runs whenever a new chunk is received.\n * Callback is called whenever there are no more chunks buffering,\n * or not enough bytes are buffered to parse.\n */\n run (callback) {\n while (true) {\n if (this.#state === parserStates.INFO) {\n // If there aren't enough bytes to parse the payload length, etc.\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.fin = (buffer[0] & 0x80) !== 0\n this.#info.opcode = buffer[0] & 0x0F\n\n // If we receive a fragmented message, we use the type of the first\n // frame to parse the full message as binary/text, when it's terminated\n this.#info.originalOpcode ??= this.#info.opcode\n\n this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION\n\n if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) {\n // Only text and binary frames can be fragmented\n failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.')\n return\n }\n\n const payloadLength = buffer[1] & 0x7F\n\n if (payloadLength <= 125) {\n this.#info.payloadLength = payloadLength\n this.#state = parserStates.READ_DATA\n } else if (payloadLength === 126) {\n this.#state = parserStates.PAYLOADLENGTH_16\n } else if (payloadLength === 127) {\n this.#state = parserStates.PAYLOADLENGTH_64\n }\n\n if (this.#info.fragmented && payloadLength > 125) {\n // A fragmented frame can't be fragmented itself\n failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.')\n return\n } else if (\n (this.#info.opcode === opcodes.PING ||\n this.#info.opcode === opcodes.PONG ||\n this.#info.opcode === opcodes.CLOSE) &&\n payloadLength > 125\n ) {\n // Control frames can have a payload length of 125 bytes MAX\n failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.')\n return\n } else if (this.#info.opcode === opcodes.CLOSE) {\n if (payloadLength === 1) {\n failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.')\n return\n }\n\n const body = this.consume(payloadLength)\n\n this.#info.closeInfo = this.parseCloseBody(false, body)\n\n if (!this.ws[kSentClose]) {\n // If an endpoint receives a Close frame and did not previously send a\n // Close frame, the endpoint MUST send a Close frame in response. (When\n // sending a Close frame in response, the endpoint typically echos the\n // status code it received.)\n const body = Buffer.allocUnsafe(2)\n body.writeUInt16BE(this.#info.closeInfo.code, 0)\n const closeFrame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(\n closeFrame.createFrame(opcodes.CLOSE),\n (err) => {\n if (!err) {\n this.ws[kSentClose] = true\n }\n }\n )\n }\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this.ws[kReadyState] = states.CLOSING\n this.ws[kReceivedClose] = true\n\n this.end()\n\n return\n } else if (this.#info.opcode === opcodes.PING) {\n // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in\n // response, unless it already received a Close frame.\n // A Pong frame sent in response to a Ping frame must have identical\n // \"Application data\"\n\n const body = this.consume(payloadLength)\n\n if (!this.ws[kReceivedClose]) {\n const frame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG))\n\n if (channels.ping.hasSubscribers) {\n channels.ping.publish({\n payload: body\n })\n }\n }\n\n this.#state = parserStates.INFO\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n return\n }\n } else if (this.#info.opcode === opcodes.PONG) {\n // A Pong frame MAY be sent unsolicited. This serves as a\n // unidirectional heartbeat. A response to an unsolicited Pong frame is\n // not expected.\n\n const body = this.consume(payloadLength)\n\n if (channels.pong.hasSubscribers) {\n channels.pong.publish({\n payload: body\n })\n }\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n return\n }\n }\n } else if (this.#state === parserStates.PAYLOADLENGTH_16) {\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.payloadLength = buffer.readUInt16BE(0)\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.PAYLOADLENGTH_64) {\n if (this.#byteOffset < 8) {\n return callback()\n }\n\n const buffer = this.consume(8)\n const upper = buffer.readUInt32BE(0)\n\n // 2^31 is the maxinimum bytes an arraybuffer can contain\n // on 32-bit systems. Although, on 64-bit systems, this is\n // 2^53-1 bytes.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e\n if (upper > 2 ** 31 - 1) {\n failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.')\n return\n }\n\n const lower = buffer.readUInt32BE(4)\n\n this.#info.payloadLength = (upper << 8) + lower\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.READ_DATA) {\n if (this.#byteOffset < this.#info.payloadLength) {\n // If there is still more data in this chunk that needs to be read\n return callback()\n } else if (this.#byteOffset >= this.#info.payloadLength) {\n // If the server sent multiple frames in a single chunk\n\n const body = this.consume(this.#info.payloadLength)\n\n this.#fragments.push(body)\n\n // If the frame is unfragmented, or a fragmented frame was terminated,\n // a message was received\n if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) {\n const fullMessage = Buffer.concat(this.#fragments)\n\n websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage)\n\n this.#info = {}\n this.#fragments.length = 0\n }\n\n this.#state = parserStates.INFO\n }\n }\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n break\n }\n }\n }\n\n /**\n * Take n bytes from the buffered Buffers\n * @param {number} n\n * @returns {Buffer|null}\n */\n consume (n) {\n if (n > this.#byteOffset) {\n return null\n } else if (n === 0) {\n return emptyBuffer\n }\n\n if (this.#buffers[0].length === n) {\n this.#byteOffset -= this.#buffers[0].length\n return this.#buffers.shift()\n }\n\n const buffer = Buffer.allocUnsafe(n)\n let offset = 0\n\n while (offset !== n) {\n const next = this.#buffers[0]\n const { length } = next\n\n if (length + offset === n) {\n buffer.set(this.#buffers.shift(), offset)\n break\n } else if (length + offset > n) {\n buffer.set(next.subarray(0, n - offset), offset)\n this.#buffers[0] = next.subarray(n - offset)\n break\n } else {\n buffer.set(this.#buffers.shift(), offset)\n offset += next.length\n }\n }\n\n this.#byteOffset -= n\n\n return buffer\n }\n\n parseCloseBody (onlyCode, data) {\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n /** @type {number|undefined} */\n let code\n\n if (data.length >= 2) {\n // _The WebSocket Connection Close Code_ is\n // defined as the status code (Section 7.4) contained in the first Close\n // control frame received by the application\n code = data.readUInt16BE(0)\n }\n\n if (onlyCode) {\n if (!isValidStatusCode(code)) {\n return null\n }\n\n return { code }\n }\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6\n /** @type {Buffer} */\n let reason = data.subarray(2)\n\n // Remove BOM\n if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) {\n reason = reason.subarray(3)\n }\n\n if (code !== undefined && !isValidStatusCode(code)) {\n return null\n }\n\n try {\n // TODO: optimize this\n reason = new TextDecoder('utf-8', { fatal: true }).decode(reason)\n } catch {\n return null\n }\n\n return { code, reason }\n }\n\n get closingInfo () {\n return this.#info.closeInfo\n }\n}\n\nmodule.exports = {\n ByteParser\n}\n","'use strict'\n\nmodule.exports = {\n kWebSocketURL: Symbol('url'),\n kReadyState: Symbol('ready state'),\n kController: Symbol('controller'),\n kResponse: Symbol('response'),\n kBinaryType: Symbol('binary type'),\n kSentClose: Symbol('sent close'),\n kReceivedClose: Symbol('received close'),\n kByteParser: Symbol('byte parser')\n}\n","'use strict'\n\nconst { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols')\nconst { states, opcodes } = require('./constants')\nconst { MessageEvent, ErrorEvent } = require('./events')\n\n/* globals Blob */\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isEstablished (ws) {\n // If the server's response is validated as provided for above, it is\n // said that _The WebSocket Connection is Established_ and that the\n // WebSocket Connection is in the OPEN state.\n return ws[kReadyState] === states.OPEN\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isClosing (ws) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n return ws[kReadyState] === states.CLOSING\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isClosed (ws) {\n return ws[kReadyState] === states.CLOSED\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e\n * @param {EventTarget} target\n * @param {EventInit | undefined} eventInitDict\n */\nfunction fireEvent (e, target, eventConstructor = Event, eventInitDict) {\n // 1. If eventConstructor is not given, then let eventConstructor be Event.\n\n // 2. Let event be the result of creating an event given eventConstructor,\n // in the relevant realm of target.\n // 3. Initialize event’s type attribute to e.\n const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap\n\n // 4. Initialize any other IDL attributes of event as described in the\n // invocation of this algorithm.\n\n // 5. Return the result of dispatching event at target, with legacy target\n // override flag set if set.\n target.dispatchEvent(event)\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @param {import('./websocket').WebSocket} ws\n * @param {number} type Opcode\n * @param {Buffer} data application data\n */\nfunction websocketMessageReceived (ws, type, data) {\n // 1. If ready state is not OPEN (1), then return.\n if (ws[kReadyState] !== states.OPEN) {\n return\n }\n\n // 2. Let dataForEvent be determined by switching on type and binary type:\n let dataForEvent\n\n if (type === opcodes.TEXT) {\n // -> type indicates that the data is Text\n // a new DOMString containing data\n try {\n dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data)\n } catch {\n failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n if (ws[kBinaryType] === 'blob') {\n // -> type indicates that the data is Binary and binary type is \"blob\"\n // a new Blob object, created in the relevant Realm of the WebSocket\n // object, that represents data as its raw data\n dataForEvent = new Blob([data])\n } else {\n // -> type indicates that the data is Binary and binary type is \"arraybuffer\"\n // a new ArrayBuffer object, created in the relevant Realm of the\n // WebSocket object, whose contents are data\n dataForEvent = new Uint8Array(data).buffer\n }\n }\n\n // 3. Fire an event named message at the WebSocket object, using MessageEvent,\n // with the origin attribute initialized to the serialization of the WebSocket\n // object’s url's origin, and the data attribute initialized to dataForEvent.\n fireEvent('message', ws, MessageEvent, {\n origin: ws[kWebSocketURL].origin,\n data: dataForEvent\n })\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455\n * @see https://datatracker.ietf.org/doc/html/rfc2616\n * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407\n * @param {string} protocol\n */\nfunction isValidSubprotocol (protocol) {\n // If present, this value indicates one\n // or more comma-separated subprotocol the client wishes to speak,\n // ordered by preference. The elements that comprise this value\n // MUST be non-empty strings with characters in the range U+0021 to\n // U+007E not including separator characters as defined in\n // [RFC2616] and MUST all be unique strings.\n if (protocol.length === 0) {\n return false\n }\n\n for (const char of protocol) {\n const code = char.charCodeAt(0)\n\n if (\n code < 0x21 ||\n code > 0x7E ||\n char === '(' ||\n char === ')' ||\n char === '<' ||\n char === '>' ||\n char === '@' ||\n char === ',' ||\n char === ';' ||\n char === ':' ||\n char === '\\\\' ||\n char === '\"' ||\n char === '/' ||\n char === '[' ||\n char === ']' ||\n char === '?' ||\n char === '=' ||\n char === '{' ||\n char === '}' ||\n code === 32 || // SP\n code === 9 // HT\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4\n * @param {number} code\n */\nfunction isValidStatusCode (code) {\n if (code >= 1000 && code < 1015) {\n return (\n code !== 1004 && // reserved\n code !== 1005 && // \"MUST NOT be set as a status code\"\n code !== 1006 // \"MUST NOT be set as a status code\"\n )\n }\n\n return code >= 3000 && code <= 4999\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @param {string|undefined} reason\n */\nfunction failWebsocketConnection (ws, reason) {\n const { [kController]: controller, [kResponse]: response } = ws\n\n controller.abort()\n\n if (response?.socket && !response.socket.destroyed) {\n response.socket.destroy()\n }\n\n if (reason) {\n fireEvent('error', ws, ErrorEvent, {\n error: new Error(reason)\n })\n }\n}\n\nmodule.exports = {\n isEstablished,\n isClosing,\n isClosed,\n fireEvent,\n isValidSubprotocol,\n isValidStatusCode,\n failWebsocketConnection,\n websocketMessageReceived\n}\n","'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { DOMException } = require('../fetch/constants')\nconst { URLSerializer } = require('../fetch/dataURL')\nconst { getGlobalOrigin } = require('../fetch/global')\nconst { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require('./constants')\nconst {\n kWebSocketURL,\n kReadyState,\n kController,\n kBinaryType,\n kResponse,\n kSentClose,\n kByteParser\n} = require('./symbols')\nconst { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require('./util')\nconst { establishWebSocketConnection } = require('./connection')\nconst { WebsocketFrameSend } = require('./frame')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty, isBlobLike } = require('../core/util')\nconst { getGlobalDispatcher } = require('../global')\nconst { types } = require('util')\n\nlet experimentalWarned = false\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' })\n\n if (!experimentalWarned) {\n experimentalWarned = true\n process.emitWarning('WebSockets are experimental, expect them to change at any time.', {\n code: 'UNDICI-WS'\n })\n }\n\n const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols)\n\n url = webidl.converters.USVString(url)\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = getGlobalOrigin()\n\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL.\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n // 3. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 4. If urlRecord’s scheme is \"http\", then set urlRecord’s scheme to \"ws\".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n // 5. Otherwise, if urlRecord’s scheme is \"https\", set urlRecord’s scheme to \"wss\".\n urlRecord.protocol = 'wss:'\n }\n\n // 6. If urlRecord’s scheme is not \"ws\" or \"wss\", then throw a \"SyntaxError\" DOMException.\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException(\n `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`,\n 'SyntaxError'\n )\n }\n\n // 7. If urlRecord’s fragment is non-null, then throw a \"SyntaxError\"\n // DOMException.\n if (urlRecord.hash || urlRecord.href.endsWith('#')) {\n throw new DOMException('Got fragment', 'SyntaxError')\n }\n\n // 8. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 9. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 10. Set this's url to urlRecord.\n this[kWebSocketURL] = new URL(urlRecord.href)\n\n // 11. Let client be this's relevant settings object.\n\n // 12. Run this step in parallel:\n\n // 1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this[kController] = establishWebSocketConnection(\n urlRecord,\n protocols,\n this,\n (response) => this.#onConnectionEstablished(response),\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this[kReadyState] = WebSocket.CONNECTING\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this[kBinaryType] = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, { clamp: true })\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason)\n }\n\n // 1. If code is present, but is neither an integer equal to 1000 nor an\n // integer in the range 3000 to 4999, inclusive, throw an\n // \"InvalidAccessError\" DOMException.\n if (code !== undefined) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n let reasonByteLength = 0\n\n // 2. If reason is present, then run these substeps:\n if (reason !== undefined) {\n // 1. Let reasonBytes be the result of encoding reason.\n // 2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n reasonByteLength = Buffer.byteLength(reason)\n\n if (reasonByteLength > 123) {\n throw new DOMException(\n `Reason must be less than 123 bytes; received ${reasonByteLength}`,\n 'SyntaxError'\n )\n }\n }\n\n // 3. Run the first matching steps from the following list:\n if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) {\n // If this's ready state is CLOSING (2) or CLOSED (3)\n // Do nothing.\n } else if (!isEstablished(this)) {\n // If the WebSocket connection is not yet established\n // Fail the WebSocket connection and set this's ready state\n // to CLOSING (2).\n failWebsocketConnection(this, 'Connection was closed before it was established.')\n this[kReadyState] = WebSocket.CLOSING\n } else if (!isClosing(this)) {\n // If the WebSocket closing handshake has not yet been started\n // Start the WebSocket closing handshake and set this's ready\n // state to CLOSING (2).\n // - If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n // - If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n // - If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n\n const frame = new WebsocketFrameSend()\n\n // If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n\n // If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n if (code !== undefined && reason === undefined) {\n frame.frameData = Buffer.allocUnsafe(2)\n frame.frameData.writeUInt16BE(code, 0)\n } else if (code !== undefined && reason !== undefined) {\n // If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength)\n frame.frameData.writeUInt16BE(code, 0)\n // the body MAY contain UTF-8-encoded data with value /reason/\n frame.frameData.write(reason, 2, 'utf-8')\n } else {\n frame.frameData = emptyBuffer\n }\n\n /** @type {import('stream').Duplex} */\n const socket = this[kResponse].socket\n\n socket.write(frame.createFrame(opcodes.CLOSE), (err) => {\n if (!err) {\n this[kSentClose] = true\n }\n })\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this[kReadyState] = states.CLOSING\n } else {\n // Otherwise\n // Set this's ready state to CLOSING (2).\n this[kReadyState] = WebSocket.CLOSING\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' })\n\n data = webidl.converters.WebSocketSendData(data)\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (this[kReadyState] === WebSocket.CONNECTING) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this) || isClosing(this)) {\n return\n }\n\n /** @type {import('stream').Duplex} */\n const socket = this[kResponse].socket\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const value = Buffer.from(data)\n const frame = new WebsocketFrameSend(value)\n const buffer = frame.createFrame(opcodes.TEXT)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n } else if (types.isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n const value = Buffer.from(data)\n const frame = new WebsocketFrameSend(value)\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data’s buffer in bytes.\n\n const ab = Buffer.from(data, data.byteOffset, data.byteLength)\n\n const frame = new WebsocketFrameSend(ab)\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += ab.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= ab.byteLength\n })\n } else if (isBlobLike(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object’s raw data, in bytes.\n\n const frame = new WebsocketFrameSend()\n\n data.arrayBuffer().then((ab) => {\n const value = Buffer.from(ab)\n frame.frameData = value\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n })\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this[kReadyState]\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this[kWebSocketURL])\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n if (typeof fn === 'function') {\n this.#events.open = fn\n this.addEventListener('open', fn)\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n if (typeof fn === 'function') {\n this.#events.error = fn\n this.addEventListener('error', fn)\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n if (typeof fn === 'function') {\n this.#events.close = fn\n this.addEventListener('close', fn)\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n if (typeof fn === 'function') {\n this.#events.message = fn\n this.addEventListener('message', fn)\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this[kBinaryType]\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this[kBinaryType] = 'blob'\n } else {\n this[kBinaryType] = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response) {\n // processResponse is called when the \"response’s header list has been received and initialized.\"\n // once this happens, the connection is open\n this[kResponse] = response\n\n const parser = new ByteParser(this)\n parser.on('drain', function onParserDrain () {\n this.ws[kResponse].socket.resume()\n })\n\n response.socket.ws = this\n this[kByteParser] = parser\n\n // 1. Change the ready state to OPEN (1).\n this[kReadyState] = states.OPEN\n\n // 2. Change the extensions attribute’s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute’s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n }\n}\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) {\n return webidl.converters['sequence'](V)\n }\n\n return webidl.converters.DOMString(V)\n}\n\n// This implements the propsal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence'],\n get defaultValue () {\n return []\n }\n },\n {\n key: 'dispatcher',\n converter: (V) => V,\n get defaultValue () {\n return getGlobalDispatcher()\n }\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) {\n return webidl.converters.BufferSource(V)\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nmodule.exports = {\n WebSocket\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n\n if (typeof process === \"object\" && process.version !== undefined) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n\n return \"\";\n}\n\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","\"use strict\";\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n return Math.floor(x);\n } else {\n return Math.round(x);\n }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n if (!typeOpts.unsigned) {\n --bitLength;\n }\n const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n const upperBound = Math.pow(2, bitLength) - 1;\n\n const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n return function(V, opts) {\n if (!opts) opts = {};\n\n let x = +V;\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite number\");\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n if (x < lowerBound || x > upperBound) {\n throw new TypeError(\"Argument is not in byte range\");\n }\n\n return x;\n }\n\n if (!isNaN(x) && opts.clamp) {\n x = evenRound(x);\n\n if (x < lowerBound) x = lowerBound;\n if (x > upperBound) x = upperBound;\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n x = x % moduloVal;\n\n if (!typeOpts.unsigned && x >= moduloBound) {\n return x - moduloVal;\n } else if (typeOpts.unsigned) {\n if (x < 0) {\n x += moduloVal;\n } else if (x === -0) { // don't return negative zero\n return 0;\n }\n }\n\n return x;\n }\n}\n\nconversions[\"void\"] = function () {\n return undefined;\n};\n\nconversions[\"boolean\"] = function (val) {\n return !!val;\n};\n\nconversions[\"byte\"] = createNumberConversion(8, { unsigned: false });\nconversions[\"octet\"] = createNumberConversion(8, { unsigned: true });\n\nconversions[\"short\"] = createNumberConversion(16, { unsigned: false });\nconversions[\"unsigned short\"] = createNumberConversion(16, { unsigned: true });\n\nconversions[\"long\"] = createNumberConversion(32, { unsigned: false });\nconversions[\"unsigned long\"] = createNumberConversion(32, { unsigned: true });\n\nconversions[\"long long\"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions[\"unsigned long long\"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions[\"double\"] = function (V) {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite floating-point value\");\n }\n\n return x;\n};\n\nconversions[\"unrestricted double\"] = function (V) {\n const x = +V;\n\n if (isNaN(x)) {\n throw new TypeError(\"Argument is NaN\");\n }\n\n return x;\n};\n\n// not quite valid, but good enough for JS\nconversions[\"float\"] = conversions[\"double\"];\nconversions[\"unrestricted float\"] = conversions[\"unrestricted double\"];\n\nconversions[\"DOMString\"] = function (V, opts) {\n if (!opts) opts = {};\n\n if (opts.treatNullAsEmptyString && V === null) {\n return \"\";\n }\n\n return String(V);\n};\n\nconversions[\"ByteString\"] = function (V, opts) {\n const x = String(V);\n let c = undefined;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError(\"Argument is not a valid bytestring\");\n }\n }\n\n return x;\n};\n\nconversions[\"USVString\"] = function (V) {\n const S = String(V);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n }\n\n return U.join('');\n};\n\nconversions[\"Date\"] = function (V, opts) {\n if (!(V instanceof Date)) {\n throw new TypeError(\"Argument is not a Date object\");\n }\n if (isNaN(V)) {\n return undefined;\n }\n\n return V;\n};\n\nconversions[\"RegExp\"] = function (V, opts) {\n if (!(V instanceof RegExp)) {\n V = new RegExp(V);\n }\n\n return V;\n};\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\n\nexports.implementation = class URLImpl {\n constructor(constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === \"failure\") {\n throw new TypeError(\"Invalid base URL\");\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n\n // TODO: query stuff\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return this._url.scheme + \":\";\n }\n\n set protocol(v) {\n usm.basicURLParse(v + \":\", { url: this._url, stateOverride: \"scheme start\" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return \"\";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return usm.serializeHost(url.host) + \":\" + usm.serializeInteger(url.port);\n }\n\n set host(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return \"\";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n }\n\n get port() {\n if (this._url.port === null) {\n return \"\";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === \"\") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n }\n }\n\n get pathname() {\n if (this._url.cannotBeABaseURL) {\n return this._url.path[0];\n }\n\n if (this._url.path.length === 0) {\n return \"\";\n }\n\n return \"/\" + this._url.path.join(\"/\");\n }\n\n set pathname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === \"\") {\n return \"\";\n }\n\n return \"?\" + this._url.query;\n }\n\n set search(v) {\n // TODO: query stuff\n\n const url = this._url;\n\n if (v === \"\") {\n url.query = null;\n return;\n }\n\n const input = v[0] === \"?\" ? v.substring(1) : v;\n url.query = \"\";\n usm.basicURLParse(input, { url, stateOverride: \"query\" });\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === \"\") {\n return \"\";\n }\n\n return \"#\" + this._url.fragment;\n }\n\n set hash(v) {\n if (v === \"\") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === \"#\" ? v.substring(1) : v;\n this._url.fragment = \"\";\n usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\nconst Impl = require(\".//URL-impl.js\");\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n if (!this || this[impl] || !(this instanceof URL)) {\n throw new TypeError(\"Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.\");\n }\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'URL': 1 argument required, but only \" + arguments.length + \" present.\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 2; ++i) {\n args[i] = arguments[i];\n }\n args[0] = conversions[\"USVString\"](args[0]);\n if (args[1] !== undefined) {\n args[1] = conversions[\"USVString\"](args[1]);\n }\n\n module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 0; ++i) {\n args[i] = arguments[i];\n }\n return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, \"href\", {\n get() {\n return this[impl].href;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].href = V;\n },\n enumerable: true,\n configurable: true\n});\n\nURL.prototype.toString = function () {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n return this.href;\n};\n\nObject.defineProperty(URL.prototype, \"origin\", {\n get() {\n return this[impl].origin;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"protocol\", {\n get() {\n return this[impl].protocol;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].protocol = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"username\", {\n get() {\n return this[impl].username;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].username = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"password\", {\n get() {\n return this[impl].password;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].password = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"host\", {\n get() {\n return this[impl].host;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].host = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hostname\", {\n get() {\n return this[impl].hostname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hostname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"port\", {\n get() {\n return this[impl].port;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].port = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"pathname\", {\n get() {\n return this[impl].pathname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].pathname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"search\", {\n get() {\n return this[impl].search;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].search = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hash\", {\n get() {\n return this[impl].hash;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hash = V;\n },\n enumerable: true,\n configurable: true\n});\n\n\nmodule.exports = {\n is(obj) {\n return !!obj && obj[impl] instanceof Impl.implementation;\n },\n create(constructorArgs, privateData) {\n let obj = Object.create(URL.prototype);\n this.setup(obj, constructorArgs, privateData);\n return obj;\n },\n setup(obj, constructorArgs, privateData) {\n if (!privateData) privateData = {};\n privateData.wrapper = obj;\n\n obj[impl] = new Impl.implementation(constructorArgs, privateData);\n obj[impl][utils.wrapperSymbol] = obj;\n },\n interface: URL,\n expose: {\n Window: { URL: URL },\n Worker: { URL: URL }\n }\n};\n\n","\"use strict\";\n\nexports.URL = require(\"./URL\").interface;\nexports.serializeURL = require(\"./url-state-machine\").serializeURL;\nexports.serializeURLOrigin = require(\"./url-state-machine\").serializeURLOrigin;\nexports.basicURLParse = require(\"./url-state-machine\").basicURLParse;\nexports.setTheUsername = require(\"./url-state-machine\").setTheUsername;\nexports.setThePassword = require(\"./url-state-machine\").setThePassword;\nexports.serializeHost = require(\"./url-state-machine\").serializeHost;\nexports.serializeInteger = require(\"./url-state-machine\").serializeInteger;\nexports.parseURL = require(\"./url-state-machine\").parseURL;\n","\"use strict\";\r\nconst punycode = require(\"punycode\");\r\nconst tr46 = require(\"tr46\");\r\n\r\nconst specialSchemes = {\r\n ftp: 21,\r\n file: null,\r\n gopher: 70,\r\n http: 80,\r\n https: 443,\r\n ws: 80,\r\n wss: 443\r\n};\r\n\r\nconst failure = Symbol(\"failure\");\r\n\r\nfunction countSymbols(str) {\r\n return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n const c = input[idx];\r\n return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n buffer = buffer.toLowerCase();\r\n return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n let hex = c.toString(16).toUpperCase();\r\n if (hex.length === 1) {\r\n hex = \"0\" + hex;\r\n }\r\n\r\n return \"%\" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n const buf = new Buffer(c);\r\n\r\n let str = \"\";\r\n\r\n for (let i = 0; i < buf.length; ++i) {\r\n str += percentEncode(buf[i]);\r\n }\r\n\r\n return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n const input = new Buffer(str);\r\n const output = [];\r\n for (let i = 0; i < input.length; ++i) {\r\n if (input[i] !== 37) {\r\n output.push(input[i]);\r\n } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n i += 2;\r\n } else {\r\n output.push(input[i]);\r\n }\r\n }\r\n return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n const cStr = String.fromCodePoint(c);\r\n\r\n if (encodeSetPredicate(c)) {\r\n return utf8PercentEncode(cStr);\r\n }\r\n\r\n return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n let R = 10;\r\n\r\n if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\r\n input = input.substring(2);\r\n R = 16;\r\n } else if (input.length >= 2 && input.charAt(0) === \"0\") {\r\n input = input.substring(1);\r\n R = 8;\r\n }\r\n\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n\r\n const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n if (regex.test(input)) {\r\n return failure;\r\n }\r\n\r\n return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n const parts = input.split(\".\");\r\n if (parts[parts.length - 1] === \"\") {\r\n if (parts.length > 1) {\r\n parts.pop();\r\n }\r\n }\r\n\r\n if (parts.length > 4) {\r\n return input;\r\n }\r\n\r\n const numbers = [];\r\n for (const part of parts) {\r\n if (part === \"\") {\r\n return input;\r\n }\r\n const n = parseIPv4Number(part);\r\n if (n === failure) {\r\n return input;\r\n }\r\n\r\n numbers.push(n);\r\n }\r\n\r\n for (let i = 0; i < numbers.length - 1; ++i) {\r\n if (numbers[i] > 255) {\r\n return failure;\r\n }\r\n }\r\n if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n return failure;\r\n }\r\n\r\n let ipv4 = numbers.pop();\r\n let counter = 0;\r\n\r\n for (const n of numbers) {\r\n ipv4 += n * Math.pow(256, 3 - counter);\r\n ++counter;\r\n }\r\n\r\n return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n let output = \"\";\r\n let n = address;\r\n\r\n for (let i = 1; i <= 4; ++i) {\r\n output = String(n % 256) + output;\r\n if (i !== 4) {\r\n output = \".\" + output;\r\n }\r\n n = Math.floor(n / 256);\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n let pieceIndex = 0;\r\n let compress = null;\r\n let pointer = 0;\r\n\r\n input = punycode.ucs2.decode(input);\r\n\r\n if (input[pointer] === 58) {\r\n if (input[pointer + 1] !== 58) {\r\n return failure;\r\n }\r\n\r\n pointer += 2;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n }\r\n\r\n while (pointer < input.length) {\r\n if (pieceIndex === 8) {\r\n return failure;\r\n }\r\n\r\n if (input[pointer] === 58) {\r\n if (compress !== null) {\r\n return failure;\r\n }\r\n ++pointer;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n continue;\r\n }\r\n\r\n let value = 0;\r\n let length = 0;\r\n\r\n while (length < 4 && isASCIIHex(input[pointer])) {\r\n value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n ++pointer;\r\n ++length;\r\n }\r\n\r\n if (input[pointer] === 46) {\r\n if (length === 0) {\r\n return failure;\r\n }\r\n\r\n pointer -= length;\r\n\r\n if (pieceIndex > 6) {\r\n return failure;\r\n }\r\n\r\n let numbersSeen = 0;\r\n\r\n while (input[pointer] !== undefined) {\r\n let ipv4Piece = null;\r\n\r\n if (numbersSeen > 0) {\r\n if (input[pointer] === 46 && numbersSeen < 4) {\r\n ++pointer;\r\n } else {\r\n return failure;\r\n }\r\n }\r\n\r\n if (!isASCIIDigit(input[pointer])) {\r\n return failure;\r\n }\r\n\r\n while (isASCIIDigit(input[pointer])) {\r\n const number = parseInt(at(input, pointer));\r\n if (ipv4Piece === null) {\r\n ipv4Piece = number;\r\n } else if (ipv4Piece === 0) {\r\n return failure;\r\n } else {\r\n ipv4Piece = ipv4Piece * 10 + number;\r\n }\r\n if (ipv4Piece > 255) {\r\n return failure;\r\n }\r\n ++pointer;\r\n }\r\n\r\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n ++numbersSeen;\r\n\r\n if (numbersSeen === 2 || numbersSeen === 4) {\r\n ++pieceIndex;\r\n }\r\n }\r\n\r\n if (numbersSeen !== 4) {\r\n return failure;\r\n }\r\n\r\n break;\r\n } else if (input[pointer] === 58) {\r\n ++pointer;\r\n if (input[pointer] === undefined) {\r\n return failure;\r\n }\r\n } else if (input[pointer] !== undefined) {\r\n return failure;\r\n }\r\n\r\n address[pieceIndex] = value;\r\n ++pieceIndex;\r\n }\r\n\r\n if (compress !== null) {\r\n let swaps = pieceIndex - compress;\r\n pieceIndex = 7;\r\n while (pieceIndex !== 0 && swaps > 0) {\r\n const temp = address[compress + swaps - 1];\r\n address[compress + swaps - 1] = address[pieceIndex];\r\n address[pieceIndex] = temp;\r\n --pieceIndex;\r\n --swaps;\r\n }\r\n } else if (compress === null && pieceIndex !== 8) {\r\n return failure;\r\n }\r\n\r\n return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n let output = \"\";\r\n const seqResult = findLongestZeroSequence(address);\r\n const compress = seqResult.idx;\r\n let ignore0 = false;\r\n\r\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n if (ignore0 && address[pieceIndex] === 0) {\r\n continue;\r\n } else if (ignore0) {\r\n ignore0 = false;\r\n }\r\n\r\n if (compress === pieceIndex) {\r\n const separator = pieceIndex === 0 ? \"::\" : \":\";\r\n output += separator;\r\n ignore0 = true;\r\n continue;\r\n }\r\n\r\n output += address[pieceIndex].toString(16);\r\n\r\n if (pieceIndex !== 7) {\r\n output += \":\";\r\n }\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n if (input[0] === \"[\") {\r\n if (input[input.length - 1] !== \"]\") {\r\n return failure;\r\n }\r\n\r\n return parseIPv6(input.substring(1, input.length - 1));\r\n }\r\n\r\n if (!isSpecialArg) {\r\n return parseOpaqueHost(input);\r\n }\r\n\r\n const domain = utf8PercentDecode(input);\r\n const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n if (asciiDomain === null) {\r\n return failure;\r\n }\r\n\r\n if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n return failure;\r\n }\r\n\r\n const ipv4Host = parseIPv4(asciiDomain);\r\n if (typeof ipv4Host === \"number\" || ipv4Host === failure) {\r\n return ipv4Host;\r\n }\r\n\r\n return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n return failure;\r\n }\r\n\r\n let output = \"\";\r\n const decoded = punycode.ucs2.decode(input);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n }\r\n return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n let maxIdx = null;\r\n let maxLen = 1; // only find elements > 1\r\n let currStart = null;\r\n let currLen = 0;\r\n\r\n for (let i = 0; i < arr.length; ++i) {\r\n if (arr[i] !== 0) {\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n currStart = null;\r\n currLen = 0;\r\n } else {\r\n if (currStart === null) {\r\n currStart = i;\r\n }\r\n ++currLen;\r\n }\r\n }\r\n\r\n // if trailing zeros\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n return {\r\n idx: maxIdx,\r\n len: maxLen\r\n };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n if (typeof host === \"number\") {\r\n return serializeIPv4(host);\r\n }\r\n\r\n // IPv6 serializer\r\n if (host instanceof Array) {\r\n return \"[\" + serializeIPv6(host) + \"]\";\r\n }\r\n\r\n return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, \"\");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n return url.replace(/\\u0009|\\u000A|\\u000D/g, \"\");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n const path = url.path;\r\n if (path.length === 0) {\r\n return;\r\n }\r\n if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n return;\r\n }\r\n\r\n path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n return url.username !== \"\" || url.password !== \"\";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n return url.host === null || url.host === \"\" || url.cannotBeABaseURL || url.scheme === \"file\";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n this.pointer = 0;\r\n this.input = input;\r\n this.base = base || null;\r\n this.encodingOverride = encodingOverride || \"utf-8\";\r\n this.stateOverride = stateOverride;\r\n this.url = url;\r\n this.failure = false;\r\n this.parseError = false;\r\n\r\n if (!this.url) {\r\n this.url = {\r\n scheme: \"\",\r\n username: \"\",\r\n password: \"\",\r\n host: null,\r\n port: null,\r\n path: [],\r\n query: null,\r\n fragment: null,\r\n\r\n cannotBeABaseURL: false\r\n };\r\n\r\n const res = trimControlChars(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n }\r\n\r\n const res = trimTabAndNewline(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n\r\n this.state = stateOverride || \"scheme start\";\r\n\r\n this.buffer = \"\";\r\n this.atFlag = false;\r\n this.arrFlag = false;\r\n this.passwordTokenSeenFlag = false;\r\n\r\n this.input = punycode.ucs2.decode(this.input);\r\n\r\n for (; this.pointer <= this.input.length; ++this.pointer) {\r\n const c = this.input[this.pointer];\r\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n // exec state machine\r\n const ret = this[\"parse \" + this.state](c, cStr);\r\n if (!ret) {\r\n break; // terminate algorithm\r\n } else if (ret === failure) {\r\n this.failure = true;\r\n break;\r\n }\r\n }\r\n}\r\n\r\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\r\n if (isASCIIAlpha(c)) {\r\n this.buffer += cStr.toLowerCase();\r\n this.state = \"scheme\";\r\n } else if (!this.stateOverride) {\r\n this.state = \"no scheme\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\r\n if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n this.buffer += cStr.toLowerCase();\r\n } else if (c === 58) {\r\n if (this.stateOverride) {\r\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\r\n return false;\r\n }\r\n\r\n if (this.url.scheme === \"file\" && (this.url.host === \"\" || this.url.host === null)) {\r\n return false;\r\n }\r\n }\r\n this.url.scheme = this.buffer;\r\n this.buffer = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n if (this.url.scheme === \"file\") {\r\n if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file\";\r\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n this.state = \"special relative or authority\";\r\n } else if (isSpecial(this.url)) {\r\n this.state = \"special authority slashes\";\r\n } else if (this.input[this.pointer + 1] === 47) {\r\n this.state = \"path or authority\";\r\n ++this.pointer;\r\n } else {\r\n this.url.cannotBeABaseURL = true;\r\n this.url.path.push(\"\");\r\n this.state = \"cannot-be-a-base-URL path\";\r\n }\r\n } else if (!this.stateOverride) {\r\n this.buffer = \"\";\r\n this.state = \"no scheme\";\r\n this.pointer = -1;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\r\n if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n return failure;\r\n } else if (this.base.cannotBeABaseURL && c === 35) {\r\n this.url.scheme = this.base.scheme;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.url.cannotBeABaseURL = true;\r\n this.state = \"fragment\";\r\n } else if (this.base.scheme === \"file\") {\r\n this.state = \"file\";\r\n --this.pointer;\r\n } else {\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\r\n if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\r\n this.url.scheme = this.base.scheme;\r\n if (isNaN(c)) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 47) {\r\n this.state = \"relative slash\";\r\n } else if (c === 63) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n this.state = \"relative slash\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\r\n if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"special authority ignore slashes\";\r\n } else if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"special authority ignore slashes\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n if (c !== 47 && c !== 92) {\r\n this.state = \"authority\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\r\n if (c === 64) {\r\n this.parseError = true;\r\n if (this.atFlag) {\r\n this.buffer = \"%40\" + this.buffer;\r\n }\r\n this.atFlag = true;\r\n\r\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n const len = countSymbols(this.buffer);\r\n for (let pointer = 0; pointer < len; ++pointer) {\r\n const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n this.passwordTokenSeenFlag = true;\r\n continue;\r\n }\r\n const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n if (this.passwordTokenSeenFlag) {\r\n this.url.password += encodedCodePoints;\r\n } else {\r\n this.url.username += encodedCodePoints;\r\n }\r\n }\r\n this.buffer = \"\";\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n if (this.atFlag && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.pointer -= countSymbols(this.buffer) + 1;\r\n this.buffer = \"\";\r\n this.state = \"host\";\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse hostname\"] =\r\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\r\n if (this.stateOverride && this.url.scheme === \"file\") {\r\n --this.pointer;\r\n this.state = \"file host\";\r\n } else if (c === 58 && !this.arrFlag) {\r\n if (this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"port\";\r\n if (this.stateOverride === \"hostname\") {\r\n return false;\r\n }\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n --this.pointer;\r\n if (isSpecial(this.url) && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n } else if (this.stateOverride && this.buffer === \"\" &&\r\n (includesCredentials(this.url) || this.url.port !== null)) {\r\n this.parseError = true;\r\n return false;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n } else {\r\n if (c === 91) {\r\n this.arrFlag = true;\r\n } else if (c === 93) {\r\n this.arrFlag = false;\r\n }\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\r\n if (isASCIIDigit(c)) {\r\n this.buffer += cStr;\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92) ||\r\n this.stateOverride) {\r\n if (this.buffer !== \"\") {\r\n const port = parseInt(this.buffer);\r\n if (port > Math.pow(2, 16) - 1) {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n this.buffer = \"\";\r\n }\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\r\n this.url.scheme = \"file\";\r\n\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file slash\";\r\n } else if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNaN(c)) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 63) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n shortenPath(this.url);\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file host\";\r\n } else {\r\n if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n this.url.path.push(this.base.path[0]);\r\n } else {\r\n this.url.host = this.base.host;\r\n }\r\n }\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\r\n if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n --this.pointer;\r\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n this.parseError = true;\r\n this.state = \"path\";\r\n } else if (this.buffer === \"\") {\r\n this.url.host = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n } else {\r\n let host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n if (host === \"localhost\") {\r\n host = \"\";\r\n }\r\n this.url.host = host;\r\n\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n }\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\r\n if (isSpecial(this.url)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"path\";\r\n\r\n if (c !== 47 && c !== 92) {\r\n --this.pointer;\r\n }\r\n } else if (!this.stateOverride && c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (!this.stateOverride && c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (c !== undefined) {\r\n this.state = \"path\";\r\n if (c !== 47) {\r\n --this.pointer;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\r\n if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n (!this.stateOverride && (c === 63 || c === 35))) {\r\n if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n }\r\n\r\n if (isDoubleDot(this.buffer)) {\r\n shortenPath(this.url);\r\n if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n }\r\n } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n } else if (!isSingleDot(this.buffer)) {\r\n if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n if (this.url.host !== \"\" && this.url.host !== null) {\r\n this.parseError = true;\r\n this.url.host = \"\";\r\n }\r\n this.buffer = this.buffer[0] + \":\";\r\n }\r\n this.url.path.push(this.buffer);\r\n }\r\n this.buffer = \"\";\r\n if (this.url.scheme === \"file\" && (c === undefined || c === 63 || c === 35)) {\r\n while (this.url.path.length > 1 && this.url.path[0] === \"\") {\r\n this.parseError = true;\r\n this.url.path.shift();\r\n }\r\n }\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n }\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse cannot-be-a-base-URL path\"] = function parseCannotBeABaseURLPath(c) {\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n // TODO: Add: not a URL code point\r\n if (!isNaN(c) && c !== 37) {\r\n this.parseError = true;\r\n }\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n if (!isNaN(c)) {\r\n this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\r\n if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\r\n this.encodingOverride = \"utf-8\";\r\n }\r\n\r\n const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n for (let i = 0; i < buffer.length; ++i) {\r\n if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n this.url.query += percentEncode(buffer[i]);\r\n } else {\r\n this.url.query += String.fromCodePoint(buffer[i]);\r\n }\r\n }\r\n\r\n this.buffer = \"\";\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\r\n if (isNaN(c)) { // do nothing\r\n } else if (c === 0x0) {\r\n this.parseError = true;\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n let output = url.scheme + \":\";\r\n if (url.host !== null) {\r\n output += \"//\";\r\n\r\n if (url.username !== \"\" || url.password !== \"\") {\r\n output += url.username;\r\n if (url.password !== \"\") {\r\n output += \":\" + url.password;\r\n }\r\n output += \"@\";\r\n }\r\n\r\n output += serializeHost(url.host);\r\n\r\n if (url.port !== null) {\r\n output += \":\" + url.port;\r\n }\r\n } else if (url.host === null && url.scheme === \"file\") {\r\n output += \"//\";\r\n }\r\n\r\n if (url.cannotBeABaseURL) {\r\n output += url.path[0];\r\n } else {\r\n for (const string of url.path) {\r\n output += \"/\" + string;\r\n }\r\n }\r\n\r\n if (url.query !== null) {\r\n output += \"?\" + url.query;\r\n }\r\n\r\n if (!excludeFragment && url.fragment !== null) {\r\n output += \"#\" + url.fragment;\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n let result = tuple.scheme + \"://\";\r\n result += serializeHost(tuple.host);\r\n\r\n if (tuple.port !== null) {\r\n result += \":\" + tuple.port;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n // https://url.spec.whatwg.org/#concept-url-origin\r\n switch (url.scheme) {\r\n case \"blob\":\r\n try {\r\n return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n } catch (e) {\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n case \"ftp\":\r\n case \"gopher\":\r\n case \"http\":\r\n case \"https\":\r\n case \"ws\":\r\n case \"wss\":\r\n return serializeOrigin({\r\n scheme: url.scheme,\r\n host: url.host,\r\n port: url.port\r\n });\r\n case \"file\":\r\n // spec says \"exercise to the reader\", chrome says \"file://\"\r\n return \"file://\";\r\n default:\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n if (usm.failure) {\r\n return \"failure\";\r\n }\r\n\r\n return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n url.username = \"\";\r\n const decoded = punycode.ucs2.decode(username);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n url.password = \"\";\r\n const decoded = punycode.ucs2.decode(password);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // We don't handle blobs, so this just delegates:\r\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n","\"use strict\";\n\nmodule.exports.mixin = function mixin(target, source) {\n const keys = Object.getOwnPropertyNames(source);\n for (let i = 0; i < keys.length; ++i) {\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nmodule.exports.wrapperSymbol = Symbol(\"wrapper\");\nmodule.exports.implSymbol = Symbol(\"impl\");\n\nmodule.exports.wrapperForImpl = function (impl) {\n return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n return wrapper[module.exports.implSymbol];\n};\n\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n","module.exports = require(\"assert\");","module.exports = require(\"async_hooks\");","module.exports = require(\"buffer\");","module.exports = require(\"child_process\");","module.exports = require(\"console\");","module.exports = require(\"crypto\");","module.exports = require(\"diagnostics_channel\");","module.exports = require(\"dns\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"http2\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"node:events\");","module.exports = require(\"node:stream\");","module.exports = require(\"node:util\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"perf_hooks\");","module.exports = require(\"punycode\");","module.exports = require(\"querystring\");","module.exports = require(\"stream\");","module.exports = require(\"stream/web\");","module.exports = require(\"string_decoder\");","module.exports = require(\"tls\");","module.exports = require(\"tty\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"util/types\");","module.exports = require(\"worker_threads\");","module.exports = require(\"zlib\");","'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst inherits = require('node:util').inherits\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst PartStream = require('./PartStream')\nconst HeaderParser = require('./HeaderParser')\n\nconst DASH = 45\nconst B_ONEDASH = Buffer.from('-')\nconst B_CRLF = Buffer.from('\\r\\n')\nconst EMPTY_FN = function () {}\n\nfunction Dicer (cfg) {\n if (!(this instanceof Dicer)) { return new Dicer(cfg) }\n WritableStream.call(this, cfg)\n\n if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') }\n\n if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined }\n\n this._headerFirst = cfg.headerFirst\n\n this._dashes = 0\n this._parts = 0\n this._finished = false\n this._realFinish = false\n this._isPreamble = true\n this._justMatched = false\n this._firstWrite = true\n this._inHeader = true\n this._part = undefined\n this._cb = undefined\n this._ignoreData = false\n this._partOpts = { highWaterMark: cfg.partHwm }\n this._pause = false\n\n const self = this\n this._hparser = new HeaderParser(cfg)\n this._hparser.on('header', function (header) {\n self._inHeader = false\n self._part.emit('header', header)\n })\n}\ninherits(Dicer, WritableStream)\n\nDicer.prototype.emit = function (ev) {\n if (ev === 'finish' && !this._realFinish) {\n if (!this._finished) {\n const self = this\n process.nextTick(function () {\n self.emit('error', new Error('Unexpected end of multipart data'))\n if (self._part && !self._ignoreData) {\n const type = (self._isPreamble ? 'Preamble' : 'Part')\n self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data'))\n self._part.push(null)\n process.nextTick(function () {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n return\n }\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n }\n } else { WritableStream.prototype.emit.apply(this, arguments) }\n}\n\nDicer.prototype._write = function (data, encoding, cb) {\n // ignore unexpected data (e.g. extra trailer data after finished)\n if (!this._hparser && !this._bparser) { return cb() }\n\n if (this._headerFirst && this._isPreamble) {\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() }\n }\n const r = this._hparser.push(data)\n if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }\n }\n\n // allows for \"easier\" testing\n if (this._firstWrite) {\n this._bparser.push(B_CRLF)\n this._firstWrite = false\n }\n\n this._bparser.push(data)\n\n if (this._pause) { this._cb = cb } else { cb() }\n}\n\nDicer.prototype.reset = function () {\n this._part = undefined\n this._bparser = undefined\n this._hparser = undefined\n}\n\nDicer.prototype.setBoundary = function (boundary) {\n const self = this\n this._bparser = new StreamSearch('\\r\\n--' + boundary)\n this._bparser.on('info', function (isMatch, data, start, end) {\n self._oninfo(isMatch, data, start, end)\n })\n}\n\nDicer.prototype._ignore = function () {\n if (this._part && !this._ignoreData) {\n this._ignoreData = true\n this._part.on('error', EMPTY_FN)\n // we must perform some kind of read on the stream even though we are\n // ignoring the data, otherwise node's Readable stream will not emit 'end'\n // after pushing null to the stream\n this._part.resume()\n }\n}\n\nDicer.prototype._oninfo = function (isMatch, data, start, end) {\n let buf; const self = this; let i = 0; let r; let shouldWriteMore = true\n\n if (!this._part && this._justMatched && data) {\n while (this._dashes < 2 && (start + i) < end) {\n if (data[start + i] === DASH) {\n ++i\n ++this._dashes\n } else {\n if (this._dashes) { buf = B_ONEDASH }\n this._dashes = 0\n break\n }\n }\n if (this._dashes === 2) {\n if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) }\n this.reset()\n this._finished = true\n // no more parts will be added\n if (self._parts === 0) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n }\n }\n if (this._dashes) { return }\n }\n if (this._justMatched) { this._justMatched = false }\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n this._part._read = function (n) {\n self._unpause()\n }\n if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() }\n if (!this._isPreamble) { this._inHeader = true }\n }\n if (data && start < end && !this._ignoreData) {\n if (this._isPreamble || !this._inHeader) {\n if (buf) { shouldWriteMore = this._part.push(buf) }\n shouldWriteMore = this._part.push(data.slice(start, end))\n if (!shouldWriteMore) { this._pause = true }\n } else if (!this._isPreamble && this._inHeader) {\n if (buf) { this._hparser.push(buf) }\n r = this._hparser.push(data.slice(start, end))\n if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) }\n }\n }\n if (isMatch) {\n this._hparser.reset()\n if (this._isPreamble) { this._isPreamble = false } else {\n if (start !== end) {\n ++this._parts\n this._part.on('end', function () {\n if (--self._parts === 0) {\n if (self._finished) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n } else {\n self._unpause()\n }\n }\n })\n }\n }\n this._part.push(null)\n this._part = undefined\n this._ignoreData = false\n this._justMatched = true\n this._dashes = 0\n }\n}\n\nDicer.prototype._unpause = function () {\n if (!this._pause) { return }\n\n this._pause = false\n if (this._cb) {\n const cb = this._cb\n this._cb = undefined\n cb()\n }\n}\n\nmodule.exports = Dicer\n","'use strict'\n\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\nconst getLimit = require('../../../lib/utils/getLimit')\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst B_DCRLF = Buffer.from('\\r\\n\\r\\n')\nconst RE_CRLF = /\\r\\n/g\nconst RE_HDR = /^([^:]+):[ \\t]?([\\x00-\\xFF]+)?$/ // eslint-disable-line no-control-regex\n\nfunction HeaderParser (cfg) {\n EventEmitter.call(this)\n\n cfg = cfg || {}\n const self = this\n this.nread = 0\n this.maxed = false\n this.npairs = 0\n this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000)\n this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024)\n this.buffer = ''\n this.header = {}\n this.finished = false\n this.ss = new StreamSearch(B_DCRLF)\n this.ss.on('info', function (isMatch, data, start, end) {\n if (data && !self.maxed) {\n if (self.nread + end - start >= self.maxHeaderSize) {\n end = self.maxHeaderSize - self.nread + start\n self.nread = self.maxHeaderSize\n self.maxed = true\n } else { self.nread += (end - start) }\n\n self.buffer += data.toString('binary', start, end)\n }\n if (isMatch) { self._finish() }\n })\n}\ninherits(HeaderParser, EventEmitter)\n\nHeaderParser.prototype.push = function (data) {\n const r = this.ss.push(data)\n if (this.finished) { return r }\n}\n\nHeaderParser.prototype.reset = function () {\n this.finished = false\n this.buffer = ''\n this.header = {}\n this.ss.reset()\n}\n\nHeaderParser.prototype._finish = function () {\n if (this.buffer) { this._parseHeader() }\n this.ss.matches = this.ss.maxMatches\n const header = this.header\n this.header = {}\n this.buffer = ''\n this.finished = true\n this.nread = this.npairs = 0\n this.maxed = false\n this.emit('header', header)\n}\n\nHeaderParser.prototype._parseHeader = function () {\n if (this.npairs === this.maxHeaderPairs) { return }\n\n const lines = this.buffer.split(RE_CRLF)\n const len = lines.length\n let m, h\n\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (lines[i].length === 0) { continue }\n if (lines[i][0] === '\\t' || lines[i][0] === ' ') {\n // folded header content\n // RFC2822 says to just remove the CRLF and not the whitespace following\n // it, so we follow the RFC and include the leading whitespace ...\n if (h) {\n this.header[h][this.header[h].length - 1] += lines[i]\n continue\n }\n }\n\n const posColon = lines[i].indexOf(':')\n if (\n posColon === -1 ||\n posColon === 0\n ) {\n return\n }\n m = RE_HDR.exec(lines[i])\n h = m[1].toLowerCase()\n this.header[h] = this.header[h] || []\n this.header[h].push((m[2] || ''))\n if (++this.npairs === this.maxHeaderPairs) { break }\n }\n}\n\nmodule.exports = HeaderParser\n","'use strict'\n\nconst inherits = require('node:util').inherits\nconst ReadableStream = require('node:stream').Readable\n\nfunction PartStream (opts) {\n ReadableStream.call(this, opts)\n}\ninherits(PartStream, ReadableStream)\n\nPartStream.prototype._read = function (n) {}\n\nmodule.exports = PartStream\n","'use strict'\n\n/**\n * Copyright Brian White. All rights reserved.\n *\n * @see https://github.com/mscdex/streamsearch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation\n * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool\n */\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\n\nfunction SBMH (needle) {\n if (typeof needle === 'string') {\n needle = Buffer.from(needle)\n }\n\n if (!Buffer.isBuffer(needle)) {\n throw new TypeError('The needle has to be a String or a Buffer.')\n }\n\n const needleLength = needle.length\n\n if (needleLength === 0) {\n throw new Error('The needle cannot be an empty String/Buffer.')\n }\n\n if (needleLength > 256) {\n throw new Error('The needle cannot have a length bigger than 256.')\n }\n\n this.maxMatches = Infinity\n this.matches = 0\n\n this._occ = new Array(256)\n .fill(needleLength) // Initialize occurrence table.\n this._lookbehind_size = 0\n this._needle = needle\n this._bufpos = 0\n\n this._lookbehind = Buffer.alloc(needleLength)\n\n // Populate occurrence table with analysis of the needle,\n // ignoring last letter.\n for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var\n this._occ[needle[i]] = needleLength - 1 - i\n }\n}\ninherits(SBMH, EventEmitter)\n\nSBMH.prototype.reset = function () {\n this._lookbehind_size = 0\n this.matches = 0\n this._bufpos = 0\n}\n\nSBMH.prototype.push = function (chunk, pos) {\n if (!Buffer.isBuffer(chunk)) {\n chunk = Buffer.from(chunk, 'binary')\n }\n const chlen = chunk.length\n this._bufpos = pos || 0\n let r\n while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) }\n return r\n}\n\nSBMH.prototype._sbmh_feed = function (data) {\n const len = data.length\n const needle = this._needle\n const needleLength = needle.length\n const lastNeedleChar = needle[needleLength - 1]\n\n // Positive: points to a position in `data`\n // pos == 3 points to data[3]\n // Negative: points to a position in the lookbehind buffer\n // pos == -2 points to lookbehind[lookbehind_size - 2]\n let pos = -this._lookbehind_size\n let ch\n\n if (pos < 0) {\n // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool\n // search with character lookup code that considers both the\n // lookbehind buffer and the current round's haystack data.\n //\n // Loop until\n // there is a match.\n // or until\n // we've moved past the position that requires the\n // lookbehind buffer. In this case we switch to the\n // optimized loop.\n // or until\n // the character to look at lies outside the haystack.\n while (pos < 0 && pos <= len - needleLength) {\n ch = this._sbmh_lookup_char(data, pos + needleLength - 1)\n\n if (\n ch === lastNeedleChar &&\n this._sbmh_memcmp(data, pos, needleLength - 1)\n ) {\n this._lookbehind_size = 0\n ++this.matches\n this.emit('info', true)\n\n return (this._bufpos = pos + needleLength)\n }\n pos += this._occ[ch]\n }\n\n // No match.\n\n if (pos < 0) {\n // There's too few data for Boyer-Moore-Horspool to run,\n // so let's use a different algorithm to skip as much as\n // we can.\n // Forward pos until\n // the trailing part of lookbehind + data\n // looks like the beginning of the needle\n // or until\n // pos == 0\n while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos }\n }\n\n if (pos >= 0) {\n // Discard lookbehind buffer.\n this.emit('info', false, this._lookbehind, 0, this._lookbehind_size)\n this._lookbehind_size = 0\n } else {\n // Cut off part of the lookbehind buffer that has\n // been processed and append the entire haystack\n // into it.\n const bytesToCutOff = this._lookbehind_size + pos\n if (bytesToCutOff > 0) {\n // The cut off data is guaranteed not to contain the needle.\n this.emit('info', false, this._lookbehind, 0, bytesToCutOff)\n }\n\n this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff,\n this._lookbehind_size - bytesToCutOff)\n this._lookbehind_size -= bytesToCutOff\n\n data.copy(this._lookbehind, this._lookbehind_size)\n this._lookbehind_size += len\n\n this._bufpos = len\n return len\n }\n }\n\n pos += (pos >= 0) * this._bufpos\n\n // Lookbehind buffer is now empty. We only need to check if the\n // needle is in the haystack.\n if (data.indexOf(needle, pos) !== -1) {\n pos = data.indexOf(needle, pos)\n ++this.matches\n if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) }\n\n return (this._bufpos = pos + needleLength)\n } else {\n pos = len - needleLength\n }\n\n // There was no match. If there's trailing haystack data that we cannot\n // match yet using the Boyer-Moore-Horspool algorithm (because the trailing\n // data is less than the needle size) then match using a modified\n // algorithm that starts matching from the beginning instead of the end.\n // Whatever trailing data is left after running this algorithm is added to\n // the lookbehind buffer.\n while (\n pos < len &&\n (\n data[pos] !== needle[0] ||\n (\n (Buffer.compare(\n data.subarray(pos, pos + len - pos),\n needle.subarray(0, len - pos)\n ) !== 0)\n )\n )\n ) {\n ++pos\n }\n if (pos < len) {\n data.copy(this._lookbehind, 0, pos, pos + (len - pos))\n this._lookbehind_size = len - pos\n }\n\n // Everything until pos is guaranteed not to contain needle data.\n if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) }\n\n this._bufpos = len\n return len\n}\n\nSBMH.prototype._sbmh_lookup_char = function (data, pos) {\n return (pos < 0)\n ? this._lookbehind[this._lookbehind_size + pos]\n : data[pos]\n}\n\nSBMH.prototype._sbmh_memcmp = function (data, pos, len) {\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false }\n }\n return true\n}\n\nmodule.exports = SBMH\n","'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst { inherits } = require('node:util')\nconst Dicer = require('../deps/dicer/lib/Dicer')\n\nconst MultipartParser = require('./types/multipart')\nconst UrlencodedParser = require('./types/urlencoded')\nconst parseParams = require('./utils/parseParams')\n\nfunction Busboy (opts) {\n if (!(this instanceof Busboy)) { return new Busboy(opts) }\n\n if (typeof opts !== 'object') {\n throw new TypeError('Busboy expected an options-Object.')\n }\n if (typeof opts.headers !== 'object') {\n throw new TypeError('Busboy expected an options-Object with headers-attribute.')\n }\n if (typeof opts.headers['content-type'] !== 'string') {\n throw new TypeError('Missing Content-Type-header.')\n }\n\n const {\n headers,\n ...streamOptions\n } = opts\n\n this.opts = {\n autoDestroy: false,\n ...streamOptions\n }\n WritableStream.call(this, this.opts)\n\n this._done = false\n this._parser = this.getParserByHeaders(headers)\n this._finished = false\n}\ninherits(Busboy, WritableStream)\n\nBusboy.prototype.emit = function (ev) {\n if (ev === 'finish') {\n if (!this._done) {\n this._parser?.end()\n return\n } else if (this._finished) {\n return\n }\n this._finished = true\n }\n WritableStream.prototype.emit.apply(this, arguments)\n}\n\nBusboy.prototype.getParserByHeaders = function (headers) {\n const parsed = parseParams(headers['content-type'])\n\n const cfg = {\n defCharset: this.opts.defCharset,\n fileHwm: this.opts.fileHwm,\n headers,\n highWaterMark: this.opts.highWaterMark,\n isPartAFile: this.opts.isPartAFile,\n limits: this.opts.limits,\n parsedConType: parsed,\n preservePath: this.opts.preservePath\n }\n\n if (MultipartParser.detect.test(parsed[0])) {\n return new MultipartParser(this, cfg)\n }\n if (UrlencodedParser.detect.test(parsed[0])) {\n return new UrlencodedParser(this, cfg)\n }\n throw new Error('Unsupported Content-Type.')\n}\n\nBusboy.prototype._write = function (chunk, encoding, cb) {\n this._parser.write(chunk, cb)\n}\n\nmodule.exports = Busboy\nmodule.exports.default = Busboy\nmodule.exports.Busboy = Busboy\n\nmodule.exports.Dicer = Dicer\n","'use strict'\n\n// TODO:\n// * support 1 nested multipart level\n// (see second multipart example here:\n// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data)\n// * support limits.fieldNameSize\n// -- this will require modifications to utils.parseParams\n\nconst { Readable } = require('node:stream')\nconst { inherits } = require('node:util')\n\nconst Dicer = require('../../deps/dicer/lib/Dicer')\n\nconst parseParams = require('../utils/parseParams')\nconst decodeText = require('../utils/decodeText')\nconst basename = require('../utils/basename')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_BOUNDARY = /^boundary$/i\nconst RE_FIELD = /^form-data$/i\nconst RE_CHARSET = /^charset$/i\nconst RE_FILENAME = /^filename$/i\nconst RE_NAME = /^name$/i\n\nMultipart.detect = /^multipart\\/form-data/i\nfunction Multipart (boy, cfg) {\n let i\n let len\n const self = this\n let boundary\n const limits = cfg.limits\n const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined))\n const parsedConType = cfg.parsedConType || []\n const defCharset = cfg.defCharset || 'utf8'\n const preservePath = cfg.preservePath\n const fileOpts = { highWaterMark: cfg.fileHwm }\n\n for (i = 0, len = parsedConType.length; i < len; ++i) {\n if (Array.isArray(parsedConType[i]) &&\n RE_BOUNDARY.test(parsedConType[i][0])) {\n boundary = parsedConType[i][1]\n break\n }\n }\n\n function checkFinished () {\n if (nends === 0 && finished && !boy._done) {\n finished = false\n self.end()\n }\n }\n\n if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') }\n\n const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n const fileSizeLimit = getLimit(limits, 'fileSize', Infinity)\n const filesLimit = getLimit(limits, 'files', Infinity)\n const fieldsLimit = getLimit(limits, 'fields', Infinity)\n const partsLimit = getLimit(limits, 'parts', Infinity)\n const headerPairsLimit = getLimit(limits, 'headerPairs', 2000)\n const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024)\n\n let nfiles = 0\n let nfields = 0\n let nends = 0\n let curFile\n let curField\n let finished = false\n\n this._needDrain = false\n this._pause = false\n this._cb = undefined\n this._nparts = 0\n this._boy = boy\n\n const parserCfg = {\n boundary,\n maxHeaderPairs: headerPairsLimit,\n maxHeaderSize: headerSizeLimit,\n partHwm: fileOpts.highWaterMark,\n highWaterMark: cfg.highWaterMark\n }\n\n this.parser = new Dicer(parserCfg)\n this.parser.on('drain', function () {\n self._needDrain = false\n if (self._cb && !self._pause) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }).on('part', function onPart (part) {\n if (++self._nparts > partsLimit) {\n self.parser.removeListener('part', onPart)\n self.parser.on('part', skipPart)\n boy.hitPartsLimit = true\n boy.emit('partsLimit')\n return skipPart(part)\n }\n\n // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let\n // us emit 'end' early since we know the part has ended if we are already\n // seeing the next part\n if (curField) {\n const field = curField\n field.emit('end')\n field.removeAllListeners('end')\n }\n\n part.on('header', function (header) {\n let contype\n let fieldname\n let parsed\n let charset\n let encoding\n let filename\n let nsize = 0\n\n if (header['content-type']) {\n parsed = parseParams(header['content-type'][0])\n if (parsed[0]) {\n contype = parsed[0].toLowerCase()\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_CHARSET.test(parsed[i][0])) {\n charset = parsed[i][1].toLowerCase()\n break\n }\n }\n }\n }\n\n if (contype === undefined) { contype = 'text/plain' }\n if (charset === undefined) { charset = defCharset }\n\n if (header['content-disposition']) {\n parsed = parseParams(header['content-disposition'][0])\n if (!RE_FIELD.test(parsed[0])) { return skipPart(part) }\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_NAME.test(parsed[i][0])) {\n fieldname = parsed[i][1]\n } else if (RE_FILENAME.test(parsed[i][0])) {\n filename = parsed[i][1]\n if (!preservePath) { filename = basename(filename) }\n }\n }\n } else { return skipPart(part) }\n\n if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' }\n\n let onData,\n onEnd\n\n if (isPartAFile(fieldname, contype, filename)) {\n // file/binary field\n if (nfiles === filesLimit) {\n if (!boy.hitFilesLimit) {\n boy.hitFilesLimit = true\n boy.emit('filesLimit')\n }\n return skipPart(part)\n }\n\n ++nfiles\n\n if (!boy._events.file) {\n self.parser._ignore()\n return\n }\n\n ++nends\n const file = new FileStream(fileOpts)\n curFile = file\n file.on('end', function () {\n --nends\n self._pause = false\n checkFinished()\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n })\n file._read = function (n) {\n if (!self._pause) { return }\n self._pause = false\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }\n boy.emit('file', fieldname, file, filename, encoding, contype)\n\n onData = function (data) {\n if ((nsize += data.length) > fileSizeLimit) {\n const extralen = fileSizeLimit - nsize + data.length\n if (extralen > 0) { file.push(data.slice(0, extralen)) }\n file.truncated = true\n file.bytesRead = fileSizeLimit\n part.removeAllListeners('data')\n file.emit('limit')\n return\n } else if (!file.push(data)) { self._pause = true }\n\n file.bytesRead = nsize\n }\n\n onEnd = function () {\n curFile = undefined\n file.push(null)\n }\n } else {\n // non-file field\n if (nfields === fieldsLimit) {\n if (!boy.hitFieldsLimit) {\n boy.hitFieldsLimit = true\n boy.emit('fieldsLimit')\n }\n return skipPart(part)\n }\n\n ++nfields\n ++nends\n let buffer = ''\n let truncated = false\n curField = part\n\n onData = function (data) {\n if ((nsize += data.length) > fieldSizeLimit) {\n const extralen = (fieldSizeLimit - (nsize - data.length))\n buffer += data.toString('binary', 0, extralen)\n truncated = true\n part.removeAllListeners('data')\n } else { buffer += data.toString('binary') }\n }\n\n onEnd = function () {\n curField = undefined\n if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) }\n boy.emit('field', fieldname, buffer, false, truncated, encoding, contype)\n --nends\n checkFinished()\n }\n }\n\n /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become\n broken. Streams2/streams3 is a huge black box of confusion, but\n somehow overriding the sync state seems to fix things again (and still\n seems to work for previous node versions).\n */\n part._readableState.sync = false\n\n part.on('data', onData)\n part.on('end', onEnd)\n }).on('error', function (err) {\n if (curFile) { curFile.emit('error', err) }\n })\n }).on('error', function (err) {\n boy.emit('error', err)\n }).on('finish', function () {\n finished = true\n checkFinished()\n })\n}\n\nMultipart.prototype.write = function (chunk, cb) {\n const r = this.parser.write(chunk)\n if (r && !this._pause) {\n cb()\n } else {\n this._needDrain = !r\n this._cb = cb\n }\n}\n\nMultipart.prototype.end = function () {\n const self = this\n\n if (self.parser.writable) {\n self.parser.end()\n } else if (!self._boy._done) {\n process.nextTick(function () {\n self._boy._done = true\n self._boy.emit('finish')\n })\n }\n}\n\nfunction skipPart (part) {\n part.resume()\n}\n\nfunction FileStream (opts) {\n Readable.call(this, opts)\n\n this.bytesRead = 0\n\n this.truncated = false\n}\n\ninherits(FileStream, Readable)\n\nFileStream.prototype._read = function (n) {}\n\nmodule.exports = Multipart\n","'use strict'\n\nconst Decoder = require('../utils/Decoder')\nconst decodeText = require('../utils/decodeText')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_CHARSET = /^charset$/i\n\nUrlEncoded.detect = /^application\\/x-www-form-urlencoded/i\nfunction UrlEncoded (boy, cfg) {\n const limits = cfg.limits\n const parsedConType = cfg.parsedConType\n this.boy = boy\n\n this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100)\n this.fieldsLimit = getLimit(limits, 'fields', Infinity)\n\n let charset\n for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var\n if (Array.isArray(parsedConType[i]) &&\n RE_CHARSET.test(parsedConType[i][0])) {\n charset = parsedConType[i][1].toLowerCase()\n break\n }\n }\n\n if (charset === undefined) { charset = cfg.defCharset || 'utf8' }\n\n this.decoder = new Decoder()\n this.charset = charset\n this._fields = 0\n this._state = 'key'\n this._checkingBytes = true\n this._bytesKey = 0\n this._bytesVal = 0\n this._key = ''\n this._val = ''\n this._keyTrunc = false\n this._valTrunc = false\n this._hitLimit = false\n}\n\nUrlEncoded.prototype.write = function (data, cb) {\n if (this._fields === this.fieldsLimit) {\n if (!this.boy.hitFieldsLimit) {\n this.boy.hitFieldsLimit = true\n this.boy.emit('fieldsLimit')\n }\n return cb()\n }\n\n let idxeq; let idxamp; let i; let p = 0; const len = data.length\n\n while (p < len) {\n if (this._state === 'key') {\n idxeq = idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x3D/* = */) {\n idxeq = i\n break\n } else if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesKey }\n }\n\n if (idxeq !== undefined) {\n // key with assignment\n if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) }\n this._state = 'val'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._val = ''\n this._bytesVal = 0\n this._valTrunc = false\n this.decoder.reset()\n\n p = idxeq + 1\n } else if (idxamp !== undefined) {\n // key with no assignment\n ++this._fields\n let key; const keyTrunc = this._keyTrunc\n if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key }\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n if (key.length) {\n this.boy.emit('field', decodeText(key, 'binary', this.charset),\n '',\n keyTrunc,\n false)\n }\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._keyTrunc = true\n }\n } else {\n if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n } else {\n idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesVal }\n }\n\n if (idxamp !== undefined) {\n ++this._fields\n if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) }\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n this._state = 'key'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._val === '' && this.fieldSizeLimit === 0) ||\n (this._bytesVal = this._val.length) === this.fieldSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._valTrunc = true\n }\n } else {\n if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n }\n }\n cb()\n}\n\nUrlEncoded.prototype.end = function () {\n if (this.boy._done) { return }\n\n if (this._state === 'key' && this._key.length > 0) {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n '',\n this._keyTrunc,\n false)\n } else if (this._state === 'val') {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n }\n this.boy._done = true\n this.boy.emit('finish')\n}\n\nmodule.exports = UrlEncoded\n","'use strict'\n\nconst RE_PLUS = /\\+/g\n\nconst HEX = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]\n\nfunction Decoder () {\n this.buffer = undefined\n}\nDecoder.prototype.write = function (str) {\n // Replace '+' with ' ' before decoding\n str = str.replace(RE_PLUS, ' ')\n let res = ''\n let i = 0; let p = 0; const len = str.length\n for (; i < len; ++i) {\n if (this.buffer !== undefined) {\n if (!HEX[str.charCodeAt(i)]) {\n res += '%' + this.buffer\n this.buffer = undefined\n --i // retry character\n } else {\n this.buffer += str[i]\n ++p\n if (this.buffer.length === 2) {\n res += String.fromCharCode(parseInt(this.buffer, 16))\n this.buffer = undefined\n }\n }\n } else if (str[i] === '%') {\n if (i > p) {\n res += str.substring(p, i)\n p = i\n }\n this.buffer = ''\n ++p\n }\n }\n if (p < len && this.buffer === undefined) { res += str.substring(p) }\n return res\n}\nDecoder.prototype.reset = function () {\n this.buffer = undefined\n}\n\nmodule.exports = Decoder\n","'use strict'\n\nmodule.exports = function basename (path) {\n if (typeof path !== 'string') { return '' }\n for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var\n switch (path.charCodeAt(i)) {\n case 0x2F: // '/'\n case 0x5C: // '\\'\n path = path.slice(i + 1)\n return (path === '..' || path === '.' ? '' : path)\n }\n }\n return (path === '..' || path === '.' ? '' : path)\n}\n","'use strict'\n\n// Node has always utf-8\nconst utf8Decoder = new TextDecoder('utf-8')\nconst textDecoders = new Map([\n ['utf-8', utf8Decoder],\n ['utf8', utf8Decoder]\n])\n\nfunction getDecoder (charset) {\n let lc\n while (true) {\n switch (charset) {\n case 'utf-8':\n case 'utf8':\n return decoders.utf8\n case 'latin1':\n case 'ascii': // TODO: Make these a separate, strict decoder?\n case 'us-ascii':\n case 'iso-8859-1':\n case 'iso8859-1':\n case 'iso88591':\n case 'iso_8859-1':\n case 'windows-1252':\n case 'iso_8859-1:1987':\n case 'cp1252':\n case 'x-cp1252':\n return decoders.latin1\n case 'utf16le':\n case 'utf-16le':\n case 'ucs2':\n case 'ucs-2':\n return decoders.utf16le\n case 'base64':\n return decoders.base64\n default:\n if (lc === undefined) {\n lc = true\n charset = charset.toLowerCase()\n continue\n }\n return decoders.other.bind(charset)\n }\n }\n}\n\nconst decoders = {\n utf8: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.utf8Slice(0, data.length)\n },\n\n latin1: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n return data\n }\n return data.latin1Slice(0, data.length)\n },\n\n utf16le: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.ucs2Slice(0, data.length)\n },\n\n base64: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.base64Slice(0, data.length)\n },\n\n other: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n\n if (textDecoders.has(this.toString())) {\n try {\n return textDecoders.get(this).decode(data)\n } catch (e) { }\n }\n return typeof data === 'string'\n ? data\n : data.toString()\n }\n}\n\nfunction decodeText (text, sourceEncoding, destEncoding) {\n if (text) {\n return getDecoder(destEncoding)(text, sourceEncoding)\n }\n return text\n}\n\nmodule.exports = decodeText\n","'use strict'\n\nmodule.exports = function getLimit (limits, name, defaultLimit) {\n if (\n !limits ||\n limits[name] === undefined ||\n limits[name] === null\n ) { return defaultLimit }\n\n if (\n typeof limits[name] !== 'number' ||\n isNaN(limits[name])\n ) { throw new TypeError('Limit ' + name + ' is not a valid number') }\n\n return limits[name]\n}\n","/* eslint-disable object-property-newline */\n'use strict'\n\nconst decodeText = require('./decodeText')\n\nconst RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g\n\nconst EncodedLookup = {\n '%00': '\\x00', '%01': '\\x01', '%02': '\\x02', '%03': '\\x03', '%04': '\\x04',\n '%05': '\\x05', '%06': '\\x06', '%07': '\\x07', '%08': '\\x08', '%09': '\\x09',\n '%0a': '\\x0a', '%0A': '\\x0a', '%0b': '\\x0b', '%0B': '\\x0b', '%0c': '\\x0c',\n '%0C': '\\x0c', '%0d': '\\x0d', '%0D': '\\x0d', '%0e': '\\x0e', '%0E': '\\x0e',\n '%0f': '\\x0f', '%0F': '\\x0f', '%10': '\\x10', '%11': '\\x11', '%12': '\\x12',\n '%13': '\\x13', '%14': '\\x14', '%15': '\\x15', '%16': '\\x16', '%17': '\\x17',\n '%18': '\\x18', '%19': '\\x19', '%1a': '\\x1a', '%1A': '\\x1a', '%1b': '\\x1b',\n '%1B': '\\x1b', '%1c': '\\x1c', '%1C': '\\x1c', '%1d': '\\x1d', '%1D': '\\x1d',\n '%1e': '\\x1e', '%1E': '\\x1e', '%1f': '\\x1f', '%1F': '\\x1f', '%20': '\\x20',\n '%21': '\\x21', '%22': '\\x22', '%23': '\\x23', '%24': '\\x24', '%25': '\\x25',\n '%26': '\\x26', '%27': '\\x27', '%28': '\\x28', '%29': '\\x29', '%2a': '\\x2a',\n '%2A': '\\x2a', '%2b': '\\x2b', '%2B': '\\x2b', '%2c': '\\x2c', '%2C': '\\x2c',\n '%2d': '\\x2d', '%2D': '\\x2d', '%2e': '\\x2e', '%2E': '\\x2e', '%2f': '\\x2f',\n '%2F': '\\x2f', '%30': '\\x30', '%31': '\\x31', '%32': '\\x32', '%33': '\\x33',\n '%34': '\\x34', '%35': '\\x35', '%36': '\\x36', '%37': '\\x37', '%38': '\\x38',\n '%39': '\\x39', '%3a': '\\x3a', '%3A': '\\x3a', '%3b': '\\x3b', '%3B': '\\x3b',\n '%3c': '\\x3c', '%3C': '\\x3c', '%3d': '\\x3d', '%3D': '\\x3d', '%3e': '\\x3e',\n '%3E': '\\x3e', '%3f': '\\x3f', '%3F': '\\x3f', '%40': '\\x40', '%41': '\\x41',\n '%42': '\\x42', '%43': '\\x43', '%44': '\\x44', '%45': '\\x45', '%46': '\\x46',\n '%47': '\\x47', '%48': '\\x48', '%49': '\\x49', '%4a': '\\x4a', '%4A': '\\x4a',\n '%4b': '\\x4b', '%4B': '\\x4b', '%4c': '\\x4c', '%4C': '\\x4c', '%4d': '\\x4d',\n '%4D': '\\x4d', '%4e': '\\x4e', '%4E': '\\x4e', '%4f': '\\x4f', '%4F': '\\x4f',\n '%50': '\\x50', '%51': '\\x51', '%52': '\\x52', '%53': '\\x53', '%54': '\\x54',\n '%55': '\\x55', '%56': '\\x56', '%57': '\\x57', '%58': '\\x58', '%59': '\\x59',\n '%5a': '\\x5a', '%5A': '\\x5a', '%5b': '\\x5b', '%5B': '\\x5b', '%5c': '\\x5c',\n '%5C': '\\x5c', '%5d': '\\x5d', '%5D': '\\x5d', '%5e': '\\x5e', '%5E': '\\x5e',\n '%5f': '\\x5f', '%5F': '\\x5f', '%60': '\\x60', '%61': '\\x61', '%62': '\\x62',\n '%63': '\\x63', '%64': '\\x64', '%65': '\\x65', '%66': '\\x66', '%67': '\\x67',\n '%68': '\\x68', '%69': '\\x69', '%6a': '\\x6a', '%6A': '\\x6a', '%6b': '\\x6b',\n '%6B': '\\x6b', '%6c': '\\x6c', '%6C': '\\x6c', '%6d': '\\x6d', '%6D': '\\x6d',\n '%6e': '\\x6e', '%6E': '\\x6e', '%6f': '\\x6f', '%6F': '\\x6f', '%70': '\\x70',\n '%71': '\\x71', '%72': '\\x72', '%73': '\\x73', '%74': '\\x74', '%75': '\\x75',\n '%76': '\\x76', '%77': '\\x77', '%78': '\\x78', '%79': '\\x79', '%7a': '\\x7a',\n '%7A': '\\x7a', '%7b': '\\x7b', '%7B': '\\x7b', '%7c': '\\x7c', '%7C': '\\x7c',\n '%7d': '\\x7d', '%7D': '\\x7d', '%7e': '\\x7e', '%7E': '\\x7e', '%7f': '\\x7f',\n '%7F': '\\x7f', '%80': '\\x80', '%81': '\\x81', '%82': '\\x82', '%83': '\\x83',\n '%84': '\\x84', '%85': '\\x85', '%86': '\\x86', '%87': '\\x87', '%88': '\\x88',\n '%89': '\\x89', '%8a': '\\x8a', '%8A': '\\x8a', '%8b': '\\x8b', '%8B': '\\x8b',\n '%8c': '\\x8c', '%8C': '\\x8c', '%8d': '\\x8d', '%8D': '\\x8d', '%8e': '\\x8e',\n '%8E': '\\x8e', '%8f': '\\x8f', '%8F': '\\x8f', '%90': '\\x90', '%91': '\\x91',\n '%92': '\\x92', '%93': '\\x93', '%94': '\\x94', '%95': '\\x95', '%96': '\\x96',\n '%97': '\\x97', '%98': '\\x98', '%99': '\\x99', '%9a': '\\x9a', '%9A': '\\x9a',\n '%9b': '\\x9b', '%9B': '\\x9b', '%9c': '\\x9c', '%9C': '\\x9c', '%9d': '\\x9d',\n '%9D': '\\x9d', '%9e': '\\x9e', '%9E': '\\x9e', '%9f': '\\x9f', '%9F': '\\x9f',\n '%a0': '\\xa0', '%A0': '\\xa0', '%a1': '\\xa1', '%A1': '\\xa1', '%a2': '\\xa2',\n '%A2': '\\xa2', '%a3': '\\xa3', '%A3': '\\xa3', '%a4': '\\xa4', '%A4': '\\xa4',\n '%a5': '\\xa5', '%A5': '\\xa5', '%a6': '\\xa6', '%A6': '\\xa6', '%a7': '\\xa7',\n '%A7': '\\xa7', '%a8': '\\xa8', '%A8': '\\xa8', '%a9': '\\xa9', '%A9': '\\xa9',\n '%aa': '\\xaa', '%Aa': '\\xaa', '%aA': '\\xaa', '%AA': '\\xaa', '%ab': '\\xab',\n '%Ab': '\\xab', '%aB': '\\xab', '%AB': '\\xab', '%ac': '\\xac', '%Ac': '\\xac',\n '%aC': '\\xac', '%AC': '\\xac', '%ad': '\\xad', '%Ad': '\\xad', '%aD': '\\xad',\n '%AD': '\\xad', '%ae': '\\xae', '%Ae': '\\xae', '%aE': '\\xae', '%AE': '\\xae',\n '%af': '\\xaf', '%Af': '\\xaf', '%aF': '\\xaf', '%AF': '\\xaf', '%b0': '\\xb0',\n '%B0': '\\xb0', '%b1': '\\xb1', '%B1': '\\xb1', '%b2': '\\xb2', '%B2': '\\xb2',\n '%b3': '\\xb3', '%B3': '\\xb3', '%b4': '\\xb4', '%B4': '\\xb4', '%b5': '\\xb5',\n '%B5': '\\xb5', '%b6': '\\xb6', '%B6': '\\xb6', '%b7': '\\xb7', '%B7': '\\xb7',\n '%b8': '\\xb8', '%B8': '\\xb8', '%b9': '\\xb9', '%B9': '\\xb9', '%ba': '\\xba',\n '%Ba': '\\xba', '%bA': '\\xba', '%BA': '\\xba', '%bb': '\\xbb', '%Bb': '\\xbb',\n '%bB': '\\xbb', '%BB': '\\xbb', '%bc': '\\xbc', '%Bc': '\\xbc', '%bC': '\\xbc',\n '%BC': '\\xbc', '%bd': '\\xbd', '%Bd': '\\xbd', '%bD': '\\xbd', '%BD': '\\xbd',\n '%be': '\\xbe', '%Be': '\\xbe', '%bE': '\\xbe', '%BE': '\\xbe', '%bf': '\\xbf',\n '%Bf': '\\xbf', '%bF': '\\xbf', '%BF': '\\xbf', '%c0': '\\xc0', '%C0': '\\xc0',\n '%c1': '\\xc1', '%C1': '\\xc1', '%c2': '\\xc2', '%C2': '\\xc2', '%c3': '\\xc3',\n '%C3': '\\xc3', '%c4': '\\xc4', '%C4': '\\xc4', '%c5': '\\xc5', '%C5': '\\xc5',\n '%c6': '\\xc6', '%C6': '\\xc6', '%c7': '\\xc7', '%C7': '\\xc7', '%c8': '\\xc8',\n '%C8': '\\xc8', '%c9': '\\xc9', '%C9': '\\xc9', '%ca': '\\xca', '%Ca': '\\xca',\n '%cA': '\\xca', '%CA': '\\xca', '%cb': '\\xcb', '%Cb': '\\xcb', '%cB': '\\xcb',\n '%CB': '\\xcb', '%cc': '\\xcc', '%Cc': '\\xcc', '%cC': '\\xcc', '%CC': '\\xcc',\n '%cd': '\\xcd', '%Cd': '\\xcd', '%cD': '\\xcd', '%CD': '\\xcd', '%ce': '\\xce',\n '%Ce': '\\xce', '%cE': '\\xce', '%CE': '\\xce', '%cf': '\\xcf', '%Cf': '\\xcf',\n '%cF': '\\xcf', '%CF': '\\xcf', '%d0': '\\xd0', '%D0': '\\xd0', '%d1': '\\xd1',\n '%D1': '\\xd1', '%d2': '\\xd2', '%D2': '\\xd2', '%d3': '\\xd3', '%D3': '\\xd3',\n '%d4': '\\xd4', '%D4': '\\xd4', '%d5': '\\xd5', '%D5': '\\xd5', '%d6': '\\xd6',\n '%D6': '\\xd6', '%d7': '\\xd7', '%D7': '\\xd7', '%d8': '\\xd8', '%D8': '\\xd8',\n '%d9': '\\xd9', '%D9': '\\xd9', '%da': '\\xda', '%Da': '\\xda', '%dA': '\\xda',\n '%DA': '\\xda', '%db': '\\xdb', '%Db': '\\xdb', '%dB': '\\xdb', '%DB': '\\xdb',\n '%dc': '\\xdc', '%Dc': '\\xdc', '%dC': '\\xdc', '%DC': '\\xdc', '%dd': '\\xdd',\n '%Dd': '\\xdd', '%dD': '\\xdd', '%DD': '\\xdd', '%de': '\\xde', '%De': '\\xde',\n '%dE': '\\xde', '%DE': '\\xde', '%df': '\\xdf', '%Df': '\\xdf', '%dF': '\\xdf',\n '%DF': '\\xdf', '%e0': '\\xe0', '%E0': '\\xe0', '%e1': '\\xe1', '%E1': '\\xe1',\n '%e2': '\\xe2', '%E2': '\\xe2', '%e3': '\\xe3', '%E3': '\\xe3', '%e4': '\\xe4',\n '%E4': '\\xe4', '%e5': '\\xe5', '%E5': '\\xe5', '%e6': '\\xe6', '%E6': '\\xe6',\n '%e7': '\\xe7', '%E7': '\\xe7', '%e8': '\\xe8', '%E8': '\\xe8', '%e9': '\\xe9',\n '%E9': '\\xe9', '%ea': '\\xea', '%Ea': '\\xea', '%eA': '\\xea', '%EA': '\\xea',\n '%eb': '\\xeb', '%Eb': '\\xeb', '%eB': '\\xeb', '%EB': '\\xeb', '%ec': '\\xec',\n '%Ec': '\\xec', '%eC': '\\xec', '%EC': '\\xec', '%ed': '\\xed', '%Ed': '\\xed',\n '%eD': '\\xed', '%ED': '\\xed', '%ee': '\\xee', '%Ee': '\\xee', '%eE': '\\xee',\n '%EE': '\\xee', '%ef': '\\xef', '%Ef': '\\xef', '%eF': '\\xef', '%EF': '\\xef',\n '%f0': '\\xf0', '%F0': '\\xf0', '%f1': '\\xf1', '%F1': '\\xf1', '%f2': '\\xf2',\n '%F2': '\\xf2', '%f3': '\\xf3', '%F3': '\\xf3', '%f4': '\\xf4', '%F4': '\\xf4',\n '%f5': '\\xf5', '%F5': '\\xf5', '%f6': '\\xf6', '%F6': '\\xf6', '%f7': '\\xf7',\n '%F7': '\\xf7', '%f8': '\\xf8', '%F8': '\\xf8', '%f9': '\\xf9', '%F9': '\\xf9',\n '%fa': '\\xfa', '%Fa': '\\xfa', '%fA': '\\xfa', '%FA': '\\xfa', '%fb': '\\xfb',\n '%Fb': '\\xfb', '%fB': '\\xfb', '%FB': '\\xfb', '%fc': '\\xfc', '%Fc': '\\xfc',\n '%fC': '\\xfc', '%FC': '\\xfc', '%fd': '\\xfd', '%Fd': '\\xfd', '%fD': '\\xfd',\n '%FD': '\\xfd', '%fe': '\\xfe', '%Fe': '\\xfe', '%fE': '\\xfe', '%FE': '\\xfe',\n '%ff': '\\xff', '%Ff': '\\xff', '%fF': '\\xff', '%FF': '\\xff'\n}\n\nfunction encodedReplacer (match) {\n return EncodedLookup[match]\n}\n\nconst STATE_KEY = 0\nconst STATE_VALUE = 1\nconst STATE_CHARSET = 2\nconst STATE_LANG = 3\n\nfunction parseParams (str) {\n const res = []\n let state = STATE_KEY\n let charset = ''\n let inquote = false\n let escaping = false\n let p = 0\n let tmp = ''\n const len = str.length\n\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n const char = str[i]\n if (char === '\\\\' && inquote) {\n if (escaping) { escaping = false } else {\n escaping = true\n continue\n }\n } else if (char === '\"') {\n if (!escaping) {\n if (inquote) {\n inquote = false\n state = STATE_KEY\n } else { inquote = true }\n continue\n } else { escaping = false }\n } else {\n if (escaping && inquote) { tmp += '\\\\' }\n escaping = false\n if ((state === STATE_CHARSET || state === STATE_LANG) && char === \"'\") {\n if (state === STATE_CHARSET) {\n state = STATE_LANG\n charset = tmp.substring(1)\n } else { state = STATE_VALUE }\n tmp = ''\n continue\n } else if (state === STATE_KEY &&\n (char === '*' || char === '=') &&\n res.length) {\n state = char === '*'\n ? STATE_CHARSET\n : STATE_VALUE\n res[p] = [tmp, undefined]\n tmp = ''\n continue\n } else if (!inquote && char === ';') {\n state = STATE_KEY\n if (charset) {\n if (tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n }\n charset = ''\n } else if (tmp.length) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp }\n tmp = ''\n ++p\n continue\n } else if (!inquote && (char === ' ' || char === '\\t')) { continue }\n }\n tmp += char\n }\n if (charset && tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n } else if (tmp) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n\n if (res[p] === undefined) {\n if (tmp) { res[p] = tmp }\n } else { res[p][1] = tmp }\n\n return res\n}\n\nmodule.exports = parseParams\n","// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nconst FormData$1 = require('form-data');\nconst url = require('url');\nconst proxyFromEnv = require('proxy-from-env');\nconst http = require('http');\nconst https = require('https');\nconst util = require('util');\nconst followRedirects = require('follow-redirects');\nconst zlib = require('zlib');\nconst stream = require('stream');\nconst EventEmitter = require('events');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nconst FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);\nconst url__default = /*#__PURE__*/_interopDefaultLegacy(url);\nconst http__default = /*#__PURE__*/_interopDefaultLegacy(http);\nconst https__default = /*#__PURE__*/_interopDefaultLegacy(https);\nconst util__default = /*#__PURE__*/_interopDefaultLegacy(util);\nconst followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);\nconst zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);\nconst stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);\nconst EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nconst utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData__default[\"default\"] || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nconst InterceptorManager$1 = InterceptorManager;\n\nconst transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nconst URLSearchParams = url__default[\"default\"].URLSearchParams;\n\nconst platform$1 = {\n isNode: true,\n classes: {\n URLSearchParams,\n FormData: FormData__default[\"default\"],\n Blob: typeof Blob !== 'undefined' && Blob || null\n },\n protocols: [ 'http', 'https', 'file', 'data' ]\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nconst platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nconst defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nconst parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nconst AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nconst VERSION = \"1.6.7\";\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\nconst DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n * Parse data uri to a Buffer or Blob\n *\n * @param {String} uri\n * @param {?Boolean} asBlob\n * @param {?Object} options\n * @param {?Function} options.Blob\n *\n * @returns {Buffer|Blob}\n */\nfunction fromDataURI(uri, asBlob, options) {\n const _Blob = options && options.Blob || platform.classes.Blob;\n const protocol = parseProtocol(uri);\n\n if (asBlob === undefined && _Blob) {\n asBlob = true;\n }\n\n if (protocol === 'data') {\n uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n\n const match = DATA_URL_PATTERN.exec(uri);\n\n if (!match) {\n throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);\n }\n\n const mime = match[1];\n const isBase64 = match[2];\n const body = match[3];\n const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n\n if (asBlob) {\n if (!_Blob) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n return new _Blob([buffer], {type: mime});\n }\n\n return buffer;\n }\n\n throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);\n}\n\n/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n const threshold = 1000 / freq;\n let timer = null;\n return function throttled(force, args) {\n const now = Date.now();\n if (force || now - timestamp > threshold) {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n timestamp = now;\n return fn.apply(null, args);\n }\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n timestamp = Date.now();\n return fn.apply(null, args);\n }, threshold - (now - timestamp));\n }\n };\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nconst kInternals = Symbol('internals');\n\nclass AxiosTransformStream extends stream__default[\"default\"].Transform{\n constructor(options) {\n options = utils$1.toFlatObject(options, {\n maxRate: 0,\n chunkSize: 64 * 1024,\n minChunkSize: 100,\n timeWindow: 500,\n ticksRate: 2,\n samplesCount: 15\n }, null, (prop, source) => {\n return !utils$1.isUndefined(source[prop]);\n });\n\n super({\n readableHighWaterMark: options.chunkSize\n });\n\n const self = this;\n\n const internals = this[kInternals] = {\n length: options.length,\n timeWindow: options.timeWindow,\n ticksRate: options.ticksRate,\n chunkSize: options.chunkSize,\n maxRate: options.maxRate,\n minChunkSize: options.minChunkSize,\n bytesSeen: 0,\n isCaptured: false,\n notifiedBytesLoaded: 0,\n ts: Date.now(),\n bytes: 0,\n onReadCallback: null\n };\n\n const _speedometer = speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow);\n\n this.on('newListener', event => {\n if (event === 'progress') {\n if (!internals.isCaptured) {\n internals.isCaptured = true;\n }\n }\n });\n\n let bytesNotified = 0;\n\n internals.updateProgress = throttle(function throttledHandler() {\n const totalBytes = internals.length;\n const bytesTransferred = internals.bytesSeen;\n const progressBytes = bytesTransferred - bytesNotified;\n if (!progressBytes || self.destroyed) return;\n\n const rate = _speedometer(progressBytes);\n\n bytesNotified = bytesTransferred;\n\n process.nextTick(() => {\n self.emit('progress', {\n 'loaded': bytesTransferred,\n 'total': totalBytes,\n 'progress': totalBytes ? (bytesTransferred / totalBytes) : undefined,\n 'bytes': progressBytes,\n 'rate': rate ? rate : undefined,\n 'estimated': rate && totalBytes && bytesTransferred <= totalBytes ?\n (totalBytes - bytesTransferred) / rate : undefined\n });\n });\n }, internals.ticksRate);\n\n const onFinish = () => {\n internals.updateProgress(true);\n };\n\n this.once('end', onFinish);\n this.once('error', onFinish);\n }\n\n _read(size) {\n const internals = this[kInternals];\n\n if (internals.onReadCallback) {\n internals.onReadCallback();\n }\n\n return super._read(size);\n }\n\n _transform(chunk, encoding, callback) {\n const self = this;\n const internals = this[kInternals];\n const maxRate = internals.maxRate;\n\n const readableHighWaterMark = this.readableHighWaterMark;\n\n const timeWindow = internals.timeWindow;\n\n const divider = 1000 / timeWindow;\n const bytesThreshold = (maxRate / divider);\n const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;\n\n function pushChunk(_chunk, _callback) {\n const bytes = Buffer.byteLength(_chunk);\n internals.bytesSeen += bytes;\n internals.bytes += bytes;\n\n if (internals.isCaptured) {\n internals.updateProgress();\n }\n\n if (self.push(_chunk)) {\n process.nextTick(_callback);\n } else {\n internals.onReadCallback = () => {\n internals.onReadCallback = null;\n process.nextTick(_callback);\n };\n }\n }\n\n const transformChunk = (_chunk, _callback) => {\n const chunkSize = Buffer.byteLength(_chunk);\n let chunkRemainder = null;\n let maxChunkSize = readableHighWaterMark;\n let bytesLeft;\n let passed = 0;\n\n if (maxRate) {\n const now = Date.now();\n\n if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {\n internals.ts = now;\n bytesLeft = bytesThreshold - internals.bytes;\n internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;\n passed = 0;\n }\n\n bytesLeft = bytesThreshold - internals.bytes;\n }\n\n if (maxRate) {\n if (bytesLeft <= 0) {\n // next time window\n return setTimeout(() => {\n _callback(null, _chunk);\n }, timeWindow - passed);\n }\n\n if (bytesLeft < maxChunkSize) {\n maxChunkSize = bytesLeft;\n }\n }\n\n if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {\n chunkRemainder = _chunk.subarray(maxChunkSize);\n _chunk = _chunk.subarray(0, maxChunkSize);\n }\n\n pushChunk(_chunk, chunkRemainder ? () => {\n process.nextTick(_callback, null, chunkRemainder);\n } : _callback);\n };\n\n transformChunk(chunk, function transformNextChunk(err, _chunk) {\n if (err) {\n return callback(err);\n }\n\n if (_chunk) {\n transformChunk(_chunk, transformNextChunk);\n } else {\n callback(null);\n }\n });\n }\n\n setLength(length) {\n this[kInternals].length = +length;\n return this;\n }\n}\n\nconst AxiosTransformStream$1 = AxiosTransformStream;\n\nconst {asyncIterator} = Symbol;\n\nconst readBlob = async function* (blob) {\n if (blob.stream) {\n yield* blob.stream();\n } else if (blob.arrayBuffer) {\n yield await blob.arrayBuffer();\n } else if (blob[asyncIterator]) {\n yield* blob[asyncIterator]();\n } else {\n yield blob;\n }\n};\n\nconst readBlob$1 = readBlob;\n\nconst BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';\n\nconst textEncoder = new util.TextEncoder();\n\nconst CRLF = '\\r\\n';\nconst CRLF_BYTES = textEncoder.encode(CRLF);\nconst CRLF_BYTES_COUNT = 2;\n\nclass FormDataPart {\n constructor(name, value) {\n const {escapeName} = this.constructor;\n const isStringValue = utils$1.isString(value);\n\n let headers = `Content-Disposition: form-data; name=\"${escapeName(name)}\"${\n !isStringValue && value.name ? `; filename=\"${escapeName(value.name)}\"` : ''\n }${CRLF}`;\n\n if (isStringValue) {\n value = textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g, CRLF));\n } else {\n headers += `Content-Type: ${value.type || \"application/octet-stream\"}${CRLF}`;\n }\n\n this.headers = textEncoder.encode(headers + CRLF);\n\n this.contentLength = isStringValue ? value.byteLength : value.size;\n\n this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;\n\n this.name = name;\n this.value = value;\n }\n\n async *encode(){\n yield this.headers;\n\n const {value} = this;\n\n if(utils$1.isTypedArray(value)) {\n yield value;\n } else {\n yield* readBlob$1(value);\n }\n\n yield CRLF_BYTES;\n }\n\n static escapeName(name) {\n return String(name).replace(/[\\r\\n\"]/g, (match) => ({\n '\\r' : '%0D',\n '\\n' : '%0A',\n '\"' : '%22',\n }[match]));\n }\n}\n\nconst formDataToStream = (form, headersHandler, options) => {\n const {\n tag = 'form-data-boundary',\n size = 25,\n boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)\n } = options || {};\n\n if(!utils$1.isFormData(form)) {\n throw TypeError('FormData instance required');\n }\n\n if (boundary.length < 1 || boundary.length > 70) {\n throw Error('boundary must be 10-70 characters long')\n }\n\n const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);\n const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);\n let contentLength = footerBytes.byteLength;\n\n const parts = Array.from(form.entries()).map(([name, value]) => {\n const part = new FormDataPart(name, value);\n contentLength += part.size;\n return part;\n });\n\n contentLength += boundaryBytes.byteLength * parts.length;\n\n contentLength = utils$1.toFiniteNumber(contentLength);\n\n const computedHeaders = {\n 'Content-Type': `multipart/form-data; boundary=${boundary}`\n };\n\n if (Number.isFinite(contentLength)) {\n computedHeaders['Content-Length'] = contentLength;\n }\n\n headersHandler && headersHandler(computedHeaders);\n\n return stream.Readable.from((async function *() {\n for(const part of parts) {\n yield boundaryBytes;\n yield* part.encode();\n }\n\n yield footerBytes;\n })());\n};\n\nconst formDataToStream$1 = formDataToStream;\n\nclass ZlibHeaderTransformStream extends stream__default[\"default\"].Transform {\n __transform(chunk, encoding, callback) {\n this.push(chunk);\n callback();\n }\n\n _transform(chunk, encoding, callback) {\n if (chunk.length !== 0) {\n this._transform = this.__transform;\n\n // Add Default Compression headers if no zlib headers are present\n if (chunk[0] !== 120) { // Hex: 78\n const header = Buffer.alloc(2);\n header[0] = 120; // Hex: 78\n header[1] = 156; // Hex: 9C \n this.push(header, encoding);\n }\n }\n\n this.__transform(chunk, encoding, callback);\n }\n}\n\nconst ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;\n\nconst callbackify = (fn, reducer) => {\n return utils$1.isAsyncFn(fn) ? function (...args) {\n const cb = args.pop();\n fn.apply(this, args).then((value) => {\n try {\n reducer ? cb(null, ...reducer(value)) : cb(null, value);\n } catch (err) {\n cb(err);\n }\n }, cb);\n } : fn;\n};\n\nconst callbackify$1 = callbackify;\n\nconst zlibOptions = {\n flush: zlib__default[\"default\"].constants.Z_SYNC_FLUSH,\n finishFlush: zlib__default[\"default\"].constants.Z_SYNC_FLUSH\n};\n\nconst brotliOptions = {\n flush: zlib__default[\"default\"].constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib__default[\"default\"].constants.BROTLI_OPERATION_FLUSH\n};\n\nconst isBrotliSupported = utils$1.isFunction(zlib__default[\"default\"].createBrotliDecompress);\n\nconst {http: httpFollow, https: httpsFollow} = followRedirects__default[\"default\"];\n\nconst isHttps = /https:?/;\n\nconst supportedProtocols = platform.protocols.map(protocol => {\n return protocol + ':';\n});\n\n/**\n * If the proxy or config beforeRedirects functions are defined, call them with the options\n * object.\n *\n * @param {Object} options - The options object that was passed to the request.\n *\n * @returns {Object}\n */\nfunction dispatchBeforeRedirect(options, responseDetails) {\n if (options.beforeRedirects.proxy) {\n options.beforeRedirects.proxy(options);\n }\n if (options.beforeRedirects.config) {\n options.beforeRedirects.config(options, responseDetails);\n }\n}\n\n/**\n * If the proxy or config afterRedirects functions are defined, call them with the options\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} configProxy configuration from Axios options object\n * @param {string} location\n *\n * @returns {http.ClientRequestArgs}\n */\nfunction setProxy(options, configProxy, location) {\n let proxy = configProxy;\n if (!proxy && proxy !== false) {\n const proxyUrl = proxyFromEnv.getProxyForUrl(location);\n if (proxyUrl) {\n proxy = new URL(proxyUrl);\n }\n }\n if (proxy) {\n // Basic proxy authorization\n if (proxy.username) {\n proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');\n }\n\n if (proxy.auth) {\n // Support proxy auth object form\n if (proxy.auth.username || proxy.auth.password) {\n proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');\n }\n const base64 = Buffer\n .from(proxy.auth, 'utf8')\n .toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n options.headers.host = options.hostname + (options.port ? ':' + options.port : '');\n const proxyHost = proxy.hostname || proxy.host;\n options.hostname = proxyHost;\n // Replace 'host' since options is not a URL object\n options.host = proxyHost;\n options.port = proxy.port;\n options.path = location;\n if (proxy.protocol) {\n options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;\n }\n }\n\n options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {\n // Configure proxy for redirected request, passing the original config proxy to apply\n // the exact same logic as if the redirected request was performed by axios directly.\n setProxy(redirectOptions, configProxy, redirectOptions.href);\n };\n}\n\nconst isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process';\n\n// temporary hotfix\n\nconst wrapAsync = (asyncExecutor) => {\n return new Promise((resolve, reject) => {\n let onDone;\n let isDone;\n\n const done = (value, isRejected) => {\n if (isDone) return;\n isDone = true;\n onDone && onDone(value, isRejected);\n };\n\n const _resolve = (value) => {\n done(value);\n resolve(value);\n };\n\n const _reject = (reason) => {\n done(reason, true);\n reject(reason);\n };\n\n asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);\n })\n};\n\nconst resolveFamily = ({address, family}) => {\n if (!utils$1.isString(address)) {\n throw TypeError('address must be a string');\n }\n return ({\n address,\n family: family || (address.indexOf('.') < 0 ? 6 : 4)\n });\n};\n\nconst buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family});\n\n/*eslint consistent-return:0*/\nconst httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {\n return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {\n let {data, lookup, family} = config;\n const {responseType, responseEncoding} = config;\n const method = config.method.toUpperCase();\n let isDone;\n let rejected = false;\n let req;\n\n if (lookup) {\n const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);\n // hotfix to support opt.all option which is required for node 20.x\n lookup = (hostname, opt, cb) => {\n _lookup(hostname, opt, (err, arg0, arg1) => {\n if (err) {\n return cb(err);\n }\n\n const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];\n\n opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);\n });\n };\n }\n\n // temporary internal emitter until the AxiosRequest class will be implemented\n const emitter = new EventEmitter__default[\"default\"]();\n\n const onFinished = () => {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(abort);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', abort);\n }\n\n emitter.removeAllListeners();\n };\n\n onDone((value, isRejected) => {\n isDone = true;\n if (isRejected) {\n rejected = true;\n onFinished();\n }\n });\n\n function abort(reason) {\n emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);\n }\n\n emitter.once('abort', reject);\n\n if (config.cancelToken || config.signal) {\n config.cancelToken && config.cancelToken.subscribe(abort);\n if (config.signal) {\n config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);\n }\n }\n\n // Parse url\n const fullPath = buildFullPath(config.baseURL, config.url);\n const parsed = new URL(fullPath, 'http://localhost');\n const protocol = parsed.protocol || supportedProtocols[0];\n\n if (protocol === 'data:') {\n let convertedData;\n\n if (method !== 'GET') {\n return settle(resolve, reject, {\n status: 405,\n statusText: 'method not allowed',\n headers: {},\n config\n });\n }\n\n try {\n convertedData = fromDataURI(config.url, responseType === 'blob', {\n Blob: config.env && config.env.Blob\n });\n } catch (err) {\n throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);\n }\n\n if (responseType === 'text') {\n convertedData = convertedData.toString(responseEncoding);\n\n if (!responseEncoding || responseEncoding === 'utf8') {\n convertedData = utils$1.stripBOM(convertedData);\n }\n } else if (responseType === 'stream') {\n convertedData = stream__default[\"default\"].Readable.from(convertedData);\n }\n\n return settle(resolve, reject, {\n data: convertedData,\n status: 200,\n statusText: 'OK',\n headers: new AxiosHeaders$1(),\n config\n });\n }\n\n if (supportedProtocols.indexOf(protocol) === -1) {\n return reject(new AxiosError(\n 'Unsupported protocol ' + protocol,\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n const headers = AxiosHeaders$1.from(config.headers).normalize();\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n // User-Agent is specified; handle case where no UA header is desired\n // Only set header if it hasn't been set in config\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const onDownloadProgress = config.onDownloadProgress;\n const onUploadProgress = config.onUploadProgress;\n const maxRate = config.maxRate;\n let maxUploadRate = undefined;\n let maxDownloadRate = undefined;\n\n // support for spec compliant FormData objects\n if (utils$1.isSpecCompliantForm(data)) {\n const userBoundary = headers.getContentType(/boundary=([-_\\w\\d]{10,70})/i);\n\n data = formDataToStream$1(data, (formHeaders) => {\n headers.set(formHeaders);\n }, {\n tag: `axios-${VERSION}-boundary`,\n boundary: userBoundary && userBoundary[1] || undefined\n });\n // support for https://www.npmjs.com/package/form-data api\n } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {\n headers.set(data.getHeaders());\n\n if (!headers.hasContentLength()) {\n try {\n const knownLength = await util__default[\"default\"].promisify(data.getLength).call(data);\n Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);\n /*eslint no-empty:0*/\n } catch (e) {\n }\n }\n } else if (utils$1.isBlob(data)) {\n data.size && headers.setContentType(data.type || 'application/octet-stream');\n headers.setContentLength(data.size || 0);\n data = stream__default[\"default\"].Readable.from(readBlob$1(data));\n } else if (data && !utils$1.isStream(data)) {\n if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils$1.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(new AxiosError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers.setContentLength(data.length, false);\n\n if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {\n return reject(new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n }\n\n const contentLength = utils$1.toFiniteNumber(headers.getContentLength());\n\n if (utils$1.isArray(maxRate)) {\n maxUploadRate = maxRate[0];\n maxDownloadRate = maxRate[1];\n } else {\n maxUploadRate = maxDownloadRate = maxRate;\n }\n\n if (data && (onUploadProgress || maxUploadRate)) {\n if (!utils$1.isStream(data)) {\n data = stream__default[\"default\"].Readable.from(data, {objectMode: false});\n }\n\n data = stream__default[\"default\"].pipeline([data, new AxiosTransformStream$1({\n length: contentLength,\n maxRate: utils$1.toFiniteNumber(maxUploadRate)\n })], utils$1.noop);\n\n onUploadProgress && data.on('progress', progress => {\n onUploadProgress(Object.assign(progress, {\n upload: true\n }));\n });\n }\n\n // HTTP basic authentication\n let auth = undefined;\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n if (!auth && parsed.username) {\n const urlUsername = parsed.username;\n const urlPassword = parsed.password;\n auth = urlUsername + ':' + urlPassword;\n }\n\n auth && headers.delete('authorization');\n\n let path;\n\n try {\n path = buildURL(\n parsed.pathname + parsed.search,\n config.params,\n config.paramsSerializer\n ).replace(/^\\?/, '');\n } catch (err) {\n const customErr = new Error(err.message);\n customErr.config = config;\n customErr.url = config.url;\n customErr.exists = true;\n return reject(customErr);\n }\n\n headers.set(\n 'Accept-Encoding',\n 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false\n );\n\n const options = {\n path,\n method: method,\n headers: headers.toJSON(),\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth,\n protocol,\n family,\n beforeRedirect: dispatchBeforeRedirect,\n beforeRedirects: {}\n };\n\n // cacheable-lookup integration hotfix\n !utils$1.isUndefined(lookup) && (options.lookup = lookup);\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname;\n options.port = parsed.port;\n setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n let transport;\n const isHttpsRequest = isHttps.test(options.protocol);\n options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsRequest ? https__default[\"default\"] : http__default[\"default\"];\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n if (config.beforeRedirect) {\n options.beforeRedirects.config = config.beforeRedirect;\n }\n transport = isHttpsRequest ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n } else {\n // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited\n options.maxBodyLength = Infinity;\n }\n\n if (config.insecureHTTPParser) {\n options.insecureHTTPParser = config.insecureHTTPParser;\n }\n\n // Create the request\n req = transport.request(options, function handleResponse(res) {\n if (req.destroyed) return;\n\n const streams = [res];\n\n const responseLength = +res.headers['content-length'];\n\n if (onDownloadProgress) {\n const transformStream = new AxiosTransformStream$1({\n length: utils$1.toFiniteNumber(responseLength),\n maxRate: utils$1.toFiniteNumber(maxDownloadRate)\n });\n\n onDownloadProgress && transformStream.on('progress', progress => {\n onDownloadProgress(Object.assign(progress, {\n download: true\n }));\n });\n\n streams.push(transformStream);\n }\n\n // decompress the response body transparently if required\n let responseStream = res;\n\n // return the last request in case of redirects\n const lastRequest = res.req || req;\n\n // if decompress disabled we should not decompress\n if (config.decompress !== false && res.headers['content-encoding']) {\n // if no content, but headers still say that it is encoded,\n // remove the header not confuse downstream operations\n if (method === 'HEAD' || res.statusCode === 204) {\n delete res.headers['content-encoding'];\n }\n\n switch ((res.headers['content-encoding'] || '').toLowerCase()) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'x-gzip':\n case 'compress':\n case 'x-compress':\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib__default[\"default\"].createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'deflate':\n streams.push(new ZlibHeaderTransformStream$1());\n\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib__default[\"default\"].createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'br':\n if (isBrotliSupported) {\n streams.push(zlib__default[\"default\"].createBrotliDecompress(brotliOptions));\n delete res.headers['content-encoding'];\n }\n }\n }\n\n responseStream = streams.length > 1 ? stream__default[\"default\"].pipeline(streams, utils$1.noop) : streams[0];\n\n const offListeners = stream__default[\"default\"].finished(responseStream, () => {\n offListeners();\n onFinished();\n });\n\n const response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: new AxiosHeaders$1(res.headers),\n config,\n request: lastRequest\n };\n\n if (responseType === 'stream') {\n response.data = responseStream;\n settle(resolve, reject, response);\n } else {\n const responseBuffer = [];\n let totalResponseBytes = 0;\n\n responseStream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n // stream.destroy() emit aborted event before calling reject() on Node.js v16\n rejected = true;\n responseStream.destroy();\n reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE, config, lastRequest));\n }\n });\n\n responseStream.on('aborted', function handlerStreamAborted() {\n if (rejected) {\n return;\n }\n\n const err = new AxiosError(\n 'maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n lastRequest\n );\n responseStream.destroy(err);\n reject(err);\n });\n\n responseStream.on('error', function handleStreamError(err) {\n if (req.destroyed) return;\n reject(AxiosError.from(err, null, config, lastRequest));\n });\n\n responseStream.on('end', function handleStreamEnd() {\n try {\n let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);\n if (responseType !== 'arraybuffer') {\n responseData = responseData.toString(responseEncoding);\n if (!responseEncoding || responseEncoding === 'utf8') {\n responseData = utils$1.stripBOM(responseData);\n }\n }\n response.data = responseData;\n } catch (err) {\n return reject(AxiosError.from(err, null, config, response.request, response));\n }\n settle(resolve, reject, response);\n });\n }\n\n emitter.once('abort', err => {\n if (!responseStream.destroyed) {\n responseStream.emit('error', err);\n responseStream.destroy();\n }\n });\n });\n\n emitter.once('abort', err => {\n reject(err);\n req.destroy(err);\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n // @todo remove\n // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;\n reject(AxiosError.from(err, null, config, req));\n });\n\n // set tcp keep alive to prevent drop connection by peer\n req.on('socket', function handleRequestSocket(socket) {\n // default interval of sending ack packet is 1 minute\n socket.setKeepAlive(true, 1000 * 60);\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n const timeout = parseInt(config.timeout, 10);\n\n if (Number.isNaN(timeout)) {\n reject(new AxiosError(\n 'error trying to parse `config.timeout` to int',\n AxiosError.ERR_BAD_OPTION_VALUE,\n config,\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devouring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n if (isDone) return;\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n req\n ));\n abort();\n });\n }\n\n\n // Send the request\n if (utils$1.isStream(data)) {\n let ended = false;\n let errored = false;\n\n data.on('end', () => {\n ended = true;\n });\n\n data.once('error', err => {\n errored = true;\n req.destroy(err);\n });\n\n data.on('close', () => {\n if (!ended && !errored) {\n abort(new CanceledError('Request stream has been aborted', config, req));\n }\n });\n\n data.pipe(req);\n } else {\n req.end(data);\n }\n });\n};\n\nconst cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\nconst isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nconst xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nconst adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nconst validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nconst Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nconst CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nconst HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target, src) {\n if (target === void 0) {\n target = {};\n }\n if (src === void 0) {\n src = {};\n }\n Object.keys(src).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\nconst ssrDocument = {\n body: {},\n addEventListener() {},\n removeEventListener() {},\n activeElement: {\n blur() {},\n nodeName: ''\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() {}\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() {},\n getElementsByTagName() {\n return [];\n }\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n }\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: ''\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n },\n history: {\n replaceState() {},\n pushState() {},\n go() {},\n back() {}\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() {},\n removeEventListener() {},\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n }\n };\n },\n Image() {},\n Date() {},\n screen: {},\n setTimeout() {},\n clearTimeout() {},\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n }\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { getWindow as a, getDocument as g };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\n\nfunction classesToTokens(classes) {\n if (classes === void 0) {\n classes = '';\n }\n return classes.trim().split(' ').filter(c => !!c.trim());\n}\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n}\nfunction nextTick(callback, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setTimeout(callback, delay);\n}\nfunction now() {\n return Date.now();\n}\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n if (!style) {\n style = el.style;\n }\n return style;\n}\nfunction getTranslate(el, axis) {\n if (axis === void 0) {\n axis = 'x';\n }\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n}\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\nfunction extend() {\n const to = Object(arguments.length <= 0 ? undefined : arguments[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n for (let i = 1; i < arguments.length; i += 1) {\n const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n}\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\nfunction animateCSSModeScroll(_ref) {\n let {\n swiper,\n targetPosition,\n side\n } = _ref;\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n const animate = () => {\n time = new Date().getTime();\n if (startTime === null) {\n startTime = time;\n }\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n animate();\n}\nfunction getSlideTransformEl(slideEl) {\n return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl;\n}\nfunction elementChildren(element, selector) {\n if (selector === void 0) {\n selector = '';\n }\n return [...element.children].filter(el => el.matches(selector));\n}\nfunction showWarning(text) {\n try {\n console.warn(text);\n return;\n } catch (err) {\n // err\n }\n}\nfunction createElement(tag, classes) {\n if (classes === void 0) {\n classes = [];\n }\n const el = document.createElement(tag);\n el.classList.add(...(Array.isArray(classes) ? classes : classesToTokens(classes)));\n return el;\n}\nfunction elementOffset(el) {\n const window = getWindow();\n const document = getDocument();\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n}\nfunction elementPrevAll(el, selector) {\n const prevEls = [];\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n if (selector) {\n if (prev.matches(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n el = prev;\n }\n return prevEls;\n}\nfunction elementNextAll(el, selector) {\n const nextEls = [];\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n if (selector) {\n if (next.matches(selector)) nextEls.push(next);\n } else nextEls.push(next);\n el = next;\n }\n return nextEls;\n}\nfunction elementStyle(el, prop) {\n const window = getWindow();\n return window.getComputedStyle(el, null).getPropertyValue(prop);\n}\nfunction elementIndex(el) {\n let child = el;\n let i;\n if (child) {\n i = 0;\n // eslint-disable-next-line\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n return i;\n }\n return undefined;\n}\nfunction elementParents(el, selector) {\n const parents = []; // eslint-disable-line\n let parent = el.parentElement; // eslint-disable-line\n while (parent) {\n if (selector) {\n if (parent.matches(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\nfunction elementTransitionEnd(el, callback) {\n function fireCallBack(e) {\n if (e.target !== el) return;\n callback.call(el, e);\n el.removeEventListener('transitionend', fireCallBack);\n }\n if (callback) {\n el.addEventListener('transitionend', fireCallBack);\n }\n}\nfunction elementOuterSize(el, size, includeMargins) {\n const window = getWindow();\n if (includeMargins) {\n return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom'));\n }\n return el.offsetWidth;\n}\nfunction makeElementsArray(el) {\n return (Array.isArray(el) ? el : [el]).filter(e => !!e);\n}\n\nexport { elementParents as a, elementOffset as b, createElement as c, now as d, elementChildren as e, elementOuterSize as f, elementIndex as g, classesToTokens as h, getTranslate as i, elementTransitionEnd as j, isObject as k, getSlideTransformEl as l, makeElementsArray as m, nextTick as n, elementStyle as o, elementNextAll as p, elementPrevAll as q, animateCSSModeScroll as r, setCSSProperty as s, showWarning as t, extend as u, deleteProps as v };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\nimport { a as elementParents, o as elementStyle, e as elementChildren, s as setCSSProperty, f as elementOuterSize, p as elementNextAll, q as elementPrevAll, i as getTranslate, r as animateCSSModeScroll, n as nextTick, t as showWarning, c as createElement, d as now, u as extend, g as elementIndex, v as deleteProps } from './utils.mjs';\n\nlet support;\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)\n };\n}\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n return support;\n}\n\nlet deviceCached;\nfunction calcDevice(_temp) {\n let {\n userAgent\n } = _temp === void 0 ? {} : _temp;\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n }\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n\n // Export object\n return device;\n}\nfunction getDevice(overrides) {\n if (overrides === void 0) {\n overrides = {};\n }\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n return deviceCached;\n}\n\nlet browser;\nfunction calcBrowser() {\n const window = getWindow();\n const device = getDevice();\n let needPerspectiveFix = false;\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n if (isSafari()) {\n const ua = String(window.navigator.userAgent);\n if (ua.includes('Version/')) {\n const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));\n needPerspectiveFix = major < 16 || major === 16 && minor < 2;\n }\n }\n const isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent);\n const isSafariBrowser = isSafari();\n const need3dFix = isSafariBrowser || isWebView && device.ios;\n return {\n isSafari: needPerspectiveFix || isSafariBrowser,\n needPerspectiveFix,\n need3dFix,\n isWebView\n };\n}\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n return browser;\n}\n\nfunction Resize(_ref) {\n let {\n swiper,\n on,\n emit\n } = _ref;\n const window = getWindow();\n let observer = null;\n let animationFrame = null;\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n animationFrame = window.requestAnimationFrame(() => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(_ref2 => {\n let {\n contentBoxSize,\n contentRect,\n target\n } = _ref2;\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n });\n observer.observe(swiper.el);\n };\n const removeObserver = () => {\n if (animationFrame) {\n window.cancelAnimationFrame(animationFrame);\n }\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}\n\nfunction Observer(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const observers = [];\n const window = getWindow();\n const attach = function (target, options) {\n if (options === void 0) {\n options = {};\n }\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (swiper.__preventObserver__) return;\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n const init = () => {\n if (!swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = elementParents(swiper.hostEl);\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n }\n // Observe container\n attach(swiper.hostEl, {\n childList: swiper.params.observeSlideChildren\n });\n\n // Observe wrapper\n attach(swiper.wrapperEl, {\n attributes: false\n });\n };\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}\n\n/* eslint-disable no-underscore-dangle */\n\nvar eventsEmitter = {\n on(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n once(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n function onceHandler() {\n self.off(events, onceHandler);\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n handler.apply(self, args);\n }\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n onAny(handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n return self;\n },\n offAny(handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n return self;\n },\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n emit() {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n};\n\nfunction updateSize() {\n const swiper = this;\n let width;\n let height;\n const el = swiper.el;\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = el.clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = el.clientHeight;\n }\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n }\n\n // Subtract paddings\n width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);\n height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}\n\nfunction updateSlides() {\n const swiper = this;\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0);\n }\n const params = swiper.params;\n const {\n wrapperEl,\n slidesEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n swiper.virtualSize = -spaceBetween;\n\n // reset margins\n slides.forEach(slideEl => {\n if (rtl) {\n slideEl.style.marginLeft = '';\n } else {\n slideEl.style.marginRight = '';\n }\n slideEl.style.marginBottom = '';\n slideEl.style.marginTop = '';\n });\n\n // reset cssMode offsets\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');\n }\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n if (gridEnabled) {\n swiper.grid.initSlides(slides);\n } else if (swiper.grid) {\n swiper.grid.unsetSlides();\n }\n\n // Calc slides\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n let slide;\n if (slides[i]) slide = slides[i];\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slides);\n }\n if (slides[i] && elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[swiper.getDirectionLabel('width')] = ``;\n }\n const slideStyles = getComputedStyle(slide);\n const currentTransform = slide.style.transform;\n const currentWebKitTransform = slide.style.webkitTransform;\n if (currentTransform) {\n slide.style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width', true) : elementOuterSize(slide, 'height', true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide;\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n if (currentTransform) {\n slide.style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n if (slides[i]) {\n slides[i].style[swiper.getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (params.setWrapperSize) {\n wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid);\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n if (isVirtual && params.loop) {\n const size = slidesSizesGrid[0] + spaceBetween;\n if (params.slidesPerGroup > 1) {\n const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);\n const groupSize = size * params.slidesPerGroup;\n for (let i = 0; i < groups; i += 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);\n }\n }\n for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {\n if (params.slidesPerGroup === 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + size);\n }\n slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);\n swiper.virtualSize += size;\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n if (spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : swiper.getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode || params.loop) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n }).forEach(slideEl => {\n slideEl.style[key] = `${spaceBetween}px`;\n });\n }\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap <= 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n swiper.emit('slidesUpdated');\n if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {\n const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;\n const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);\n if (slidesLength <= params.maxBackfaceHiddenSlides) {\n if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);\n } else if (hasClassBackfaceClassAdded) {\n swiper.el.classList.remove(backFaceHiddenClass);\n }\n }\n}\n\nfunction updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides[swiper.getSlideIndexByData(index)];\n }\n return swiper.slides[index];\n };\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n (swiper.visibleSlides || []).forEach(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;\n}\n\nfunction updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n // eslint-disable-next-line\n const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();\n }\n}\n\nfunction updateSlidesProgress(translate) {\n if (translate === void 0) {\n translate = this && this.translate || 0;\n }\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n\n // Visible Slides\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass);\n });\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n let spaceBetween = params.spaceBetween;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides[i].classList.add(params.slideVisibleClass);\n }\n if (isFullyVisible) {\n slides[i].classList.add(params.slideFullyVisibleClass);\n }\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n}\n\nfunction updateProgress(translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd,\n progressLoop\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;\n const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;\n isBeginning = isBeginningRounded || progress <= 0;\n isEnd = isEndRounded || progress >= 1;\n if (isBeginningRounded) progress = 0;\n if (isEndRounded) progress = 1;\n }\n if (params.loop) {\n const firstSlideIndex = swiper.getSlideIndexByData(0);\n const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);\n const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];\n const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];\n const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];\n const translateAbs = Math.abs(translate);\n if (translateAbs >= firstSlideTranslate) {\n progressLoop = (translateAbs - firstSlideTranslate) / translateMax;\n } else {\n progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;\n }\n if (progressLoop > 1) progressLoop -= 1;\n }\n Object.assign(swiper, {\n progress,\n progressLoop,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n swiper.emit('progress', progress);\n}\n\nfunction updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n slidesEl,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n const getFilteredSlide = selector => {\n return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];\n };\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n });\n let activeSlide;\n let prevSlide;\n let nextSlide;\n if (isVirtual) {\n if (params.loop) {\n let slideIndex = activeIndex - swiper.virtual.slidesBefore;\n if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;\n if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${slideIndex}\"]`);\n } else {\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${activeIndex}\"]`);\n }\n } else {\n if (gridEnabled) {\n activeSlide = slides.filter(slideEl => slideEl.column === activeIndex)[0];\n nextSlide = slides.filter(slideEl => slideEl.column === activeIndex + 1)[0];\n prevSlide = slides.filter(slideEl => slideEl.column === activeIndex - 1)[0];\n } else {\n activeSlide = slides[activeIndex];\n }\n }\n if (activeSlide) {\n // Active classes\n activeSlide.classList.add(params.slideActiveClass);\n if (gridEnabled) {\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n } else {\n // Next Slide\n nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !nextSlide) {\n nextSlide = slides[0];\n }\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n\n // Prev Slide\n prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !prevSlide === 0) {\n prevSlide = slides[slides.length - 1];\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n }\n }\n swiper.emitSlidesClasses();\n}\n\nconst processLazyPreloader = (swiper, imageEl) => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;\n const slideEl = imageEl.closest(slideSelector());\n if (slideEl) {\n let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (!lazyEl && swiper.isElement) {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n } else {\n // init later\n requestAnimationFrame(() => {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (lazyEl) lazyEl.remove();\n }\n });\n }\n }\n if (lazyEl) lazyEl.remove();\n }\n};\nconst unlazy = (swiper, index) => {\n if (!swiper.slides[index]) return;\n const imageEl = swiper.slides[index].querySelector('[loading=\"lazy\"]');\n if (imageEl) imageEl.removeAttribute('loading');\n};\nconst preload = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n let amount = swiper.params.lazyPreloadPrevNext;\n const len = swiper.slides.length;\n if (!len || !amount || amount < 0) return;\n amount = Math.min(amount, len);\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);\n const activeIndex = swiper.activeIndex;\n if (swiper.params.grid && swiper.params.grid.rows > 1) {\n const activeColumn = activeIndex;\n const preloadColumns = [activeColumn - amount];\n preloadColumns.push(...Array.from({\n length: amount\n }).map((_, i) => {\n return activeColumn + slidesPerView + i;\n }));\n swiper.slides.forEach((slideEl, i) => {\n if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);\n });\n return;\n }\n const slideIndexLastInView = activeIndex + slidesPerView - 1;\n if (swiper.params.rewind || swiper.params.loop) {\n for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {\n const realIndex = (i % len + len) % len;\n if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);\n }\n } else {\n for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {\n if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {\n unlazy(swiper, i);\n }\n }\n }\n};\n\nfunction getActiveIndexByTranslate(swiper) {\n const {\n slidesGrid,\n params\n } = swiper;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n let activeIndex;\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n return activeIndex;\n}\nfunction updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n const getVirtualRealIndex = aIndex => {\n let realIndex = aIndex - swiper.virtual.slidesBefore;\n if (realIndex < 0) {\n realIndex = swiper.virtual.slides.length + realIndex;\n }\n if (realIndex >= swiper.virtual.slides.length) {\n realIndex -= swiper.virtual.slides.length;\n }\n return realIndex;\n };\n if (typeof activeIndex === 'undefined') {\n activeIndex = getActiveIndexByTranslate(swiper);\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex && !swiper.params.loop) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n return;\n }\n if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.realIndex = getVirtualRealIndex(activeIndex);\n return;\n }\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n\n // Get real index\n let realIndex;\n if (swiper.virtual && params.virtual.enabled && params.loop) {\n realIndex = getVirtualRealIndex(activeIndex);\n } else if (gridEnabled) {\n const firstSlideInColumn = swiper.slides.filter(slideEl => slideEl.column === activeIndex)[0];\n let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);\n if (Number.isNaN(activeSlideIndex)) {\n activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);\n }\n realIndex = Math.floor(activeSlideIndex / params.grid.rows);\n } else if (swiper.slides[activeIndex]) {\n const slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index');\n if (slideIndex) {\n realIndex = parseInt(slideIndex, 10);\n } else {\n realIndex = activeIndex;\n }\n } else {\n realIndex = activeIndex;\n }\n Object.assign(swiper, {\n previousSnapIndex,\n snapIndex,\n previousRealIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n if (swiper.initialized) {\n preload(swiper);\n }\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n swiper.emit('slideChange');\n }\n}\n\nfunction updateClickedSlide(el, path) {\n const swiper = this;\n const params = swiper.params;\n let slide = el.closest(`.${params.slideClass}, swiper-slide`);\n if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {\n [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => {\n if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {\n slide = pathEl;\n }\n });\n }\n let slideFound = false;\n let slideIndex;\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}\n\nvar update = {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};\n\nfunction getSwiperTranslate(axis) {\n if (axis === void 0) {\n axis = this.isHorizontal() ? 'x' : 'y';\n }\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n wrapperEl\n } = swiper;\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n let currentTranslate = getTranslate(wrapperEl, axis);\n currentTranslate += swiper.cssOverflowAdjustment();\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}\n\nfunction setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n if (swiper.isHorizontal()) {\n x -= swiper.cssOverflowAdjustment();\n } else {\n y -= swiper.cssOverflowAdjustment();\n }\n wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;\n }\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n\nfunction minTranslate() {\n return -this.snapGrid[0];\n}\n\nfunction maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}\n\nfunction translateTo(translate, speed, runCallbacks, translateBounds, internal) {\n if (translate === void 0) {\n translate = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (translateBounds === void 0) {\n translateBounds = true;\n }\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n return true;\n }\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n return true;\n}\n\nvar translate = {\n getTranslate: getSwiperTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};\n\nfunction setTransition(duration, byController) {\n const swiper = this;\n if (!swiper.params.cssMode) {\n swiper.wrapperEl.style.transitionDuration = `${duration}ms`;\n swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';\n }\n swiper.emit('setTransition', duration, byController);\n}\n\nfunction transitionEmit(_ref) {\n let {\n swiper,\n runCallbacks,\n direction,\n step\n } = _ref;\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n swiper.emit(`transition${step}`);\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n swiper.emit(`slideChangeTransition${step}`);\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}\n\nfunction transitionStart(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}\n\nfunction transitionEnd(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}\n\nvar transition = {\n setTransition,\n transitionStart,\n transitionEnd\n};\n\nfunction slideTo(index, speed, runCallbacks, internal, initial) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n index = parseInt(index, 10);\n }\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial || swiper.destroyed) {\n return false;\n }\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n const translate = -snapGrid[snapIndex];\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) {\n return false;\n }\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) {\n return false;\n }\n }\n }\n if (slideIndex !== (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n // Update progress\n swiper.updateProgress(translate);\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';\n\n // Update Index\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {\n swiper._cssModeVirtualInitialSet = true;\n requestAnimationFrame(() => {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n }\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._immediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n return true;\n }\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n }\n return true;\n}\n\nfunction slideToLoop(index, speed, runCallbacks, internal) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n const indexAsNumber = parseInt(index, 10);\n index = indexAsNumber;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;\n let newIndex = index;\n if (swiper.params.loop) {\n if (swiper.virtual && swiper.params.virtual.enabled) {\n // eslint-disable-next-line\n newIndex = newIndex + swiper.virtual.slidesBefore;\n } else {\n let targetSlideIndex;\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n targetSlideIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column;\n } else {\n targetSlideIndex = swiper.getSlideIndexByData(newIndex);\n }\n const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length;\n const {\n centeredSlides\n } = swiper.params;\n let slidesPerView = swiper.params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10));\n if (centeredSlides && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n let needLoopFix = cols - targetSlideIndex < slidesPerView;\n if (centeredSlides) {\n needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);\n }\n if (needLoopFix) {\n const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';\n swiper.loopFix({\n direction,\n slideTo: true,\n activeSlideIndex: direction === 'next' ? targetSlideIndex + 1 : targetSlideIndex - cols + 1,\n slideRealIndex: direction === 'next' ? swiper.realIndex : undefined\n });\n }\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n newIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column;\n } else {\n newIndex = swiper.getSlideIndexByData(newIndex);\n }\n }\n }\n requestAnimationFrame(() => {\n swiper.slideTo(newIndex, speed, runCallbacks, internal);\n });\n return swiper;\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideNext(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n enabled,\n params,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n let perGroup = params.slidesPerGroup;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'next'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n });\n return true;\n }\n }\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slidePrev(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'prev'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n let prevIndex = 0;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n if (params.rewind && swiper.isBeginning) {\n const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n return swiper.slideTo(lastIndex, speed, runCallbacks, internal);\n } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n });\n return true;\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideReset(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideToClosest(speed, runCallbacks, internal, threshold) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (threshold === void 0) {\n threshold = 0.5;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n\nfunction slideToClickedSlide() {\n const swiper = this;\n if (swiper.destroyed) return;\n const {\n params,\n slidesEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n\nvar slide = {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};\n\nfunction loopCreate(slideRealIndex) {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n const initSlides = () => {\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n slides.forEach((el, index) => {\n el.setAttribute('data-swiper-slide-index', index);\n });\n };\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1);\n const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0;\n const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0;\n const addBlankSlides = amountOfSlides => {\n for (let i = 0; i < amountOfSlides; i += 1) {\n const slideEl = swiper.isElement ? createElement('swiper-slide', [params.slideBlankClass]) : createElement('div', [params.slideClass, params.slideBlankClass]);\n swiper.slidesEl.append(slideEl);\n }\n };\n if (shouldFillGroup) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else if (shouldFillGrid) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else {\n initSlides();\n }\n swiper.loopFix({\n slideRealIndex,\n direction: params.centeredSlides ? undefined : 'next'\n });\n}\n\nfunction loopFix(_temp) {\n let {\n slideRealIndex,\n slideTo = true,\n direction,\n setTranslate,\n activeSlideIndex,\n byController,\n byMousewheel\n } = _temp === void 0 ? {} : _temp;\n const swiper = this;\n if (!swiper.params.loop) return;\n swiper.emit('beforeLoopFix');\n const {\n slides,\n allowSlidePrev,\n allowSlideNext,\n slidesEl,\n params\n } = swiper;\n const {\n centeredSlides\n } = params;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n if (swiper.virtual && params.virtual.enabled) {\n if (slideTo) {\n if (!params.centeredSlides && swiper.snapIndex === 0) {\n swiper.slideTo(swiper.virtual.slides.length, 0, false, true);\n } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {\n swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);\n } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {\n swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n return;\n }\n let slidesPerView = params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));\n if (centeredSlides && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup;\n let loopedSlides = slidesPerGroup;\n if (loopedSlides % slidesPerGroup !== 0) {\n loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup;\n }\n loopedSlides += params.loopAdditionalSlides;\n swiper.loopedSlides = loopedSlides;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n if (slides.length < slidesPerView + loopedSlides) {\n showWarning('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters');\n } else if (gridEnabled && params.grid.fill === 'row') {\n showWarning('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`');\n }\n const prependSlidesIndexes = [];\n const appendSlidesIndexes = [];\n let activeIndex = swiper.activeIndex;\n if (typeof activeSlideIndex === 'undefined') {\n activeSlideIndex = swiper.getSlideIndex(slides.filter(el => el.classList.contains(params.slideActiveClass))[0]);\n } else {\n activeIndex = activeSlideIndex;\n }\n const isNext = direction === 'next' || !direction;\n const isPrev = direction === 'prev' || !direction;\n let slidesPrepended = 0;\n let slidesAppended = 0;\n const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;\n const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;\n const activeColIndexWithShift = activeColIndex + (centeredSlides && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0);\n // prepend last slides before start\n if (activeColIndexWithShift < loopedSlides) {\n slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup);\n for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n const colIndexToPrepend = cols - index - 1;\n for (let i = slides.length - 1; i >= 0; i -= 1) {\n if (slides[i].column === colIndexToPrepend) prependSlidesIndexes.push(i);\n }\n // slides.forEach((slide, slideIndex) => {\n // if (slide.column === colIndexToPrepend) prependSlidesIndexes.push(slideIndex);\n // });\n } else {\n prependSlidesIndexes.push(cols - index - 1);\n }\n }\n } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {\n slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);\n for (let i = 0; i < slidesAppended; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n slides.forEach((slide, slideIndex) => {\n if (slide.column === index) appendSlidesIndexes.push(slideIndex);\n });\n } else {\n appendSlidesIndexes.push(index);\n }\n }\n }\n swiper.__preventObserver__ = true;\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n if (isPrev) {\n prependSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.prepend(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n if (isNext) {\n appendSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.append(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n swiper.recalcSlides();\n if (params.slidesPerView === 'auto') {\n swiper.updateSlides();\n } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) {\n swiper.slides.forEach((slide, slideIndex) => {\n swiper.grid.updateSlide(slideIndex, slide, swiper.slides);\n });\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (slideTo) {\n if (prependSlidesIndexes.length > 0 && isPrev) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n if (setTranslate) {\n const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex + shift, 0, false, true);\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else if (appendSlidesIndexes.length > 0 && isNext) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex - slidesAppended, 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex - shift, 0, false, true);\n }\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.controller && swiper.controller.control && !byController) {\n const loopParams = {\n slideRealIndex,\n direction,\n setTranslate,\n activeSlideIndex,\n byController: true\n };\n if (Array.isArray(swiper.controller.control)) {\n swiper.controller.control.forEach(c => {\n if (!c.destroyed && c.params.loop) c.loopFix({\n ...loopParams,\n slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n });\n } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {\n swiper.controller.control.loopFix({\n ...loopParams,\n slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n }\n }\n swiper.emit('loopFix');\n}\n\nfunction loopDestroy() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n swiper.recalcSlides();\n const newSlidesOrder = [];\n swiper.slides.forEach(slideEl => {\n const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex;\n newSlidesOrder[index] = slideEl;\n });\n swiper.slides.forEach(slideEl => {\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n newSlidesOrder.forEach(slideEl => {\n slidesEl.append(slideEl);\n });\n swiper.recalcSlides();\n swiper.slideTo(swiper.realIndex, 0);\n}\n\nvar loop = {\n loopCreate,\n loopFix,\n loopDestroy\n};\n\nfunction setGrabCursor(moving) {\n const swiper = this;\n if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n el.style.cursor = 'move';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nfunction unsetGrabCursor() {\n const swiper = this;\n if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nvar grabCursor = {\n setGrabCursor,\n unsetGrabCursor\n};\n\n// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\nfunction closestElement(selector, base) {\n if (base === void 0) {\n base = this;\n }\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n if (!found && !el.getRootNode) {\n return null;\n }\n return found || __closestFrom(el.getRootNode().host);\n }\n return __closestFrom(base);\n}\nfunction preventEdgeSwipe(swiper, event, startX) {\n const window = getWindow();\n const {\n params\n } = swiper;\n const edgeSwipeDetection = params.edgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold;\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n return true;\n }\n return false;\n }\n return true;\n}\nfunction onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n const data = swiper.touchEventsData;\n if (e.type === 'pointerdown') {\n if (data.pointerId !== null && data.pointerId !== e.pointerId) {\n return;\n }\n data.pointerId = e.pointerId;\n } else if (e.type === 'touchstart' && e.targetTouches.length === 1) {\n data.touchId = e.targetTouches[0].identifier;\n }\n if (e.type === 'touchstart') {\n // don't proceed touch event\n preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX);\n return;\n }\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n let targetEl = e.target;\n if (params.touchEventsTarget === 'wrapper') {\n if (!swiper.wrapperEl.contains(targetEl)) return;\n }\n if ('which' in e && e.which === 3) return;\n if ('button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n\n // change target el for shadow root component\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n // eslint-disable-next-line\n const eventPath = e.composedPath ? e.composedPath() : e.path;\n if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {\n targetEl = eventPath[0];\n }\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot);\n\n // use closestElement for shadow root element to get the actual closest for nested shadow root element\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {\n swiper.allowClick = true;\n return;\n }\n if (params.swipeHandler) {\n if (!targetEl.closest(params.swipeHandler)) return;\n }\n touches.currentX = e.pageX;\n touches.currentY = e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n if (!preventEdgeSwipe(swiper, e, startX)) {\n return;\n }\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n let preventDefault = true;\n if (targetEl.matches(data.focusableElements)) {\n preventDefault = false;\n if (targetEl.nodeName === 'SELECT') {\n data.isTouched = false;\n }\n }\n if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl) {\n document.activeElement.blur();\n }\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {\n e.preventDefault();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {\n swiper.freeMode.onTouchStart();\n }\n swiper.emit('touchStart', e);\n}\n\nfunction onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (e.type === 'pointermove') {\n if (data.touchId !== null) return; // return from pointer if we use touch\n const id = e.pointerId;\n if (id !== data.pointerId) return;\n }\n let targetTouch;\n if (e.type === 'touchmove') {\n targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0];\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n } else {\n targetTouch = e;\n }\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n const pageX = targetTouch.pageX;\n const pageY = targetTouch.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n if (!e.target.matches(data.focusableElements)) {\n swiper.allowClick = false;\n }\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n return;\n }\n if (params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n if (document.activeElement) {\n if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n touches.previousX = touches.currentX;\n touches.previousY = touches.currentY;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n let diff = swiper.isHorizontal() ? diffX : diffY;\n let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;\n if (params.oneWayMovement) {\n diff = Math.abs(diff) * (rtl ? 1 : -1);\n touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);\n }\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) {\n diff = -diff;\n touchesDiff = -touchesDiff;\n }\n const prevTouchesDirection = swiper.touchesDirection;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';\n const isLoop = swiper.params.loop && !params.cssMode;\n const allowLoopFix = swiper.touchesDirection === 'next' && swiper.allowSlideNext || swiper.touchesDirection === 'prev' && swiper.allowSlidePrev;\n if (!data.isMoved) {\n if (isLoop && allowLoopFix) {\n swiper.loopFix({\n direction: swiper.swipeDirection\n });\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n const evt = new window.CustomEvent('transitionend', {\n bubbles: true,\n cancelable: true\n });\n swiper.wrapperEl.dispatchEvent(evt);\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n let loopFixed;\n new Date().getTime();\n if (data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY,\n startTranslate: data.currentTranslate\n });\n data.loopSwapReset = true;\n data.startTranslate = data.currentTranslate;\n return;\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if (diff > 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] : swiper.minTranslate())) {\n swiper.loopFix({\n direction: 'prev',\n setTranslate: true,\n activeSlideIndex: 0\n });\n }\n if (data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n }\n }\n } else if (diff < 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] : swiper.maxTranslate())) {\n swiper.loopFix({\n direction: 'next',\n setTranslate: true,\n activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))\n });\n }\n if (data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n }\n }\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n }\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n\nfunction onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let targetTouch;\n const isTouchEvent = e.type === 'touchend' || e.type === 'touchcancel';\n if (!isTouchEvent) {\n if (data.touchId !== null) return; // return from pointer if we use touch\n if (e.pointerId !== data.pointerId) return;\n targetTouch = e;\n } else {\n targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0];\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n }\n if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) {\n const proceed = ['pointercancel', 'contextmenu'].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView);\n if (!proceed) {\n return;\n }\n }\n data.pointerId = null;\n data.touchId = null;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n // Return Grab Cursor\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n if (params.cssMode) {\n return;\n }\n if (params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n }\n\n // Find current slide\n const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (swipeToLast || currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n let rewindFirstIndex = null;\n let rewindLastIndex = null;\n if (params.rewind) {\n if (swiper.isBeginning) {\n rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n } else if (swiper.isEnd) {\n rewindFirstIndex = 0;\n }\n }\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) {\n swiper.slideTo(stopIndex + increment);\n } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {\n swiper.slideTo(rewindLastIndex);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n\nfunction onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n const isVirtualLoop = isVirtual && params.loop;\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n if (swiper.params.loop && !isVirtual) {\n swiper.slideToLoop(swiper.realIndex, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n }\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n clearTimeout(swiper.autoplay.resizeTimeout);\n swiper.autoplay.resizeTimeout = setTimeout(() => {\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.resume();\n }\n }, 500);\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n\nfunction onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n\nfunction onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === 0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n swiper.emit('setTranslate', swiper.translate, false);\n}\n\nfunction onLoad(e) {\n const swiper = this;\n processLazyPreloader(swiper, e.target);\n if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) {\n return;\n }\n swiper.update();\n}\n\nfunction onDocumentTouchStart() {\n const swiper = this;\n if (swiper.documentTouchHandlerProceeded) return;\n swiper.documentTouchHandlerProceeded = true;\n if (swiper.params.touchReleaseOnEdges) {\n swiper.el.style.touchAction = 'auto';\n }\n}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n el,\n wrapperEl,\n device\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method;\n\n // Touch Events\n document[domMethod]('touchstart', swiper.onDocumentTouchStart, {\n passive: false,\n capture\n });\n el[domMethod]('touchstart', swiper.onTouchStart, {\n passive: false\n });\n el[domMethod]('pointerdown', swiper.onTouchStart, {\n passive: false\n });\n document[domMethod]('touchmove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('pointermove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('touchend', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerup', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointercancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('touchcancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerout', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerleave', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('contextmenu', swiper.onTouchEnd, {\n passive: true\n });\n\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n\n // Images loader\n el[domMethod]('load', swiper.onLoad, {\n capture: true\n });\n};\nfunction attachEvents() {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper);\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n swiper.onClick = onClick.bind(swiper);\n swiper.onLoad = onLoad.bind(swiper);\n events(swiper, 'on');\n}\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\nvar events$1 = {\n attachEvents,\n detachEvents\n};\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\nfunction setBreakpoint() {\n const swiper = this;\n const {\n realIndex,\n initialized,\n params,\n el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;\n\n // Get breakpoint for window width and update parameters\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n if (wasMultiRow && !isMultiRow) {\n el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n el.classList.add(`${params.containerModifierClass}grid`);\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n el.classList.add(`${params.containerModifierClass}grid-column`);\n }\n swiper.emitContainerClasses();\n }\n\n // Toggle navigation, pagination, scrollbar\n ['navigation', 'pagination', 'scrollbar'].forEach(prop => {\n if (typeof breakpointParams[prop] === 'undefined') return;\n const wasModuleEnabled = params[prop] && params[prop].enabled;\n const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;\n if (wasModuleEnabled && !isModuleEnabled) {\n swiper[prop].disable();\n }\n if (!wasModuleEnabled && isModuleEnabled) {\n swiper[prop].enable();\n }\n });\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n const wasLoop = params.loop;\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n const hasLoop = swiper.params.loop;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n if (initialized) {\n if (needsReLoop) {\n swiper.loopDestroy();\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (!wasLoop && hasLoop) {\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (wasLoop && !hasLoop) {\n swiper.loopDestroy();\n }\n }\n swiper.emit('breakpoint', breakpointParams);\n}\n\nfunction getBreakpoint(breakpoints, base, containerEl) {\n if (base === void 0) {\n base = 'window';\n }\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n\nvar breakpoints = {\n setBreakpoint,\n getBreakpoint\n};\n\nfunction prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\nfunction addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n el,\n device\n } = swiper;\n // prettier-ignore\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }, {\n 'watch-progress': params.watchSlidesProgress\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n el.classList.add(...classNames);\n swiper.emitContainerClasses();\n}\n\nfunction removeClasses() {\n const swiper = this;\n const {\n el,\n classNames\n } = swiper;\n el.classList.remove(...classNames);\n swiper.emitContainerClasses();\n}\n\nvar classes = {\n addClasses,\n removeClasses\n};\n\nfunction checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\nvar checkOverflow$1 = {\n checkOverflow\n};\n\nvar defaults = {\n init: true,\n direction: 'horizontal',\n oneWayMovement: false,\n swiperElementNodeName: 'SWIPER-CONTAINER',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n eventsPrefix: 'swiper',\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 5,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // loop\n loop: false,\n loopAddBlankSlides: true,\n loopAdditionalSlides: 0,\n loopPreventsSliding: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n maxBackfaceHiddenSlides: 10,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-blank',\n slideActiveClass: 'swiper-slide-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideFullyVisibleClass: 'swiper-slide-fully-visible',\n slideNextClass: 'swiper-slide-next',\n slidePrevClass: 'swiper-slide-prev',\n wrapperClass: 'swiper-wrapper',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n lazyPreloadPrevNext: 0,\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};\n\nfunction moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj) {\n if (obj === void 0) {\n obj = {};\n }\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {\n params[moduleParamName].auto = true;\n }\n if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {\n params[moduleParamName].auto = true;\n }\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}\n\n/* eslint no-param-reassign: \"off\" */\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events: events$1,\n breakpoints,\n checkOverflow: checkOverflow$1,\n classes\n};\nconst extendedDefaults = {};\nclass Swiper {\n constructor() {\n let el;\n let params;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n const document = getDocument();\n if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) {\n const swipers = [];\n document.querySelectorAll(params.el).forEach(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n // eslint-disable-next-line no-constructor-return\n return swipers;\n }\n\n // Swiper Instance\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n params,\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n });\n\n // Extend defaults with modules params\n const swiperParams = extend({}, defaults, allModulesParams);\n\n // Extend defaults with passed params\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params);\n\n // add event listeners\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n }\n\n // Extend Swiper\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: [],\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n cssOverflowAdjustment() {\n // Returns 0 unless `translate` is > 2**23\n // Should be subtracted from css values to prevent overflow\n return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;\n },\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: 0,\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n startMoving: undefined,\n pointerId: null,\n touchId: null\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper');\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n // eslint-disable-next-line no-constructor-return\n return swiper;\n }\n getDirectionLabel(property) {\n if (this.isHorizontal()) {\n return property;\n }\n // prettier-ignore\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n getSlideIndex(slideEl) {\n const {\n slidesEl,\n params\n } = this;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n const firstSlideIndex = elementIndex(slides[0]);\n return elementIndex(slideEl) - firstSlideIndex;\n }\n getSlideIndexByData(index) {\n return this.getSlideIndex(this.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index)[0]);\n }\n recalcSlides() {\n const swiper = this;\n const {\n slidesEl,\n params\n } = swiper;\n swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n }\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n swiper.emit('enable');\n }\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n swiper.emit('disable');\n }\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n getSlideClasses(slideEl) {\n const swiper = this;\n if (swiper.destroyed) return '';\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.forEach(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n slidesPerViewDynamic(view, exact) {\n if (view === void 0) {\n view = 'current';\n }\n if (exact === void 0) {\n exact = false;\n }\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n if (typeof params.slidesPerView === 'number') return params.slidesPerView;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex] ? Math.ceil(slides[activeIndex].swiperSlideSize) : 0;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += Math.ceil(slides[i].swiperSlideSize);\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n return spv;\n }\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n [...swiper.el.querySelectorAll('[loading=\"lazy\"]')].forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n }\n });\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (params.freeMode && params.freeMode.enabled && !params.cssMode) {\n setTranslate();\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {\n const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;\n translated = swiper.slideTo(slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n changeDirection(newDirection, needUpdate) {\n if (needUpdate === void 0) {\n needUpdate = true;\n }\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);\n swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.forEach(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n changeLanguageDirection(direction) {\n const swiper = this;\n if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;\n swiper.rtl = direction === 'rtl';\n swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;\n if (swiper.rtl) {\n swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'rtl';\n } else {\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'ltr';\n }\n swiper.update();\n }\n mount(element) {\n const swiper = this;\n if (swiper.mounted) return true;\n\n // Find el\n let el = element || swiper.params.el;\n if (typeof el === 'string') {\n el = document.querySelector(el);\n }\n if (!el) {\n return false;\n }\n el.swiper = swiper;\n if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === swiper.params.swiperElementNodeName.toUpperCase()) {\n swiper.isElement = true;\n }\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = el.shadowRoot.querySelector(getWrapperSelector());\n // Children needs to return slot items\n return res;\n }\n return elementChildren(el, getWrapperSelector())[0];\n };\n // Find Wrapper\n let wrapperEl = getWrapper();\n if (!wrapperEl && swiper.params.createElements) {\n wrapperEl = createElement('div', swiper.params.wrapperClass);\n el.append(wrapperEl);\n elementChildren(el, `.${swiper.params.slideClass}`).forEach(slideEl => {\n wrapperEl.append(slideEl);\n });\n }\n Object.assign(swiper, {\n el,\n wrapperEl,\n slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,\n hostEl: swiper.isElement ? el.parentNode.host : el,\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'),\n wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box'\n });\n return true;\n }\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n }\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate();\n }\n\n // Attach events\n swiper.attachEvents();\n const lazyElements = [...swiper.el.querySelectorAll('[loading=\"lazy\"]')];\n if (swiper.isElement) {\n lazyElements.push(...swiper.hostEl.querySelectorAll('[loading=\"lazy\"]'));\n }\n lazyElements.forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n } else {\n imageEl.addEventListener('load', e => {\n processLazyPreloader(swiper, e.target);\n });\n }\n });\n preload(swiper);\n\n // Init Flag\n swiper.initialized = true;\n preload(swiper);\n\n // Emit\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n destroy(deleteInstance, cleanStyles) {\n if (deleteInstance === void 0) {\n deleteInstance = true;\n }\n if (cleanStyles === void 0) {\n cleanStyles = true;\n }\n const swiper = this;\n const {\n params,\n el,\n wrapperEl,\n slides\n } = swiper;\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n el.removeAttribute('style');\n wrapperEl.removeAttribute('style');\n if (slides && slides.length) {\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n slideEl.removeAttribute('style');\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n }\n }\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n if (deleteInstance !== false) {\n swiper.el.swiper = null;\n deleteProps(swiper);\n }\n swiper.destroyed = true;\n return null;\n }\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n static get extendedDefaults() {\n return extendedDefaults;\n }\n static get defaults() {\n return defaults;\n }\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n Swiper.installModule(module);\n return Swiper;\n }\n}\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\n\nexport { Swiper as S, defaults as d };\n","/**\n * Swiper 11.0.6\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2024 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: February 5, 2024\n */\n\nexport { S as Swiper, S as default } from './shared/swiper-core.mjs';\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"@actions/core\");\nconst github_1 = require(\"@actions/github\");\nconst destinations_1 = require(\"./destinations\");\nconst fetch_alerts_1 = require(\"./fetch-alerts\");\nasync function run() {\n try {\n const token = (0, core_1.getInput)('token');\n const microsoftTeamsWebhookUrl = (0, core_1.getInput)('microsoft_teams_webhook');\n const slackWebhookUrl = (0, core_1.getInput)('slack_webhook');\n const pagerDutyIntegrationKey = (0, core_1.getInput)('pager_duty_integration_key');\n const zenDutyApiKey = (0, core_1.getInput)('zenduty_api_key');\n const zenDutyServiceId = (0, core_1.getInput)('zenduty_service_id');\n const zenDutyEscalationPolicyId = (0, core_1.getInput)('zenduty_escalation_policy_id');\n const emailFrom = (0, core_1.getInput)('email_from');\n const emailList = (0, core_1.getInput)('email_list');\n const emailSubject = (0, core_1.getInput)('email_subject');\n const emailTransportSmtpHost = (0, core_1.getInput)('email_transport_smtp_host');\n const emailTransportSmtpPort = parseInt((0, core_1.getInput)('email_transport_smtp_port'));\n const emailTransportSmtpUser = (0, core_1.getInput)('email_transport_smtp_user');\n const emailTransportSmtpPassword = (0, core_1.getInput)('email_transport_smtp_password');\n const count = parseInt((0, core_1.getInput)('count'));\n const severity = (0, core_1.getInput)('severity');\n const { owner } = github_1.context.repo;\n const { repo } = github_1.context.repo;\n const alerts = await (0, fetch_alerts_1.fetchAlerts)(token, repo, owner, severity, count);\n if (alerts.length > 0) {\n if (microsoftTeamsWebhookUrl) {\n await (0, destinations_1.sendAlertsToMicrosoftTeams)(microsoftTeamsWebhookUrl, alerts);\n }\n if (slackWebhookUrl) {\n if (!(0, destinations_1.validateSlackWebhookUrl)(slackWebhookUrl)) {\n (0, core_1.setFailed)(new Error('Invalid Slack Webhook URL'));\n }\n else {\n await (0, destinations_1.sendAlertsToSlack)(slackWebhookUrl, alerts);\n }\n }\n if (pagerDutyIntegrationKey) {\n await (0, destinations_1.sendAlertsToPagerDuty)(pagerDutyIntegrationKey, alerts);\n }\n if (zenDutyApiKey) {\n if (zenDutyServiceId && zenDutyEscalationPolicyId) {\n await (0, destinations_1.sendAlertsToZenduty)(zenDutyApiKey, zenDutyServiceId, zenDutyEscalationPolicyId, alerts);\n }\n else {\n (0, core_1.setFailed)(new Error('Check your Zenduty Service ID and Escalation Policy ID'));\n }\n }\n if (emailFrom && emailList) {\n const emailWikiLink = 'https://github.com/kunalnagarco/action-cve/wiki/Send-alerts-to-email';\n if (emailTransportSmtpUser && emailTransportSmtpPassword) {\n const emailTransportSmtpConfig = {\n host: emailTransportSmtpHost,\n port: emailTransportSmtpPort,\n secure: emailTransportSmtpPort === 465 && true,\n auth: {\n user: emailTransportSmtpUser,\n pass: emailTransportSmtpPassword,\n },\n };\n (0, destinations_1.sendAlertsToEmailSmtp)(emailTransportSmtpConfig, alerts, emailList, emailFrom, emailSubject);\n }\n else {\n (0, core_1.setFailed)(new Error(`Invalid SMTP config. Please check the wiki for more info: ${emailWikiLink}`));\n }\n }\n }\n }\n catch (err) {\n if (err instanceof Error) {\n (0, core_1.setFailed)(err);\n }\n }\n}\nrun();\n//# sourceMappingURL=main.js.map"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7tBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACl4PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5nBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACx9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3OA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACplBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChMA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACr0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/IA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1uEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5lBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnmEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACj7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9iCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACroBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrRA;;;;;;;;ACAA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AClwIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACNA;AACA;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":[".././lib/constants.js",".././lib/destinations/email.js",".././lib/destinations/index.js",".././lib/destinations/microsoft-teams.js",".././lib/destinations/pager-duty.js",".././lib/destinations/slack.js",".././lib/destinations/zenduty.js",".././lib/entities/advisory.js",".././lib/entities/alert.js",".././lib/entities/index.js",".././lib/entities/repository.js",".././lib/entities/vulnerability.js",".././lib/fetch-alerts.js",".././lib/utils/adaptive-card/index.js",".././lib/utils/index.js",".././lib/utils/request/index.js",".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/github/lib/context.js",".././node_modules/@actions/github/lib/github.js",".././node_modules/@actions/github/lib/internal/utils.js",".././node_modules/@actions/github/lib/utils.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/@octokit/auth-token/dist-node/index.js",".././node_modules/@octokit/core/dist-node/index.js",".././node_modules/@octokit/endpoint/dist-node/index.js",".././node_modules/@octokit/graphql/dist-node/index.js",".././node_modules/@octokit/plugin-paginate-rest/dist-node/index.js",".././node_modules/@octokit/plugin-request-log/dist-node/index.js",".././node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js",".././node_modules/@octokit/request-error/dist-node/index.js",".././node_modules/@octokit/request/dist-node/index.js",".././node_modules/@octokit/rest/dist-node/index.js",".././node_modules/@pagerduty/pdjs/build/src/api.js",".././node_modules/@pagerduty/pdjs/build/src/common.js",".././node_modules/@pagerduty/pdjs/build/src/events.js",".././node_modules/@pagerduty/pdjs/build/src/index.js",".././node_modules/@slack/webhook/dist/IncomingWebhook.js",".././node_modules/@slack/webhook/dist/errors.js",".././node_modules/@slack/webhook/dist/index.js",".././node_modules/@slack/webhook/dist/instrument.js",".././node_modules/adaptivecards/lib/activity-request.js",".././node_modules/adaptivecards/lib/adaptive-applet.js",".././node_modules/adaptivecards/lib/adaptivecards.js",".././node_modules/adaptivecards/lib/card-elements.js",".././node_modules/adaptivecards/lib/card-object.js",".././node_modules/adaptivecards/lib/carousel.js",".././node_modules/adaptivecards/lib/channel-adapter.js",".././node_modules/adaptivecards/lib/controls/collection.js",".././node_modules/adaptivecards/lib/controls/constants.js",".././node_modules/adaptivecards/lib/controls/index.js",".././node_modules/adaptivecards/lib/controls/menu-item.js",".././node_modules/adaptivecards/lib/controls/popup-control.js",".././node_modules/adaptivecards/lib/controls/popup-menu.js",".././node_modules/adaptivecards/lib/enums.js",".././node_modules/adaptivecards/lib/host-capabilities.js",".././node_modules/adaptivecards/lib/host-config.js",".././node_modules/adaptivecards/lib/registry.js",".././node_modules/adaptivecards/lib/serialization.js",".././node_modules/adaptivecards/lib/shared.js",".././node_modules/adaptivecards/lib/strings.js",".././node_modules/adaptivecards/lib/table.js",".././node_modules/adaptivecards/lib/text-formatters.js",".././node_modules/adaptivecards/lib/utils.js",".././node_modules/asynckit/index.js",".././node_modules/asynckit/lib/abort.js",".././node_modules/asynckit/lib/async.js",".././node_modules/asynckit/lib/defer.js",".././node_modules/asynckit/lib/iterate.js",".././node_modules/asynckit/lib/state.js",".././node_modules/asynckit/lib/terminator.js",".././node_modules/asynckit/parallel.js",".././node_modules/asynckit/serial.js",".././node_modules/asynckit/serialOrdered.js",".././node_modules/before-after-hook/index.js",".././node_modules/before-after-hook/lib/add.js",".././node_modules/before-after-hook/lib/register.js",".././node_modules/before-after-hook/lib/remove.js",".././node_modules/browser-or-node/lib/index.js",".././node_modules/combined-stream/lib/combined_stream.js",".././node_modules/cross-fetch/dist/node-ponyfill.js",".././node_modules/debug/node_modules/ms/index.js",".././node_modules/debug/src/browser.js",".././node_modules/debug/src/common.js",".././node_modules/debug/src/index.js",".././node_modules/debug/src/node.js",".././node_modules/delayed-stream/lib/delayed_stream.js",".././node_modules/deprecation/dist-node/index.js",".././node_modules/encoding/lib/encoding.js",".././node_modules/follow-redirects/debug.js",".././node_modules/follow-redirects/index.js",".././node_modules/form-data/lib/form_data.js",".././node_modules/form-data/lib/populate.js",".././node_modules/has-flag/index.js",".././node_modules/iconv-lite/encodings/dbcs-codec.js",".././node_modules/iconv-lite/encodings/dbcs-data.js",".././node_modules/iconv-lite/encodings/index.js",".././node_modules/iconv-lite/encodings/internal.js",".././node_modules/iconv-lite/encodings/sbcs-codec.js",".././node_modules/iconv-lite/encodings/sbcs-data-generated.js",".././node_modules/iconv-lite/encodings/sbcs-data.js",".././node_modules/iconv-lite/encodings/utf16.js",".././node_modules/iconv-lite/encodings/utf32.js",".././node_modules/iconv-lite/encodings/utf7.js",".././node_modules/iconv-lite/lib/bom-handling.js",".././node_modules/iconv-lite/lib/index.js",".././node_modules/iconv-lite/lib/streams.js",".././node_modules/mime-db/index.js",".././node_modules/mime-types/index.js",".././node_modules/node-fetch/lib/index.js",".././node_modules/nodemailer/lib/addressparser/index.js",".././node_modules/nodemailer/lib/base64/index.js",".././node_modules/nodemailer/lib/dkim/index.js",".././node_modules/nodemailer/lib/dkim/message-parser.js",".././node_modules/nodemailer/lib/dkim/relaxed-body.js",".././node_modules/nodemailer/lib/dkim/sign.js",".././node_modules/nodemailer/lib/fetch/cookies.js",".././node_modules/nodemailer/lib/fetch/index.js",".././node_modules/nodemailer/lib/json-transport/index.js",".././node_modules/nodemailer/lib/mail-composer/index.js",".././node_modules/nodemailer/lib/mailer/index.js",".././node_modules/nodemailer/lib/mailer/mail-message.js",".././node_modules/nodemailer/lib/mime-funcs/index.js",".././node_modules/nodemailer/lib/mime-funcs/mime-types.js",".././node_modules/nodemailer/lib/mime-node/index.js",".././node_modules/nodemailer/lib/mime-node/last-newline.js",".././node_modules/nodemailer/lib/mime-node/le-unix.js",".././node_modules/nodemailer/lib/mime-node/le-windows.js",".././node_modules/nodemailer/lib/nodemailer.js",".././node_modules/nodemailer/lib/punycode/index.js",".././node_modules/nodemailer/lib/qp/index.js",".././node_modules/nodemailer/lib/sendmail-transport/index.js",".././node_modules/nodemailer/lib/ses-transport/index.js",".././node_modules/nodemailer/lib/shared/index.js",".././node_modules/nodemailer/lib/smtp-connection/data-stream.js",".././node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js",".././node_modules/nodemailer/lib/smtp-connection/index.js",".././node_modules/nodemailer/lib/smtp-pool/index.js",".././node_modules/nodemailer/lib/smtp-pool/pool-resource.js",".././node_modules/nodemailer/lib/smtp-transport/index.js",".././node_modules/nodemailer/lib/stream-transport/index.js",".././node_modules/nodemailer/lib/well-known/index.js",".././node_modules/nodemailer/lib/xoauth2/index.js",".././node_modules/once/once.js",".././node_modules/proxy-from-env/index.js",".././node_modules/safer-buffer/safer.js",".././node_modules/supports-color/index.js",".././node_modules/tr46/index.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/undici/index.js",".././node_modules/undici/lib/agent.js",".././node_modules/undici/lib/api/abort-signal.js",".././node_modules/undici/lib/api/api-connect.js",".././node_modules/undici/lib/api/api-pipeline.js",".././node_modules/undici/lib/api/api-request.js",".././node_modules/undici/lib/api/api-stream.js",".././node_modules/undici/lib/api/api-upgrade.js",".././node_modules/undici/lib/api/index.js",".././node_modules/undici/lib/api/readable.js",".././node_modules/undici/lib/api/util.js",".././node_modules/undici/lib/balanced-pool.js",".././node_modules/undici/lib/cache/cache.js",".././node_modules/undici/lib/cache/cachestorage.js",".././node_modules/undici/lib/cache/symbols.js",".././node_modules/undici/lib/cache/util.js",".././node_modules/undici/lib/client.js",".././node_modules/undici/lib/compat/dispatcher-weakref.js",".././node_modules/undici/lib/cookies/constants.js",".././node_modules/undici/lib/cookies/index.js",".././node_modules/undici/lib/cookies/parse.js",".././node_modules/undici/lib/cookies/util.js",".././node_modules/undici/lib/core/connect.js",".././node_modules/undici/lib/core/errors.js",".././node_modules/undici/lib/core/request.js",".././node_modules/undici/lib/core/symbols.js",".././node_modules/undici/lib/core/util.js",".././node_modules/undici/lib/dispatcher-base.js",".././node_modules/undici/lib/dispatcher.js",".././node_modules/undici/lib/fetch/body.js",".././node_modules/undici/lib/fetch/constants.js",".././node_modules/undici/lib/fetch/dataURL.js",".././node_modules/undici/lib/fetch/file.js",".././node_modules/undici/lib/fetch/formdata.js",".././node_modules/undici/lib/fetch/global.js",".././node_modules/undici/lib/fetch/headers.js",".././node_modules/undici/lib/fetch/index.js",".././node_modules/undici/lib/fetch/request.js",".././node_modules/undici/lib/fetch/response.js",".././node_modules/undici/lib/fetch/symbols.js",".././node_modules/undici/lib/fetch/util.js",".././node_modules/undici/lib/fetch/webidl.js",".././node_modules/undici/lib/fileapi/encoding.js",".././node_modules/undici/lib/fileapi/filereader.js",".././node_modules/undici/lib/fileapi/progressevent.js",".././node_modules/undici/lib/fileapi/symbols.js",".././node_modules/undici/lib/fileapi/util.js",".././node_modules/undici/lib/global.js",".././node_modules/undici/lib/handler/DecoratorHandler.js",".././node_modules/undici/lib/handler/RedirectHandler.js",".././node_modules/undici/lib/handler/RetryHandler.js",".././node_modules/undici/lib/interceptor/redirectInterceptor.js",".././node_modules/undici/lib/llhttp/constants.js",".././node_modules/undici/lib/llhttp/llhttp-wasm.js",".././node_modules/undici/lib/llhttp/llhttp_simd-wasm.js",".././node_modules/undici/lib/llhttp/utils.js",".././node_modules/undici/lib/mock/mock-agent.js",".././node_modules/undici/lib/mock/mock-client.js",".././node_modules/undici/lib/mock/mock-errors.js",".././node_modules/undici/lib/mock/mock-interceptor.js",".././node_modules/undici/lib/mock/mock-pool.js",".././node_modules/undici/lib/mock/mock-symbols.js",".././node_modules/undici/lib/mock/mock-utils.js",".././node_modules/undici/lib/mock/pending-interceptors-formatter.js",".././node_modules/undici/lib/mock/pluralizer.js",".././node_modules/undici/lib/node/fixed-queue.js",".././node_modules/undici/lib/pool-base.js",".././node_modules/undici/lib/pool-stats.js",".././node_modules/undici/lib/pool.js",".././node_modules/undici/lib/proxy-agent.js",".././node_modules/undici/lib/timers.js",".././node_modules/undici/lib/websocket/connection.js",".././node_modules/undici/lib/websocket/constants.js",".././node_modules/undici/lib/websocket/events.js",".././node_modules/undici/lib/websocket/frame.js",".././node_modules/undici/lib/websocket/receiver.js",".././node_modules/undici/lib/websocket/symbols.js",".././node_modules/undici/lib/websocket/util.js",".././node_modules/undici/lib/websocket/websocket.js",".././node_modules/universal-user-agent/dist-node/index.js",".././node_modules/uuid/dist/index.js",".././node_modules/uuid/dist/md5.js",".././node_modules/uuid/dist/nil.js",".././node_modules/uuid/dist/parse.js",".././node_modules/uuid/dist/regex.js",".././node_modules/uuid/dist/rng.js",".././node_modules/uuid/dist/sha1.js",".././node_modules/uuid/dist/stringify.js",".././node_modules/uuid/dist/v1.js",".././node_modules/uuid/dist/v3.js",".././node_modules/uuid/dist/v35.js",".././node_modules/uuid/dist/v4.js",".././node_modules/uuid/dist/v5.js",".././node_modules/uuid/dist/validate.js",".././node_modules/uuid/dist/version.js",".././node_modules/webidl-conversions/lib/index.js",".././node_modules/whatwg-url/lib/URL-impl.js",".././node_modules/whatwg-url/lib/URL.js",".././node_modules/whatwg-url/lib/public-api.js",".././node_modules/whatwg-url/lib/url-state-machine.js",".././node_modules/whatwg-url/lib/utils.js",".././node_modules/wrappy/wrappy.js","../external node-commonjs \"assert\"","../external node-commonjs \"async_hooks\"","../external node-commonjs \"buffer\"","../external node-commonjs \"child_process\"","../external node-commonjs \"console\"","../external node-commonjs \"crypto\"","../external node-commonjs \"diagnostics_channel\"","../external node-commonjs \"dns\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"http\"","../external node-commonjs \"http2\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"node:events\"","../external node-commonjs \"node:stream\"","../external node-commonjs \"node:util\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"perf_hooks\"","../external node-commonjs \"punycode\"","../external node-commonjs \"querystring\"","../external node-commonjs \"stream\"","../external node-commonjs \"stream/web\"","../external node-commonjs \"string_decoder\"","../external node-commonjs \"tls\"","../external node-commonjs \"tty\"","../external node-commonjs \"url\"","../external node-commonjs \"util\"","../external node-commonjs \"util/types\"","../external node-commonjs \"worker_threads\"","../external node-commonjs \"zlib\"",".././node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js",".././node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js",".././node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js",".././node_modules/@fastify/busboy/deps/streamsearch/sbmh.js",".././node_modules/@fastify/busboy/lib/main.js",".././node_modules/@fastify/busboy/lib/types/multipart.js",".././node_modules/@fastify/busboy/lib/types/urlencoded.js",".././node_modules/@fastify/busboy/lib/utils/Decoder.js",".././node_modules/@fastify/busboy/lib/utils/basename.js",".././node_modules/@fastify/busboy/lib/utils/decodeText.js",".././node_modules/@fastify/busboy/lib/utils/getLimit.js",".././node_modules/@fastify/busboy/lib/utils/parseParams.js",".././node_modules/axios/dist/node/axios.cjs",".././node_modules/swiper/shared/ssr-window.esm.mjs",".././node_modules/swiper/shared/utils.mjs",".././node_modules/swiper/shared/swiper-core.mjs",".././node_modules/swiper/swiper.mjs","../webpack/bootstrap","../webpack/runtime/define property getters","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/make namespace object","../webpack/runtime/compat",".././lib/main.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ACTION_URL = exports.ACTION_SHORT_SUMMARY = exports.ACTION_ICON = void 0;\nexports.ACTION_ICON = 'https://github.com/kunalnagarco/action-cve/raw/main/icons/ladybug.png';\nexports.ACTION_SHORT_SUMMARY = 'GitHub Action - @kunalnagarco/action-cve';\nexports.ACTION_URL = 'https://github.com/kunalnagarco/action-cve';\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToEmailSmtp = void 0;\nconst nodemailer_1 = require(\"nodemailer\");\nconst constants_1 = require(\"../constants\");\nconst entities_1 = require(\"../entities\");\nconst createTableRow = (alert) => `\n \n ${alert.packageName}\n ${alert.vulnerability?.vulnerableVersionRange}\n ${alert.vulnerability?.firstPatchedVersion}\n ${alert.advisory?.severity}\n ${alert.advisory?.summary}\n View\n \n `;\nconst createTable = (alerts) => {\n let rowData = '';\n alerts.forEach((alert) => {\n rowData += createTableRow(alert);\n });\n return `\n \n \n \n \n \n \n \n \n \n \n ${rowData}\n \n
Package nameVulnerability Version RangePatched VersionSeveritySummary
\n `;\n};\nconst createEmailBody = (alerts) => `\n

Hello,

\n

You are receiving this message as you have set up email notifications for vulnerabilities in ${(0, entities_1.getFullRepositoryNameFromAlert)(alerts[0])} via ${constants_1.ACTION_SHORT_SUMMARY}.

\n ${createTable(alerts)}\n `;\nconst sendAlertsToEmailSmtp = async (config, alerts, emailList, emailFrom, subject) => {\n const transporter = (0, nodemailer_1.createTransport)(config);\n await transporter.sendMail({\n from: emailFrom,\n bcc: emailList,\n subject: subject ||\n `${constants_1.ACTION_SHORT_SUMMARY} - ${alerts.length} vulnerabilities in ${(0, entities_1.getFullRepositoryNameFromAlert)(alerts[0])}`,\n html: createEmailBody(alerts),\n });\n};\nexports.sendAlertsToEmailSmtp = sendAlertsToEmailSmtp;\n//# sourceMappingURL=email.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./slack\"), exports);\n__exportStar(require(\"./pager-duty\"), exports);\n__exportStar(require(\"./zenduty\"), exports);\n__exportStar(require(\"./microsoft-teams\"), exports);\n__exportStar(require(\"./email\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToMicrosoftTeams = void 0;\nconst utils_1 = require(\"../utils\");\nconst constants_1 = require(\"../constants\");\nconst createTableRow = (key, value) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)(key, true));\n row.addColumn(keyColumn);\n const valueColumn = (0, utils_1.createColumn)();\n valueColumn.addItem((0, utils_1.createTextBlock)(value));\n row.addColumn(valueColumn);\n return row;\n};\nconst createTableButtonRow = (url) => {\n const row = (0, utils_1.createRow)();\n const keyColumn = (0, utils_1.createColumn)();\n keyColumn.addItem((0, utils_1.createTextBlock)('Advisory URL', true));\n row.addColumn(keyColumn);\n const urlColumn = (0, utils_1.createColumn)();\n urlColumn.addItem((0, utils_1.createLinkButton)('View Advisory', url));\n row.addColumn(urlColumn);\n return row;\n};\nconst sendAlertsToMicrosoftTeams = async (webhookUrl, alerts) => {\n const alertCount = alerts.length;\n const repositoryOwner = alerts[0].repository.owner;\n const repositoryName = alerts[0].repository.name;\n const adaptiveCard = (0, utils_1.createAdaptiveCard)();\n adaptiveCard.addItem((0, utils_1.createTextBlock)(constants_1.ACTION_SHORT_SUMMARY));\n adaptiveCard.addItem((0, utils_1.createTextBlock)(`You have ${alertCount} vulnerabilities in ${repositoryOwner}/${repositoryName}`));\n alerts.forEach((alert) => {\n const container = (0, utils_1.createContainer)(true, true);\n container.addItem(createTableRow('Package Name', alert.packageName));\n container.addItem(createTableRow('Vulnerability Version Range', alert.vulnerability?.vulnerableVersionRange || ''));\n container.addItem(createTableRow('Patched Version', alert.vulnerability?.firstPatchedVersion || ''));\n container.addItem(createTableRow('Severity', alert.advisory?.severity || ''));\n container.addItem(createTableRow('Summary', alert.advisory?.summary || ''));\n container.addItem(createTableButtonRow(alert.advisory?.url || ''));\n adaptiveCard.addItem(container);\n });\n const body = {\n type: 'message',\n attachments: [\n {\n contentType: 'application/vnd.microsoft.card.adaptive',\n contentUrl: null,\n content: adaptiveCard.toJSON(),\n },\n ],\n };\n await (0, utils_1.request)(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n });\n};\nexports.sendAlertsToMicrosoftTeams = sendAlertsToMicrosoftTeams;\n//# sourceMappingURL=microsoft-teams.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToPagerDuty = void 0;\nconst pdjs_1 = require(\"@pagerduty/pdjs\");\nconst constants_1 = require(\"../constants\");\nconst sendAlertsToPagerDuty = async (integrationKey, alerts) => {\n await (0, pdjs_1.event)({\n data: {\n routing_key: integrationKey,\n event_action: 'trigger',\n payload: {\n summary: `You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}`,\n source: 'GitHub Dependabot Alerts',\n severity: 'info',\n custom_details: { ...alerts },\n },\n images: [\n {\n src: constants_1.ACTION_ICON,\n alt: constants_1.ACTION_SHORT_SUMMARY,\n href: constants_1.ACTION_URL,\n },\n ],\n },\n });\n};\nexports.sendAlertsToPagerDuty = sendAlertsToPagerDuty;\n//# sourceMappingURL=pager-duty.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToSlack = exports.validateSlackWebhookUrl = exports.MAX_COUNT_SLACK = void 0;\nconst webhook_1 = require(\"@slack/webhook\");\nconst constants_1 = require(\"../constants\");\nexports.MAX_COUNT_SLACK = 30;\nconst createMaxAlertsMarkdownNotice = () => `*Note:* Only ${exports.MAX_COUNT_SLACK} have been sent due to message length restrictions.`;\nconst createSummaryBlock = (alertCount, repositoryName, repositoryOwner) => ({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `\n You have ${alertCount} vulnerabilities in *${repositoryOwner}/${repositoryName}*.\n${alertCount > exports.MAX_COUNT_SLACK ? createMaxAlertsMarkdownNotice() : ''}\n `,\n },\n});\nconst createDividerBlock = () => ({\n type: 'divider',\n});\nconst createAlertBlock = (alert) => ({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `\n*Package name:* ${alert.packageName}\n*Vulnerability Version Range:* ${alert.vulnerability?.vulnerableVersionRange}\n*Patched Version:* ${alert.vulnerability?.firstPatchedVersion}\n*Severity:* ${alert.advisory?.severity}\n*Summary:* ${alert.advisory?.summary}\n `,\n },\n accessory: {\n type: 'button',\n text: {\n type: 'plain_text',\n text: 'View Advisory',\n emoji: true,\n },\n style: 'danger',\n url: alert.advisory?.url,\n },\n});\nconst validateSlackWebhookUrl = (url) => {\n const regexPattern = /^https:\\/\\/hooks\\.slack\\.com\\/services\\/T[a-zA-Z0-9_]{8,10}\\/B[a-zA-Z0-9_]{10}\\/[a-zA-Z0-9_]{24}/;\n return regexPattern.test(url);\n};\nexports.validateSlackWebhookUrl = validateSlackWebhookUrl;\nconst sendAlertsToSlack = async (webhookUrl, alerts) => {\n const webhook = new webhook_1.IncomingWebhook(webhookUrl);\n const alertBlocks = [];\n alerts.forEach((alert) => {\n alertBlocks.push(createAlertBlock(alert));\n });\n await webhook.send({\n blocks: [\n createSummaryBlock(alerts.length, alerts[0].repository.name, alerts[0].repository.owner),\n createDividerBlock(),\n ...alertBlocks,\n ],\n icon_url: constants_1.ACTION_ICON,\n username: constants_1.ACTION_SHORT_SUMMARY,\n });\n};\nexports.sendAlertsToSlack = sendAlertsToSlack;\n//# sourceMappingURL=slack.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendAlertsToZenduty = void 0;\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\nconst sendAlertsToZenduty = async (apiKey, serviceId, escalationPolicyId, alerts) => {\n let summary = `\n You have ${alerts.length} vulnerabilities in ${alerts[0].repository.owner}/${alerts[0].repository.name}\n\n ---\n\n `;\n alerts.forEach((alert) => {\n summary += `\n Package name: ${alert.packageName}\n Vulnerability Version Range: ${alert.vulnerability?.vulnerableVersionRange}\n Patched Version: ${alert.vulnerability?.firstPatchedVersion}\n Severity: ${alert.advisory?.severity}\n Summary: ${alert.advisory?.summary}\n `;\n });\n summary += `\n\n ---\n `;\n const payload = {\n service: serviceId,\n escalation_policy: escalationPolicyId,\n title: `${constants_1.ACTION_SHORT_SUMMARY} - ${alerts[0].repository.name}`,\n urgency: 0,\n summary,\n };\n const bearer = `Token ${apiKey}`;\n await (0, utils_1.request)('https://www.zenduty.com/api/incidents/', {\n method: 'POST',\n headers: {\n Authorization: bearer,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n};\nexports.sendAlertsToZenduty = sendAlertsToZenduty;\n//# sourceMappingURL=zenduty.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAdvisory = void 0;\nconst toAdvisory = (securityAdvisory) => ({\n cvssScore: securityAdvisory.cvss?.score || 0,\n severity: securityAdvisory.severity?.toUpperCase() || 'LOW',\n summary: securityAdvisory.summary,\n description: securityAdvisory.description || '',\n url: securityAdvisory.references[0].url,\n publishedAt: securityAdvisory.published_at || '',\n updatedAt: securityAdvisory.updated_at || '',\n withdrawnAt: securityAdvisory.withdrawn_at || '',\n});\nexports.toAdvisory = toAdvisory;\n//# sourceMappingURL=advisory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isActiveAlert = exports.toAlert = void 0;\nconst advisory_1 = require(\"./advisory\");\nconst vulnerability_1 = require(\"./vulnerability\");\nconst toAlert = (dependabotAlert, repositoryName, repositoryOwner) => ({\n repository: {\n name: repositoryName,\n owner: repositoryOwner,\n },\n packageName: dependabotAlert.security_vulnerability.package.name || '',\n advisory: dependabotAlert.security_advisory\n ? (0, advisory_1.toAdvisory)(dependabotAlert.security_advisory)\n : undefined,\n vulnerability: dependabotAlert.security_vulnerability\n ? (0, vulnerability_1.toVulnerability)(dependabotAlert.security_vulnerability)\n : undefined,\n createdAt: dependabotAlert.created_at,\n});\nexports.toAlert = toAlert;\nconst isActiveAlert = (dependabotAlert) => {\n if (dependabotAlert.dismissed_at === null &&\n dependabotAlert.fixed_at === null) {\n return true;\n }\n return false;\n};\nexports.isActiveAlert = isActiveAlert;\n//# sourceMappingURL=alert.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./repository\"), exports);\n__exportStar(require(\"./advisory\"), exports);\n__exportStar(require(\"./alert\"), exports);\n__exportStar(require(\"./vulnerability\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFullRepositoryNameFromAlert = void 0;\nconst getFullRepositoryNameFromAlert = (alert) => `${alert.repository.owner}/${alert.repository.name}`;\nexports.getFullRepositoryNameFromAlert = getFullRepositoryNameFromAlert;\n//# sourceMappingURL=repository.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toVulnerability = void 0;\nconst toVulnerability = (securityVulnerability) => ({\n firstPatchedVersion: securityVulnerability.first_patched_version?.identifier,\n vulnerableVersionRange: securityVulnerability.vulnerable_version_range,\n});\nexports.toVulnerability = toVulnerability;\n//# sourceMappingURL=vulnerability.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAlerts = void 0;\nconst rest_1 = require(\"@octokit/rest\");\nconst entities_1 = require(\"./entities\");\nconst fetchAlerts = async (gitHubPersonalAccessToken, repositoryName, repositoryOwner, severity, count) => {\n const octokit = new rest_1.Octokit({\n auth: gitHubPersonalAccessToken,\n request: {\n fetch,\n },\n });\n const response = await octokit.dependabot.listAlertsForRepo({\n owner: repositoryOwner,\n repo: repositoryName,\n severity,\n per_page: count,\n });\n const alerts = response.data\n .filter((dependabotAlert) => (0, entities_1.isActiveAlert)(dependabotAlert))\n .map((dependabotAlert) => (0, entities_1.toAlert)(dependabotAlert, repositoryName, repositoryOwner));\n return alerts;\n};\nexports.fetchAlerts = fetchAlerts;\n//# sourceMappingURL=fetch-alerts.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createAdaptiveCard = exports.createLinkButton = exports.createColumn = exports.createTextBlock = exports.createRow = exports.createContainer = void 0;\nconst adaptivecards_1 = require(\"adaptivecards\");\nconst createContainer = (isSpacingLarge, isStyleEmphasis) => {\n const container = new adaptivecards_1.Container();\n if (isSpacingLarge) {\n container.spacing = adaptivecards_1.Spacing.Large;\n }\n if (isStyleEmphasis) {\n container.style = 'emphasis';\n }\n return container;\n};\nexports.createContainer = createContainer;\nconst createRow = () => {\n return new adaptivecards_1.ColumnSet();\n};\nexports.createRow = createRow;\nconst createTextBlock = (text, isBold = false, isWrap = true) => {\n const textBlock = new adaptivecards_1.TextBlock(text);\n if (isBold) {\n textBlock.weight = adaptivecards_1.TextWeight.Bolder;\n }\n textBlock.wrap = isWrap;\n return textBlock;\n};\nexports.createTextBlock = createTextBlock;\nconst createColumn = () => {\n return new adaptivecards_1.Column();\n};\nexports.createColumn = createColumn;\nconst createLinkButton = (text, url) => {\n const linkButton = new adaptivecards_1.ActionSet();\n const action = new adaptivecards_1.OpenUrlAction();\n action.title = text;\n action.url = url;\n linkButton.addAction(action);\n return linkButton;\n};\nexports.createLinkButton = createLinkButton;\nconst createAdaptiveCard = () => {\n const adaptiveCard = new adaptivecards_1.AdaptiveCard();\n adaptiveCard.version = new adaptivecards_1.Version(1, 2);\n return adaptiveCard;\n};\nexports.createAdaptiveCard = createAdaptiveCard;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./request\"), exports);\n__exportStar(require(\"./adaptive-card\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\nconst request = async (url, options) => fetch(url, {\n ...options,\n});\nexports.request = request;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nclass Context {\n /**\n * Hydrate the context from the environment\n */\n constructor() {\n var _a, _b, _c;\n this.payload = {};\n if (process.env.GITHUB_EVENT_PATH) {\n if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {\n this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));\n }\n else {\n const path = process.env.GITHUB_EVENT_PATH;\n process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);\n }\n }\n this.eventName = process.env.GITHUB_EVENT_NAME;\n this.sha = process.env.GITHUB_SHA;\n this.ref = process.env.GITHUB_REF;\n this.workflow = process.env.GITHUB_WORKFLOW;\n this.action = process.env.GITHUB_ACTION;\n this.actor = process.env.GITHUB_ACTOR;\n this.job = process.env.GITHUB_JOB;\n this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);\n this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);\n this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;\n this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;\n this.graphqlUrl =\n (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;\n }\n get issue() {\n const payload = this.payload;\n return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });\n }\n get repo() {\n if (process.env.GITHUB_REPOSITORY) {\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');\n return { owner, repo };\n }\n if (this.payload.repository) {\n return {\n owner: this.payload.repository.owner.login,\n repo: this.payload.repository.name\n };\n }\n throw new Error(\"context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'\");\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokit = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst utils_1 = require(\"./utils\");\nexports.context = new Context.Context();\n/**\n * Returns a hydrated octokit ready to use for GitHub Actions\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokit(token, options, ...additionalPlugins) {\n const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);\n return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options));\n}\nexports.getOctokit = getOctokit;\n//# sourceMappingURL=github.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0;\nconst httpClient = __importStar(require(\"@actions/http-client\"));\nconst undici_1 = require(\"undici\");\nfunction getAuthString(token, options) {\n if (!token && !options.auth) {\n throw new Error('Parameter token or opts.auth is required');\n }\n else if (token && options.auth) {\n throw new Error('Parameters token and opts.auth may not both be specified');\n }\n return typeof options.auth === 'string' ? options.auth : `token ${token}`;\n}\nexports.getAuthString = getAuthString;\nfunction getProxyAgent(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgent(destinationUrl);\n}\nexports.getProxyAgent = getProxyAgent;\nfunction getProxyAgentDispatcher(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgentDispatcher(destinationUrl);\n}\nexports.getProxyAgentDispatcher = getProxyAgentDispatcher;\nfunction getProxyFetch(destinationUrl) {\n const httpDispatcher = getProxyAgentDispatcher(destinationUrl);\n const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () {\n return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));\n });\n return proxyFetch;\n}\nexports.getProxyFetch = getProxyFetch;\nfunction getApiBaseUrl() {\n return process.env['GITHUB_API_URL'] || 'https://api.github.com';\n}\nexports.getApiBaseUrl = getApiBaseUrl;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst Utils = __importStar(require(\"./internal/utils\"));\n// octokit + plugins\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst plugin_paginate_rest_1 = require(\"@octokit/plugin-paginate-rest\");\nexports.context = new Context.Context();\nconst baseUrl = Utils.getApiBaseUrl();\nexports.defaults = {\n baseUrl,\n request: {\n agent: Utils.getProxyAgent(baseUrl),\n fetch: Utils.getProxyFetch(baseUrl)\n }\n};\nexports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);\n/**\n * Convience function to correctly format Octokit Options to pass into the constructor.\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokitOptions(token, options) {\n const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller\n // Auth\n const auth = Utils.getAuthString(token, opts);\n if (auth) {\n opts.auth = auth;\n }\n return opts;\n}\nexports.getOctokitOptions = getOctokitOptions;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nconst undici_1 = require(\"undici\");\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (exports.Headers = Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return;\n }\n return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {\n token: `${proxyUrl.username}:${proxyUrl.password}`\n })));\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.1.0\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: consoleWarn,\n error: consoleError\n },\n options.log\n );\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.4\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/util/merge-deep.js\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.0.2\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.2.0\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n requestLog: () => requestLog\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"4.0.0\";\n\n// pkg/dist-src/index.js\nfunction requestLog(octokit) {\n octokit.hook.wrap(\"request\", (request, options) => {\n octokit.log.debug(\"request\", options);\n const start = Date.now();\n const requestOptions = octokit.request.endpoint.parse(options);\n const path = requestOptions.url.replace(options.baseUrl, \"\");\n return request(options).then((response) => {\n octokit.log.info(\n `${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`\n );\n return response;\n }).catch((error) => {\n octokit.log.info(\n `${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`\n );\n throw error;\n });\n });\n}\nrequestLog.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n requestLog\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.0\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n / .*$/,\n \" [REDACTED]\"\n )\n });\n }\n requestCopy.url = requestCopy.url.replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\").replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"\n )\n );\n return statusCode;\n }\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(\n new import_deprecation.Deprecation(\n \"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"\n )\n );\n return headers || {};\n }\n });\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestError\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.2.0\";\n\n// pkg/dist-src/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n signal: (_c = requestOptions.request) == null ? void 0 : _c.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n let suffix;\n if (\"documentation_url\" in data) {\n suffix = ` - ${data.documentation_url}`;\n } else {\n suffix = \"\";\n }\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}${suffix}`;\n }\n return `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_core = require(\"@octokit/core\");\nvar import_plugin_request_log = require(\"@octokit/plugin-request-log\");\nvar import_plugin_paginate_rest = require(\"@octokit/plugin-paginate-rest\");\nvar import_plugin_rest_endpoint_methods = require(\"@octokit/plugin-rest-endpoint-methods\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"20.0.2\";\n\n// pkg/dist-src/index.js\nvar Octokit = import_core.Octokit.plugin(\n import_plugin_request_log.requestLog,\n import_plugin_rest_endpoint_methods.legacyRestEndpointMethods,\n import_plugin_paginate_rest.paginateRest\n).defaults({\n userAgent: `octokit-rest.js/${VERSION}`\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.api = void 0;\nconst common_1 = require(\"./common\");\nfunction api(apiParameters) {\n var _a;\n // If the apiParameters don't include `endpoint` treat it as a partial\n // application.\n if (!apiParameters.endpoint && !apiParameters.url) {\n return partialCall(apiParameters);\n }\n const types = {\n bearer: 'Bearer ',\n token: 'Token token=',\n };\n const { endpoint, server = 'api.pagerduty.com', token, tokenType = apiParameters.tokenType || 'token', url, version = 2, data, ...rest } = apiParameters;\n const config = {\n method: 'GET',\n ...rest,\n headers: {\n Accept: `application/vnd.pagerduty+json;version=${version}`,\n Authorization: `${types[tokenType]}${token}`,\n ...rest.headers,\n },\n };\n // Allow `data` for `queryParameters` for requests without bodies.\n if (isReadonlyRequest(config.method) && data) {\n config.queryParameters =\n (_a = config.queryParameters) !== null && _a !== void 0 ? _a : data;\n }\n else {\n config.body = JSON.stringify(data);\n }\n return apiRequest(url !== null && url !== void 0 ? url : `https://${server}/${endpoint.replace(/^\\/+/, '')}`, config);\n}\nexports.api = api;\nfunction apiRequest(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n apiResponse.response = response;\n if (response.status === 204) {\n return Promise.resolve(apiResponse);\n }\n return response\n .json()\n .then((data) => {\n const resource = resourceKey(url, options.method);\n apiResponse.next = nextFunc(url, options, data);\n apiResponse.data = data;\n apiResponse.resource = resource ? data[resource] : null;\n return apiResponse;\n })\n .catch(() => Promise.reject(apiResponse));\n });\n}\nfunction resourceKey(url, method) {\n const resource = url.match(/.+.com\\/(?[\\w]+)/);\n if (resource) {\n const resourceName = resource[1];\n if (method && method.toLowerCase() === 'get') {\n return resourceName;\n }\n if (resourceName.endsWith('ies')) {\n return resourceName.slice(0, -3) + 'y';\n }\n else if (resourceName.endsWith('s')) {\n return resourceName.slice(0, -1);\n }\n return resourceName;\n }\n return null;\n}\nfunction isReadonlyRequest(method) {\n var _a;\n return !['PUT', 'POST', 'DELETE', 'PATCH'].includes((_a = method.toUpperCase()) !== null && _a !== void 0 ? _a : 'GET');\n}\nfunction isOffsetPagination(data) {\n if (data.offset !== undefined) {\n return true;\n }\n return false;\n}\nfunction isCursorPagination(data) {\n if (data.cursor !== undefined) {\n return true;\n }\n return false;\n}\nfunction nextFunc(url, options, data) {\n if (isOffsetPagination(data)) {\n if ((data === null || data === void 0 ? void 0 : data.more) && typeof data.offset !== undefined && data.limit) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n limit: data.limit.toString(),\n offset: (data.limit + data.offset).toString(),\n },\n });\n }\n }\n else if (isCursorPagination(data)) {\n if (data === null || data === void 0 ? void 0 : data.cursor) {\n return () => apiRequest(url, {\n ...options,\n queryParameters: {\n ...options.queryParameters,\n cursor: data.cursor,\n limit: data.limit.toString(),\n },\n });\n }\n }\n return undefined;\n}\nfunction partialCall(apiParameters) {\n const partialParameters = apiParameters;\n const partial = ((apiParameters) => api({ ...partialParameters, ...apiParameters }));\n const shorthand = (method) => (endpoint, shorthandParameters) => api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n });\n partial.get = shorthand('get');\n partial.post = shorthand('post');\n partial.put = shorthand('put');\n partial.patch = shorthand('patch');\n partial.delete = shorthand('delete');\n partial.all = (endpoint, shorthandParameters) => {\n function allInner(responses) {\n const response = responses[responses.length - 1];\n if (!response.next) {\n // Base case, resolve and return all responses.\n return Promise.resolve(responses);\n }\n // If there are still more resources to get then concat and repeat.\n return response\n .next()\n .then(response => allInner(responses.concat([response])));\n }\n function repackResponses(responses) {\n // Repack the responses object to make it more user friendly.\n const repackedResponse = responses.shift(); // Use the first response to build the standard response object\n repackedResponse.data = [repackedResponse.data];\n responses.forEach(response => {\n repackedResponse.data = repackedResponse.data.concat(response.data);\n repackedResponse.resource = repackedResponse.resource.concat(response.resource);\n });\n return Promise.resolve(repackedResponse);\n }\n const method = 'get';\n return api({\n endpoint,\n method,\n ...partialParameters,\n ...shorthandParameters,\n })\n .then(response => allInner([response]))\n .then(responses => repackResponses(responses));\n };\n return partial;\n}\n//# sourceMappingURL=api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.request = void 0;\n/* LEGACY-BROWSER-SUPPORT-START */\nconst cross_fetch_1 = require(\"cross-fetch\");\nconst browser_or_node_1 = require(\"browser-or-node\");\n/* LEGACY-BROWSER-SUPPORT-END */\nconst VERSION = '2.0.0';\nfunction request(url, options = {}) {\n const { queryParameters, requestTimeout = 30000 } = options;\n url = new URL(url.toString());\n url = applyParameters(url, queryParameters);\n options = applyTimeout(options, requestTimeout);\n return fetch_retry(url.toString(), 3, {\n ...options,\n headers: new cross_fetch_1.Headers({\n 'Content-Type': 'application/json; charset=utf-8',\n /* LEGACY-BROWSER-SUPPORT-START */\n ...userAgentHeader(),\n /* LEGACY-BROWSER-SUPPORT-END */\n ...options.headers,\n }),\n });\n}\nexports.request = request;\nfunction fetch_retry(url, retries, options) {\n return new Promise((resolve, reject) => {\n (0, cross_fetch_1.default)(url, options)\n .then(response => {\n // We don't want to `reject` when retries have finished\n // Instead simply stop trying and return.\n if (retries === 0)\n return resolve(response);\n if (response.status === 429) {\n const { retryTimeout = 20000 } = options;\n retryTimeoutPromise(retryTimeout).then(() => {\n fetch_retry(url, retries - 1, options)\n .then(resolve)\n .catch(reject);\n });\n }\n else {\n clearTimeout(options.requestTimer);\n resolve(response);\n }\n })\n .catch(reject);\n });\n}\nconst retryTimeoutPromise = (milliseconds) => {\n return new Promise(resolve => setTimeout(resolve, milliseconds));\n};\nfunction userAgentHeader() {\n if (browser_or_node_1.isNode) {\n return {\n 'User-Agent': `pdjs/${VERSION} (${process.version}/${process.platform})`,\n };\n }\n else if (browser_or_node_1.isWebWorker) {\n return {\n 'User-Agent': `pdjs/${VERSION} (WebWorker)`,\n };\n }\n else if (browser_or_node_1.isJsDom) {\n return {\n 'User-Agent': `pdjs/${VERSION} (JsDom)`,\n };\n }\n else if (browser_or_node_1.isDeno) {\n return {\n 'User-Agent': `pdjs/${VERSION} (Deno)`,\n };\n }\n else if (browser_or_node_1.isBrowser) {\n return {\n // Note: This will not work consistently for all browsers as some silently drop the userAgent Header.\n 'User-Agent': `pdjs/${VERSION} (${window.navigator.userAgent})`,\n };\n }\n else {\n return {};\n }\n}\nfunction applyParameters(url, queryParameters) {\n if (!queryParameters)\n return url;\n const combinedParameters = url.searchParams;\n for (const key of Object.keys(queryParameters)) {\n const parameter = queryParameters[key];\n if (Array.isArray(parameter)) {\n // Support for array based keys like `additional_fields[]`\n parameter.forEach(item => {\n combinedParameters.append(key, item);\n });\n }\n else {\n combinedParameters.append(key, parameter);\n }\n }\n url.search = combinedParameters.toString();\n return url;\n}\nfunction applyTimeout(init, timeout) {\n if (!timeout)\n return init;\n const timer = setTimeout(() => { }, timeout);\n return {\n ...init,\n requestTimer: timer,\n };\n}\n//# sourceMappingURL=common.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.change = exports.resolve = exports.acknowledge = exports.trigger = exports.event = void 0;\nconst common_1 = require(\"./common\");\nfunction event(eventParameters) {\n const { server = 'events.pagerduty.com', type = 'event', data, ...config } = eventParameters;\n let url = `https://${server}/v2/enqueue`;\n if (type === 'change') {\n url = `https://${server}/v2/change/enqueue`;\n }\n return eventFetch(url, {\n method: 'POST',\n body: JSON.stringify(data),\n ...config,\n });\n}\nexports.event = event;\nconst shorthand = (action) => (eventParameters) => {\n const typeField = 'event_action';\n return event({\n ...eventParameters,\n data: {\n ...eventParameters.data,\n [typeField]: action,\n },\n });\n};\nexports.trigger = shorthand('trigger');\nexports.acknowledge = shorthand('acknowledge');\nexports.resolve = shorthand('resolve');\nconst change = (eventParameters) => event({ ...eventParameters, type: 'change' });\nexports.change = change;\nfunction eventFetch(url, options) {\n return (0, common_1.request)(url, options).then((response) => {\n const apiResponse = response;\n return response.json().then((data) => {\n apiResponse.data = data;\n apiResponse.response = response;\n return apiResponse;\n });\n });\n}\n//# sourceMappingURL=events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolve = exports.acknowledge = exports.trigger = exports.change = exports.event = exports.api = void 0;\nvar api_1 = require(\"./api\");\nObject.defineProperty(exports, \"api\", { enumerable: true, get: function () { return api_1.api; } });\nvar events_1 = require(\"./events\");\nObject.defineProperty(exports, \"event\", { enumerable: true, get: function () { return events_1.event; } });\nObject.defineProperty(exports, \"change\", { enumerable: true, get: function () { return events_1.change; } });\nObject.defineProperty(exports, \"trigger\", { enumerable: true, get: function () { return events_1.trigger; } });\nObject.defineProperty(exports, \"acknowledge\", { enumerable: true, get: function () { return events_1.acknowledge; } });\nObject.defineProperty(exports, \"resolve\", { enumerable: true, get: function () { return events_1.resolve; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IncomingWebhook = void 0;\nconst axios_1 = __importDefault(require(\"axios\"));\nconst errors_1 = require(\"./errors\");\nconst instrument_1 = require(\"./instrument\");\n/**\n * A client for Slack's Incoming Webhooks\n */\nclass IncomingWebhook {\n constructor(url, defaults = {\n timeout: 0,\n }) {\n if (url === undefined) {\n throw new Error('Incoming webhook URL is required');\n }\n this.url = url;\n this.defaults = defaults;\n this.axios = axios_1.default.create({\n baseURL: url,\n httpAgent: defaults.agent,\n httpsAgent: defaults.agent,\n maxRedirects: 0,\n proxy: false,\n timeout: defaults.timeout,\n headers: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'User-Agent': (0, instrument_1.getUserAgent)(),\n },\n });\n delete this.defaults.agent;\n }\n /**\n * Send a notification to a conversation\n * @param message - the message (a simple string, or an object describing the message)\n */\n async send(message) {\n // NOTE: no support for TLS config\n let payload = Object.assign({}, this.defaults);\n if (typeof message === 'string') {\n payload.text = message;\n }\n else {\n payload = Object.assign(payload, message);\n }\n try {\n const response = await this.axios.post(this.url, payload);\n return this.buildResult(response);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }\n catch (error) {\n // Wrap errors in this packages own error types (abstract the implementation details' types)\n if (error.response !== undefined) {\n throw (0, errors_1.httpErrorWithOriginal)(error);\n }\n else if (error.request !== undefined) {\n throw (0, errors_1.requestErrorWithOriginal)(error);\n }\n else {\n throw error;\n }\n }\n }\n /**\n * Processes an HTTP response into an IncomingWebhookResult.\n */\n // eslint-disable-next-line class-methods-use-this\n buildResult(response) {\n return {\n text: response.data,\n };\n }\n}\nexports.IncomingWebhook = IncomingWebhook;\n//# sourceMappingURL=IncomingWebhook.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.httpErrorWithOriginal = exports.requestErrorWithOriginal = exports.ErrorCode = void 0;\n/**\n * A dictionary of codes for errors produced by this package\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[\"RequestError\"] = \"slack_webhook_request_error\";\n ErrorCode[\"HTTPError\"] = \"slack_webhook_http_error\";\n})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));\n/**\n * Factory for producing a {@link CodedError} from a generic error\n */\nfunction errorWithCode(error, code) {\n // NOTE: might be able to return something more specific than a CodedError with conditional typing\n const codedError = error;\n codedError.code = code;\n return codedError;\n}\n/**\n * A factory to create IncomingWebhookRequestError objects\n * @param original The original error\n */\nfunction requestErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`A request error occurred: ${original.message}`), ErrorCode.RequestError);\n error.original = original;\n return error;\n}\nexports.requestErrorWithOriginal = requestErrorWithOriginal;\n/**\n * A factory to create IncomingWebhookHTTPError objects\n * @param original The original error\n */\nfunction httpErrorWithOriginal(original) {\n const error = errorWithCode(new Error(`An HTTP protocol error occurred: statusCode = ${original.response.status}`), ErrorCode.HTTPError);\n error.original = original;\n return error;\n}\nexports.httpErrorWithOriginal = httpErrorWithOriginal;\n//# sourceMappingURL=errors.js.map","\"use strict\";\n/// \nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorCode = exports.IncomingWebhook = void 0;\nvar IncomingWebhook_1 = require(\"./IncomingWebhook\");\nObject.defineProperty(exports, \"IncomingWebhook\", { enumerable: true, get: function () { return IncomingWebhook_1.IncomingWebhook; } });\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"ErrorCode\", { enumerable: true, get: function () { return errors_1.ErrorCode; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUserAgent = exports.addAppMetadata = void 0;\nconst os = __importStar(require(\"os\"));\nconst packageJson = require('../package.json'); // eslint-disable-line import/no-commonjs, @typescript-eslint/no-var-requires\n/**\n * Replaces occurrences of '/' with ':' in a string, since '/' is meaningful inside User-Agent strings as a separator.\n */\nfunction replaceSlashes(s) {\n return s.replace('/', ':');\n}\nconst baseUserAgent = `${replaceSlashes(packageJson.name)}/${packageJson.version} ` +\n `node/${process.version.replace('v', '')} ` +\n `${os.platform()}/${os.release()}`;\nconst appMetadata = {};\n/**\n * Appends the app metadata into the User-Agent value\n * @param appMetadata.name name of tool to be counted in instrumentation\n * @param appMetadata.version version of tool to be counted in instrumentation\n */\nfunction addAppMetadata({ name, version }) {\n appMetadata[replaceSlashes(name)] = version;\n}\nexports.addAppMetadata = addAppMetadata;\n/**\n * Returns the current User-Agent value for instrumentation\n */\nfunction getUserAgent() {\n const appIdentifier = Object.entries(appMetadata).map(([name, version]) => `${name}/${version}`).join(' ');\n // only prepend the appIdentifier when its not empty\n return ((appIdentifier.length > 0) ? `${appIdentifier} ` : '') + baseUserAgent;\n}\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=instrument.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.LoginRequestResponse = exports.ErrorResponse = exports.SuccessResponse = exports.ActivityResponse = exports.ActivityRequestError = exports.ActivityRequestTrigger = void 0;\r\nvar ActivityRequestTrigger;\r\n(function (ActivityRequestTrigger) {\r\n ActivityRequestTrigger[\"Automatic\"] = \"automatic\";\r\n ActivityRequestTrigger[\"Manual\"] = \"manual\";\r\n})(ActivityRequestTrigger = exports.ActivityRequestTrigger || (exports.ActivityRequestTrigger = {}));\r\nvar ActivityRequestError = /** @class */ (function () {\r\n function ActivityRequestError(code, message) {\r\n this.code = code;\r\n this.message = message;\r\n }\r\n return ActivityRequestError;\r\n}());\r\nexports.ActivityRequestError = ActivityRequestError;\r\nvar ActivityResponse = /** @class */ (function () {\r\n function ActivityResponse(request) {\r\n this.request = request;\r\n }\r\n return ActivityResponse;\r\n}());\r\nexports.ActivityResponse = ActivityResponse;\r\nvar SuccessResponse = /** @class */ (function (_super) {\r\n __extends(SuccessResponse, _super);\r\n function SuccessResponse(request, rawContent) {\r\n var _this = _super.call(this, request) || this;\r\n _this.request = request;\r\n _this.rawContent = rawContent;\r\n return _this;\r\n }\r\n return SuccessResponse;\r\n}(ActivityResponse));\r\nexports.SuccessResponse = SuccessResponse;\r\nvar ErrorResponse = /** @class */ (function (_super) {\r\n __extends(ErrorResponse, _super);\r\n function ErrorResponse(request, error) {\r\n var _this = _super.call(this, request) || this;\r\n _this.request = request;\r\n _this.error = error;\r\n return _this;\r\n }\r\n return ErrorResponse;\r\n}(ActivityResponse));\r\nexports.ErrorResponse = ErrorResponse;\r\nvar LoginRequestResponse = /** @class */ (function (_super) {\r\n __extends(LoginRequestResponse, _super);\r\n function LoginRequestResponse(request, auth) {\r\n var _this = _super.call(this, request) || this;\r\n _this.request = request;\r\n _this._auth = auth;\r\n for (var _i = 0, _a = _this._auth.buttons; _i < _a.length; _i++) {\r\n var button = _a[_i];\r\n if (button.type === \"signin\" && button.value !== undefined) {\r\n try {\r\n new URL(button.value);\r\n _this.signinButton = button;\r\n break;\r\n }\r\n catch (e) {\r\n // Ignore parsing error\r\n }\r\n }\r\n }\r\n return _this;\r\n }\r\n Object.defineProperty(LoginRequestResponse.prototype, \"tokenExchangeResource\", {\r\n get: function () {\r\n return this._auth.tokenExchangeResource;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return LoginRequestResponse;\r\n}(ActivityResponse));\r\nexports.LoginRequestResponse = LoginRequestResponse;\r\n//# sourceMappingURL=activity-request.js.map","\"use strict\";\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AdaptiveApplet = void 0;\r\n// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar Utils = require(\"./utils\");\r\nvar shared_1 = require(\"./shared\");\r\nvar activity_request_1 = require(\"./activity-request\");\r\nvar strings_1 = require(\"./strings\");\r\nvar card_elements_1 = require(\"./card-elements\");\r\nvar serialization_1 = require(\"./serialization\");\r\nfunction logEvent(level, message) {\r\n var optionalParams = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n optionalParams[_i - 2] = arguments[_i];\r\n }\r\n if (shared_1.GlobalSettings.applets.logEnabled) {\r\n if (shared_1.GlobalSettings.applets.onLogEvent) {\r\n shared_1.GlobalSettings.applets.onLogEvent(level, message, optionalParams);\r\n }\r\n else {\r\n /* eslint-disable no-console */\r\n switch (level) {\r\n case Enums.LogLevel.Warning:\r\n console.warn(message, optionalParams);\r\n break;\r\n case Enums.LogLevel.Error:\r\n console.error(message, optionalParams);\r\n break;\r\n default:\r\n console.log(message, optionalParams);\r\n break;\r\n }\r\n /* eslint-enable no-console */\r\n }\r\n }\r\n}\r\nvar ActivityRequest = /** @class */ (function () {\r\n function ActivityRequest(action, trigger, consecutiveActions) {\r\n this.action = action;\r\n this.trigger = trigger;\r\n this.consecutiveActions = consecutiveActions;\r\n this.attemptNumber = 0;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/require-await\r\n ActivityRequest.prototype.retryAsync = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n if (this.onSend) {\r\n this.onSend(this);\r\n }\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n return ActivityRequest;\r\n}());\r\nvar AdaptiveApplet = /** @class */ (function () {\r\n function AdaptiveApplet() {\r\n this._allowAutomaticCardUpdate = false;\r\n this.renderedElement = document.createElement(\"div\");\r\n this.renderedElement.className = \"aaf-cardHost\";\r\n this.renderedElement.style.position = \"relative\";\r\n this.renderedElement.style.display = \"flex\";\r\n this.renderedElement.style.flexDirection = \"column\";\r\n this._cardHostElement = document.createElement(\"div\");\r\n this._refreshButtonHostElement = document.createElement(\"div\");\r\n this._refreshButtonHostElement.className = \"aaf-refreshButtonHost\";\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n this.renderedElement.appendChild(this._cardHostElement);\r\n this.renderedElement.appendChild(this._refreshButtonHostElement);\r\n }\r\n AdaptiveApplet.prototype.displayCard = function (card) {\r\n if (card.renderedElement) {\r\n Utils.clearElementChildren(this._cardHostElement);\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n this._cardHostElement.appendChild(card.renderedElement);\r\n }\r\n else {\r\n throw new Error(\"displayCard: undefined card.\");\r\n }\r\n };\r\n AdaptiveApplet.prototype.showManualRefreshButton = function (refreshAction) {\r\n var _this = this;\r\n var displayBuiltInManualRefreshButton = this.onShowManualRefreshButton\r\n ? this.onShowManualRefreshButton(this)\r\n : true;\r\n if (displayBuiltInManualRefreshButton) {\r\n this._refreshButtonHostElement.style.display = \"none\";\r\n var renderedRefreshButton = undefined;\r\n if (this.onRenderManualRefreshButton) {\r\n renderedRefreshButton = this.onRenderManualRefreshButton(this);\r\n }\r\n else {\r\n var message = strings_1.Strings.runtime.refreshThisCard();\r\n if (shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Automatic) {\r\n var autoRefreshPausedMessage = strings_1.Strings.runtime.automaticRefreshPaused();\r\n if (autoRefreshPausedMessage[autoRefreshPausedMessage.length - 1] !== \" \") {\r\n autoRefreshPausedMessage += \" \";\r\n }\r\n message = strings_1.Strings.runtime.clckToRestartAutomaticRefresh();\r\n }\r\n var cardPayload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.2\",\r\n body: [\r\n {\r\n type: \"RichTextBlock\",\r\n horizontalAlignment: \"right\",\r\n inlines: [\r\n {\r\n type: \"TextRun\",\r\n text: message,\r\n selectAction: {\r\n type: \"Action.Submit\",\r\n id: \"refreshCard\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n var card = new card_elements_1.AdaptiveCard();\r\n card.parse(cardPayload, new card_elements_1.SerializationContext(serialization_1.Versions.v1_2));\r\n card.onExecuteAction = function (action) {\r\n if (action.id === \"refreshCard\") {\r\n Utils.clearElementChildren(_this._refreshButtonHostElement);\r\n _this.internalExecuteAction(refreshAction, activity_request_1.ActivityRequestTrigger.Automatic, 0);\r\n }\r\n };\r\n renderedRefreshButton = card.render();\r\n }\r\n if (renderedRefreshButton) {\r\n Utils.clearElementChildren(this._refreshButtonHostElement);\r\n this._refreshButtonHostElement.appendChild(renderedRefreshButton);\r\n this._refreshButtonHostElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n };\r\n AdaptiveApplet.prototype.createActivityRequest = function (action, trigger, consecutiveActions) {\r\n var _this = this;\r\n if (this.card) {\r\n var request_1 = new ActivityRequest(action, trigger, consecutiveActions);\r\n request_1.onSend = function (sender) {\r\n sender.attemptNumber++;\r\n void _this.internalSendActivityRequestAsync(request_1);\r\n };\r\n var cancel = this.onPrepareActivityRequest\r\n ? !this.onPrepareActivityRequest(this, request_1, action)\r\n : false;\r\n return cancel ? undefined : request_1;\r\n }\r\n else {\r\n throw new Error(\"createActivityRequest: no card has been set.\");\r\n }\r\n };\r\n AdaptiveApplet.prototype.createMagicCodeInputCard = function (attemptNumber) {\r\n var payload = {\r\n type: \"AdaptiveCard\",\r\n version: \"1.0\",\r\n body: [\r\n {\r\n type: \"TextBlock\",\r\n color: \"attention\",\r\n text: attemptNumber === 1 ? undefined : \"That didn't work... let's try again.\",\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"TextBlock\",\r\n text: 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"',\r\n wrap: true,\r\n horizontalAlignment: \"center\"\r\n },\r\n {\r\n type: \"Input.Text\",\r\n id: \"magicCode\",\r\n placeholder: \"Enter magic code\"\r\n },\r\n {\r\n type: \"ActionSet\",\r\n horizontalAlignment: \"center\",\r\n actions: [\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._submitMagicCodeActionId,\r\n title: \"Submit\"\r\n },\r\n {\r\n type: \"Action.Submit\",\r\n id: AdaptiveApplet._cancelMagicCodeAuthActionId,\r\n title: \"Cancel\"\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n var card = new card_elements_1.AdaptiveCard();\r\n card.parse(payload);\r\n return card;\r\n };\r\n AdaptiveApplet.prototype.cancelAutomaticRefresh = function () {\r\n if (this._allowAutomaticCardUpdate) {\r\n logEvent(Enums.LogLevel.Warning, \"Automatic card refresh has been cancelled as a result of the user interacting with the card.\");\r\n }\r\n this._allowAutomaticCardUpdate = false;\r\n };\r\n AdaptiveApplet.prototype.createSerializationContext = function () {\r\n return this.onCreateSerializationContext\r\n ? this.onCreateSerializationContext(this)\r\n : new card_elements_1.SerializationContext();\r\n };\r\n AdaptiveApplet.prototype.internalSetCard = function (payload, consecutiveActions) {\r\n var _this = this;\r\n if (typeof payload === \"object\" && payload[\"type\"] === \"AdaptiveCard\") {\r\n this._cardPayload = payload;\r\n }\r\n if (this._cardPayload) {\r\n try {\r\n var card = new card_elements_1.AdaptiveCard();\r\n if (this.hostConfig) {\r\n card.hostConfig = this.hostConfig;\r\n }\r\n var serializationContext = this.createSerializationContext();\r\n card.parse(this._cardPayload, serializationContext);\r\n var doChangeCard = this.onCardChanging\r\n ? this.onCardChanging(this, this._cardPayload)\r\n : true;\r\n if (doChangeCard) {\r\n this._card = card;\r\n if (this._card.authentication &&\r\n this._card.authentication.tokenExchangeResource &&\r\n this.onPrefetchSSOToken) {\r\n this.onPrefetchSSOToken(this, this._card.authentication.tokenExchangeResource);\r\n }\r\n this._card.onExecuteAction = function (action) {\r\n // If the user takes an action, cancel any pending automatic refresh\r\n _this.cancelAutomaticRefresh();\r\n _this.internalExecuteAction(action, activity_request_1.ActivityRequestTrigger.Manual, 0);\r\n };\r\n this._card.onInputValueChanged = function (input) {\r\n var _a, _b, _c;\r\n // If the user modifies an input, cancel any pending automatic refresh\r\n _this.cancelAutomaticRefresh();\r\n if (input instanceof card_elements_1.ChoiceSetInput && input.isDynamicTypeahead()) {\r\n var filter = input.getFilterForDynamicSearch();\r\n if (filter) {\r\n var dataQueryAction = new card_elements_1.DataQuery();\r\n dataQueryAction.filter = filter;\r\n dataQueryAction.dataset = ((_a = input.choicesData) === null || _a === void 0 ? void 0 : _a.dataset) || \"\";\r\n dataQueryAction.count = (_b = input.choicesData) === null || _b === void 0 ? void 0 : _b.count;\r\n dataQueryAction.skip = (_c = input.choicesData) === null || _c === void 0 ? void 0 : _c.skip;\r\n _this._choiceSet = input;\r\n _this.internalExecuteAction(dataQueryAction, activity_request_1.ActivityRequestTrigger.Manual, 0 // consecutiveActions\r\n );\r\n }\r\n }\r\n };\r\n this._card.render();\r\n if (this._card.renderedElement) {\r\n this.displayCard(this._card);\r\n if (this.onCardChanged) {\r\n this.onCardChanged(this);\r\n }\r\n if (this._card.refresh) {\r\n if (shared_1.GlobalSettings.applets.refresh.mode ===\r\n Enums.RefreshMode.Automatic &&\r\n consecutiveActions <\r\n shared_1.GlobalSettings.applets.refresh\r\n .maximumConsecutiveAutomaticRefreshes) {\r\n if (shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes <=\r\n 0) {\r\n logEvent(Enums.LogLevel.Info, \"Triggering automatic card refresh number \" +\r\n (consecutiveActions + 1));\r\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveActions + 1);\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Info, \"Scheduling automatic card refresh number \" +\r\n (consecutiveActions + 1) +\r\n \" in \" +\r\n shared_1.GlobalSettings.applets.refresh\r\n .timeBetweenAutomaticRefreshes +\r\n \"ms\");\r\n var action_1 = this._card.refresh.action;\r\n this._allowAutomaticCardUpdate = true;\r\n window.setTimeout(function () {\r\n if (_this._allowAutomaticCardUpdate) {\r\n _this.internalExecuteAction(action_1, activity_request_1.ActivityRequestTrigger.Automatic, consecutiveActions + 1);\r\n }\r\n }, shared_1.GlobalSettings.applets.refresh.timeBetweenAutomaticRefreshes);\r\n }\r\n }\r\n else if (shared_1.GlobalSettings.applets.refresh.mode !== Enums.RefreshMode.Disabled) {\r\n if (consecutiveActions > 0) {\r\n logEvent(Enums.LogLevel.Warning, \"Stopping automatic refreshes after \" +\r\n consecutiveActions +\r\n \" consecutive refreshes.\");\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Warning, \"The card has a refresh section, but automatic refreshes are disabled.\");\r\n }\r\n if (shared_1.GlobalSettings.applets.refresh\r\n .allowManualRefreshesAfterAutomaticRefreshes ||\r\n shared_1.GlobalSettings.applets.refresh.mode === Enums.RefreshMode.Manual) {\r\n logEvent(Enums.LogLevel.Info, \"Showing manual refresh button.\");\r\n this.showManualRefreshButton(this._card.refresh.action);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (error) {\r\n // Ignore all errors\r\n logEvent(Enums.LogLevel.Error, \"setCard: \" + error);\r\n }\r\n }\r\n };\r\n AdaptiveApplet.prototype.internalExecuteAction = function (action, trigger, consecutiveActions) {\r\n if (action instanceof card_elements_1.UniversalAction) {\r\n if (this.channelAdapter) {\r\n var request = this.createActivityRequest(action, trigger, consecutiveActions);\r\n if (request) {\r\n void request.retryAsync();\r\n }\r\n }\r\n else {\r\n throw new Error(\"internalExecuteAction: No channel adapter set.\");\r\n }\r\n }\r\n if (this.onAction) {\r\n this.onAction(this, action);\r\n }\r\n };\r\n AdaptiveApplet.prototype.createProgressOverlay = function (request) {\r\n if (!this._progressOverlay) {\r\n if (this.onCreateProgressOverlay) {\r\n this._progressOverlay = this.onCreateProgressOverlay(this, request);\r\n }\r\n else {\r\n this._progressOverlay = document.createElement(\"div\");\r\n this._progressOverlay.className = \"aaf-progress-overlay\";\r\n var spinner = document.createElement(\"div\");\r\n spinner.className = \"aaf-spinner\";\r\n spinner.style.width = \"28px\";\r\n spinner.style.height = \"28px\";\r\n this._progressOverlay.appendChild(spinner);\r\n }\r\n }\r\n return this._progressOverlay;\r\n };\r\n AdaptiveApplet.prototype.removeProgressOverlay = function (request) {\r\n if (this.onRemoveProgressOverlay) {\r\n this.onRemoveProgressOverlay(this, request);\r\n }\r\n if (this._progressOverlay !== undefined) {\r\n this.renderedElement.removeChild(this._progressOverlay);\r\n this._progressOverlay = undefined;\r\n }\r\n };\r\n AdaptiveApplet.prototype.activityRequestSucceeded = function (response, parsedContent) {\r\n if (this.onActivityRequestSucceeded) {\r\n this.onActivityRequestSucceeded(this, response, parsedContent);\r\n }\r\n };\r\n AdaptiveApplet.prototype.activityRequestFailed = function (response) {\r\n return this.onActivityRequestFailed\r\n ? this.onActivityRequestFailed(this, response)\r\n : shared_1.GlobalSettings.applets.defaultTimeBetweenRetryAttempts;\r\n };\r\n AdaptiveApplet.prototype.showAuthCodeInputDialog = function (request) {\r\n var _this = this;\r\n var showBuiltInAuthCodeInputCard = this.onShowAuthCodeInputDialog\r\n ? this.onShowAuthCodeInputDialog(this, request)\r\n : true;\r\n if (showBuiltInAuthCodeInputCard) {\r\n var authCodeInputCard = this.createMagicCodeInputCard(request.attemptNumber);\r\n authCodeInputCard.render();\r\n authCodeInputCard.onExecuteAction = function (submitMagicCodeAction) {\r\n if (_this.card && submitMagicCodeAction instanceof card_elements_1.SubmitAction) {\r\n switch (submitMagicCodeAction.id) {\r\n case AdaptiveApplet._submitMagicCodeActionId:\r\n var authCode = undefined;\r\n if (submitMagicCodeAction.data &&\r\n typeof submitMagicCodeAction.data[\"magicCode\"] === \"string\") {\r\n authCode = submitMagicCodeAction.data[\"magicCode\"];\r\n }\r\n if (authCode) {\r\n _this.displayCard(_this.card);\r\n request.authCode = authCode;\r\n void request.retryAsync();\r\n }\r\n else {\r\n alert(\"Please enter the magic code you received.\");\r\n }\r\n break;\r\n case AdaptiveApplet._cancelMagicCodeAuthActionId:\r\n logEvent(Enums.LogLevel.Warning, \"Authentication cancelled by user.\");\r\n _this.displayCard(_this.card);\r\n break;\r\n default:\r\n logEvent(Enums.LogLevel.Error, \"Unexpected action taken from magic code input card (id = \" +\r\n submitMagicCodeAction.id +\r\n \")\");\r\n alert(strings_1.Strings.magicCodeInputCard.somethingWentWrong());\r\n break;\r\n }\r\n }\r\n };\r\n this.displayCard(authCodeInputCard);\r\n }\r\n };\r\n AdaptiveApplet.prototype.internalSendActivityRequestAsync = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var action;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendActivityRequestAsync: channelAdapter is not set.\");\r\n }\r\n action = request.action;\r\n if (!(action instanceof card_elements_1.ExecuteAction)) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.internalSendExecuteRequestAsync(request)];\r\n case 1:\r\n _a.sent();\r\n return [3 /*break*/, 5];\r\n case 2:\r\n if (!(action instanceof card_elements_1.DataQuery)) return [3 /*break*/, 4];\r\n return [4 /*yield*/, this.internalSendDataQueryRequestAsync(request)];\r\n case 3:\r\n _a.sent();\r\n return [3 /*break*/, 5];\r\n case 4: throw new Error(\"internalSendActivityRequestAsync: Unhandled Action Type\");\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n AdaptiveApplet.prototype.internalSendExecuteRequestAsync = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var overlay, done, _loop_1, this_1, state_1;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendExecuteRequestAsync: channelAdapter is not set.\");\r\n }\r\n overlay = this.createProgressOverlay(request);\r\n if (overlay !== undefined) {\r\n this.renderedElement.appendChild(overlay);\r\n }\r\n done = false;\r\n _loop_1 = function () {\r\n var response, error_1, parsedContent, retryIn_1, attemptOAuth, left, top_1;\r\n return __generator(this, function (_b) {\r\n switch (_b.label) {\r\n case 0:\r\n response = undefined;\r\n if (request.attemptNumber === 1) {\r\n logEvent(Enums.LogLevel.Info, \"Sending activity request to channel (attempt \" + request.attemptNumber + \")\");\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Info, \"Re-sending activity request to channel (attempt \" + request.attemptNumber + \")\");\r\n }\r\n _b.label = 1;\r\n case 1:\r\n _b.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this_1.channelAdapter.sendRequestAsync(request)];\r\n case 2:\r\n response = _b.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n error_1 = _b.sent();\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error_1);\r\n this_1.removeProgressOverlay(request);\r\n done = true;\r\n return [3 /*break*/, 4];\r\n case 4:\r\n if (!response) return [3 /*break*/, 10];\r\n if (!(response instanceof activity_request_1.SuccessResponse)) return [3 /*break*/, 5];\r\n this_1.removeProgressOverlay(request);\r\n if (response.rawContent === undefined) {\r\n throw new Error(\"internalSendExecuteRequestAsync: Action.Execute result is undefined\");\r\n }\r\n parsedContent = response.rawContent;\r\n try {\r\n parsedContent = JSON.parse(response.rawContent);\r\n }\r\n catch (_c) {\r\n // Leave parseContent as is\r\n }\r\n if (typeof parsedContent === \"string\") {\r\n logEvent(Enums.LogLevel.Info, \"The activity request returned a string after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\");\r\n this_1.activityRequestSucceeded(response, parsedContent);\r\n }\r\n else if (typeof parsedContent === \"object\" &&\r\n parsedContent[\"type\"] === \"AdaptiveCard\") {\r\n logEvent(Enums.LogLevel.Info, \"The activity request returned an Adaptive Card after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\");\r\n this_1.internalSetCard(parsedContent, request.consecutiveActions);\r\n this_1.activityRequestSucceeded(response, this_1.card);\r\n }\r\n else {\r\n throw new Error(\"internalSendExecuteRequestAsync: Action.Execute result is of unsupported type (\" +\r\n typeof response.rawContent +\r\n \")\");\r\n }\r\n done = true;\r\n return [3 /*break*/, 10];\r\n case 5:\r\n if (!(response instanceof activity_request_1.ErrorResponse)) return [3 /*break*/, 9];\r\n retryIn_1 = this_1.activityRequestFailed(response);\r\n if (!(retryIn_1 >= 0 &&\r\n request.attemptNumber < shared_1.GlobalSettings.applets.maximumRetryAttempts)) return [3 /*break*/, 7];\r\n logEvent(Enums.LogLevel.Warning, \"Activity request failed: \".concat(response.error.message, \". Retrying in \").concat(retryIn_1, \"ms\"));\r\n request.attemptNumber++;\r\n return [4 /*yield*/, new Promise(function (resolve, _reject) {\r\n window.setTimeout(function () {\r\n resolve();\r\n }, retryIn_1);\r\n })];\r\n case 6:\r\n _b.sent();\r\n return [3 /*break*/, 8];\r\n case 7:\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \".concat(response.error.message, \". Giving up after \").concat(request.attemptNumber, \" attempt(s)\"));\r\n this_1.removeProgressOverlay(request);\r\n done = true;\r\n _b.label = 8;\r\n case 8: return [3 /*break*/, 10];\r\n case 9:\r\n if (response instanceof activity_request_1.LoginRequestResponse) {\r\n logEvent(Enums.LogLevel.Info, \"The activity request returned a LoginRequestResponse after \" +\r\n request.attemptNumber +\r\n \" attempt(s).\");\r\n if (request.attemptNumber <= shared_1.GlobalSettings.applets.maximumRetryAttempts) {\r\n attemptOAuth = true;\r\n if (response.tokenExchangeResource && this_1.onSSOTokenNeeded) {\r\n // Attempt to use SSO. The host will return true if it can handle SSO, in which case\r\n // we bypass OAuth\r\n attemptOAuth = !this_1.onSSOTokenNeeded(this_1, request, response.tokenExchangeResource);\r\n }\r\n if (attemptOAuth) {\r\n // Attempt to use OAuth\r\n this_1.removeProgressOverlay(request);\r\n if (response.signinButton === undefined) {\r\n throw new Error(\"internalSendExecuteRequestAsync: the login request doesn't contain a valid signin URL.\");\r\n }\r\n logEvent(Enums.LogLevel.Info, \"Login required at \" + response.signinButton.value);\r\n if (this_1.onShowSigninPrompt) {\r\n // Bypass the built-in auth prompt if the host app handles it\r\n this_1.onShowSigninPrompt(this_1, request, response.signinButton);\r\n }\r\n else {\r\n this_1.showAuthCodeInputDialog(request);\r\n left = window.screenX +\r\n (window.outerWidth - shared_1.GlobalSettings.applets.authPromptWidth) /\r\n 2;\r\n top_1 = window.screenY +\r\n (window.outerHeight - shared_1.GlobalSettings.applets.authPromptHeight) /\r\n 2;\r\n window.open(response.signinButton.value, response.signinButton.title\r\n ? response.signinButton.title\r\n : \"Sign in\", \"width=\".concat(shared_1.GlobalSettings.applets.authPromptWidth, \",height=\").concat(shared_1.GlobalSettings.applets.authPromptHeight, \",left=\").concat(left, \",top=\").concat(top_1));\r\n }\r\n }\r\n }\r\n else {\r\n logEvent(Enums.LogLevel.Error, \"Authentication failed. Giving up after \" +\r\n request.attemptNumber +\r\n \" attempt(s)\");\r\n alert(strings_1.Strings.magicCodeInputCard.authenticationFailed());\r\n }\r\n return [2 /*return*/, \"break\"];\r\n }\r\n else {\r\n throw new Error(\"Unhandled response type: \" + JSON.stringify(response));\r\n }\r\n _b.label = 10;\r\n case 10: return [2 /*return*/];\r\n }\r\n });\r\n };\r\n this_1 = this;\r\n _a.label = 1;\r\n case 1:\r\n if (!!done) return [3 /*break*/, 3];\r\n return [5 /*yield**/, _loop_1()];\r\n case 2:\r\n state_1 = _a.sent();\r\n if (state_1 === \"break\")\r\n return [3 /*break*/, 3];\r\n return [3 /*break*/, 1];\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n AdaptiveApplet.prototype.internalSendDataQueryRequestAsync = function (request) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var filter, response, error_2, rawResponse, parsedResponse;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!this.channelAdapter) {\r\n throw new Error(\"internalSendDataQueryRequestAsync: channel adapter not set\");\r\n }\r\n filter = request.action.filter;\r\n if (!this._choiceSet) return [3 /*break*/, 5];\r\n this._choiceSet.showLoadingIndicator();\r\n response = undefined;\r\n _a.label = 1;\r\n case 1:\r\n _a.trys.push([1, 3, , 4]);\r\n return [4 /*yield*/, this.channelAdapter.sendRequestAsync(request)];\r\n case 2:\r\n response = _a.sent();\r\n return [3 /*break*/, 4];\r\n case 3:\r\n error_2 = _a.sent();\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \" + error_2);\r\n return [3 /*break*/, 4];\r\n case 4:\r\n if (response) {\r\n if (response instanceof activity_request_1.SuccessResponse) {\r\n rawResponse = response.rawContent;\r\n if (rawResponse) {\r\n parsedResponse = void 0;\r\n try {\r\n parsedResponse = JSON.parse(rawResponse);\r\n }\r\n catch (error) {\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n throw new Error(\"internalSendDataQueryRequestAsync: Cannot parse response object: \" +\r\n rawResponse);\r\n }\r\n if (typeof parsedResponse === \"object\") {\r\n this._choiceSet.renderChoices(filter, parsedResponse);\r\n this.activityRequestSucceeded(response, rawResponse);\r\n }\r\n else {\r\n this._choiceSet.showErrorIndicator(filter, \"Error loading results\");\r\n throw new Error(\"internalSendDataQueryRequestAsync: Data.Query result is of unsupported type (\" +\r\n typeof rawResponse +\r\n \")\");\r\n }\r\n }\r\n else {\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n throw new Error(\"internalSendDataQueryRequestAsync: Data.Query result is undefined\");\r\n }\r\n }\r\n else if (response instanceof activity_request_1.ErrorResponse) {\r\n this._choiceSet.showErrorIndicator(filter, response.error.message || \"Error loading results\");\r\n logEvent(Enums.LogLevel.Error, \"Activity request failed: \".concat(response.error.message, \".\"));\r\n this.activityRequestFailed(response);\r\n }\r\n else {\r\n this._choiceSet.showErrorIndicator(filter, \"Unable to load\");\r\n throw new Error(\"Unhandled response type: \" + JSON.stringify(response));\r\n }\r\n }\r\n else {\r\n this._choiceSet.removeLoadingIndicator();\r\n }\r\n _a.label = 5;\r\n case 5: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n AdaptiveApplet.prototype.refreshCard = function () {\r\n if (this._card && this._card.refresh) {\r\n this.internalExecuteAction(this._card.refresh.action, activity_request_1.ActivityRequestTrigger.Manual, 0);\r\n }\r\n };\r\n AdaptiveApplet.prototype.setCard = function (payload) {\r\n this.internalSetCard(payload, 0);\r\n };\r\n Object.defineProperty(AdaptiveApplet.prototype, \"card\", {\r\n get: function () {\r\n return this._card;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveApplet._submitMagicCodeActionId = \"submitMagicCode\";\r\n AdaptiveApplet._cancelMagicCodeAuthActionId = \"cancelMagicCodeAuth\";\r\n return AdaptiveApplet;\r\n}());\r\nexports.AdaptiveApplet = AdaptiveApplet;\r\n//# sourceMappingURL=adaptive-applet.js.map","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n__exportStar(require(\"./strings\"), exports);\r\n__exportStar(require(\"./enums\"), exports);\r\n__exportStar(require(\"./shared\"), exports);\r\n__exportStar(require(\"./utils\"), exports);\r\n__exportStar(require(\"./serialization\"), exports);\r\n__exportStar(require(\"./host-capabilities\"), exports);\r\n__exportStar(require(\"./host-config\"), exports);\r\n__exportStar(require(\"./registry\"), exports);\r\n__exportStar(require(\"./card-object\"), exports);\r\n__exportStar(require(\"./card-elements\"), exports);\r\n__exportStar(require(\"./carousel\"), exports);\r\n__exportStar(require(\"./table\"), exports);\r\n__exportStar(require(\"./channel-adapter\"), exports);\r\n__exportStar(require(\"./activity-request\"), exports);\r\n__exportStar(require(\"./adaptive-applet\"), exports);\r\n//# sourceMappingURL=adaptivecards.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BackgroundImage = exports.ContainerBase = exports.StylableCardElementContainer = exports.ContainerStyleProperty = exports.ActionSet = exports.ShowCardAction = exports.HttpAction = exports.HttpHeader = exports.ToggleVisibilityAction = exports.OpenUrlAction = exports.DataQuery = exports.ExecuteAction = exports.UniversalAction = exports.SubmitAction = exports.SubmitActionBase = exports.Action = exports.TimeInput = exports.TimeProperty = exports.DateInput = exports.NumberInput = exports.FilteredChoiceSet = exports.ChoiceSetInput = exports.ChoiceSetInputDataQuery = exports.Choice = exports.ToggleInput = exports.TextInput = exports.Input = exports.Media = exports.YouTubePlayer = exports.DailymotionPlayer = exports.VimeoPlayer = exports.IFrameMediaMediaPlayer = exports.CustomMediaPlayer = exports.HTML5MediaPlayer = exports.MediaPlayer = exports.MediaSource = exports.CaptionSource = exports.ContentSource = exports.ImageSet = exports.CardElementContainer = exports.Image = exports.FactSet = exports.Fact = exports.RichTextBlock = exports.TextRun = exports.TextBlock = exports.BaseTextBlock = exports.ActionProperty = exports.CardElement = exports.renderSeparation = void 0;\r\nexports.SerializationContext = exports.AdaptiveCard = exports.Authentication = exports.TokenExchangeResource = exports.AuthCardButton = exports.RefreshDefinition = exports.RefreshActionProperty = exports.ContainerWithActions = exports.ColumnSet = exports.Column = exports.Container = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar shared_1 = require(\"./shared\");\r\nvar Utils = require(\"./utils\");\r\nvar host_config_1 = require(\"./host-config\");\r\nvar TextFormatters = require(\"./text-formatters\");\r\nvar card_object_1 = require(\"./card-object\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar registry_1 = require(\"./registry\");\r\nvar strings_1 = require(\"./strings\");\r\nvar controls_1 = require(\"./controls\");\r\nfunction clearElement(element) {\r\n var _a, _b;\r\n var trustedHtml = (typeof window === 'undefined') ? \"\" : ((_b = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.emptyHTML) !== null && _b !== void 0 ? _b : \"\");\r\n element.innerHTML = trustedHtml;\r\n}\r\nfunction renderSeparation(hostConfig, separationDefinition, orientation) {\r\n if (separationDefinition.spacing > 0 ||\r\n (separationDefinition.lineThickness && separationDefinition.lineThickness > 0)) {\r\n var separator = document.createElement(\"div\");\r\n separator.className = hostConfig.makeCssClassName(\"ac-\" +\r\n (orientation === Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\") +\r\n \"-separator\");\r\n separator.setAttribute(\"aria-hidden\", \"true\");\r\n var color = separationDefinition.lineColor\r\n ? Utils.stringToCssColor(separationDefinition.lineColor)\r\n : \"\";\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingTop = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginBottom = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderBottom =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n }\r\n else {\r\n separator.style.height = separationDefinition.spacing + \"px\";\r\n }\r\n }\r\n else {\r\n if (separationDefinition.lineThickness) {\r\n separator.style.paddingLeft = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.marginRight = separationDefinition.spacing / 2 + \"px\";\r\n separator.style.borderRight =\r\n separationDefinition.lineThickness + \"px solid \" + color;\r\n }\r\n else {\r\n separator.style.width = separationDefinition.spacing + \"px\";\r\n }\r\n }\r\n separator.style.overflow = \"hidden\";\r\n separator.style.flex = \"0 0 auto\";\r\n return separator;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.renderSeparation = renderSeparation;\r\nvar CardElement = /** @class */ (function (_super) {\r\n __extends(CardElement, _super);\r\n function CardElement() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._truncatedDueToOverflow = false;\r\n return _this;\r\n }\r\n Object.defineProperty(CardElement.prototype, \"lang\", {\r\n get: function () {\r\n var lang = this.getValue(CardElement.langProperty);\r\n if (lang) {\r\n return lang;\r\n }\r\n else {\r\n if (this.parent) {\r\n return this.parent.lang;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n },\r\n set: function (value) {\r\n this.setValue(CardElement.langProperty, value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isVisible\", {\r\n get: function () {\r\n return this.getValue(CardElement.isVisibleProperty);\r\n },\r\n set: function (value) {\r\n // If the element is going to be hidden, reset any changes that were due\r\n // to overflow truncation (this ensures that if the element is later\r\n // un-hidden it has the right content)\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && !value) {\r\n this.undoOverflowTruncation();\r\n }\r\n if (this.isVisible !== value) {\r\n this.setValue(CardElement.isVisibleProperty, value);\r\n this.updateRenderedElementVisibility();\r\n if (this._renderedElement) {\r\n raiseElementVisibilityChangedEvent(this);\r\n }\r\n }\r\n if (this._renderedElement) {\r\n this._renderedElement.setAttribute(\"aria-expanded\", value.toString());\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElement.prototype.internalRenderSeparator = function () {\r\n var renderedSeparator = renderSeparation(this.hostConfig, {\r\n spacing: this.hostConfig.getEffectiveSpacing(this.spacing),\r\n lineThickness: this.separator ? this.hostConfig.separator.lineThickness : undefined,\r\n lineColor: this.separator ? this.hostConfig.separator.lineColor : undefined\r\n }, this.separatorOrientation);\r\n if (shared_1.GlobalSettings.alwaysBleedSeparators &&\r\n renderedSeparator &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n // Adjust separator's margins if the option to always bleed separators is turned on\r\n var parentContainer = this.getParentContainer();\r\n if (parentContainer && parentContainer.getEffectivePadding()) {\r\n var parentPhysicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(parentContainer.getEffectivePadding());\r\n renderedSeparator.style.marginLeft = \"-\" + parentPhysicalPadding.left + \"px\";\r\n renderedSeparator.style.marginRight = \"-\" + parentPhysicalPadding.right + \"px\";\r\n }\r\n }\r\n return renderedSeparator;\r\n };\r\n CardElement.prototype.updateRenderedElementVisibility = function () {\r\n var displayMode = this.isDesignMode() || this.isVisible\r\n ? this._defaultRenderedElementDisplayMode\r\n : \"none\";\r\n if (this._renderedElement) {\r\n if (displayMode) {\r\n this._renderedElement.style.display = displayMode;\r\n }\r\n else {\r\n this._renderedElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n if (this._separatorElement) {\r\n if (this.parent && this.parent.isFirstElement(this)) {\r\n this._separatorElement.style.display = \"none\";\r\n }\r\n else {\r\n if (displayMode) {\r\n this._separatorElement.style.display = displayMode;\r\n }\r\n else {\r\n this._separatorElement.style.removeProperty(\"display\");\r\n }\r\n }\r\n }\r\n };\r\n CardElement.prototype.hideElementDueToOverflow = function () {\r\n if (this._renderedElement && this.isVisible) {\r\n this._renderedElement.style.visibility = \"hidden\";\r\n this.isVisible = false;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n };\r\n CardElement.prototype.showElementHiddenDueToOverflow = function () {\r\n if (this._renderedElement && !this.isVisible) {\r\n this._renderedElement.style.removeProperty(\"visibility\");\r\n this.isVisible = true;\r\n raiseElementVisibilityChangedEvent(this, false);\r\n }\r\n };\r\n // Marked private to emulate internal access\r\n CardElement.prototype.handleOverflow = function (maxHeight) {\r\n if (this.isVisible || this.isHiddenDueToOverflow()) {\r\n var handled = this.truncateOverflow(maxHeight);\r\n // Even if we were unable to truncate the element to fit this time,\r\n // it still could have been previously truncated\r\n this._truncatedDueToOverflow = handled || this._truncatedDueToOverflow;\r\n if (!handled) {\r\n this.hideElementDueToOverflow();\r\n }\r\n else if (handled && !this.isVisible) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n }\r\n };\r\n // Marked private to emulate internal access\r\n CardElement.prototype.resetOverflow = function () {\r\n var sizeChanged = false;\r\n if (this._truncatedDueToOverflow) {\r\n this.undoOverflowTruncation();\r\n this._truncatedDueToOverflow = false;\r\n sizeChanged = true;\r\n }\r\n if (this.isHiddenDueToOverflow()) {\r\n this.showElementHiddenDueToOverflow();\r\n }\r\n return sizeChanged;\r\n };\r\n CardElement.prototype.getDefaultSerializationContext = function () {\r\n return new SerializationContext();\r\n };\r\n CardElement.prototype.createPlaceholderElement = function () {\r\n var styleDefinition = this.getEffectiveStyleDefinition();\r\n var foregroundCssColor = Utils.stringToCssColor(styleDefinition.foregroundColors.default.subtle);\r\n var element = document.createElement(\"div\");\r\n element.style.border = \"1px dashed \" + foregroundCssColor;\r\n element.style.padding = \"4px\";\r\n element.style.minHeight = \"32px\";\r\n element.style.fontSize = \"10px\";\r\n if (foregroundCssColor) {\r\n element.style.color = foregroundCssColor;\r\n }\r\n element.innerText = strings_1.Strings.defaults.emptyElementText(this.getJsonTypeName());\r\n return element;\r\n };\r\n CardElement.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n if (this.height === \"auto\") {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n }\r\n else {\r\n renderedElement.style.flex = \"1 1 auto\";\r\n }\r\n };\r\n /*\r\n * Called when mouse enters or leaves the card.\r\n * Inputs elements need to update their visual state in such events like showing or hiding borders etc.\r\n * It calls Input.updateVisualState(eventType) for all inputs.\r\n * This method on input (updateVisualState) is supposed to be called from card level on mouse events.\r\n */\r\n CardElement.prototype.updateInputsVisualState = function (hover) {\r\n var allInputs = this.getAllInputs();\r\n var inputEventType = !!hover ? InputEventType.MouseEnterOnCard : InputEventType.MouseLeaveOnCard;\r\n allInputs.forEach(function (input) { return input.updateVisualState(inputEventType); });\r\n };\r\n CardElement.prototype.isDisplayed = function () {\r\n return (this._renderedElement !== undefined &&\r\n this.isVisible &&\r\n this._renderedElement.offsetHeight > 0);\r\n };\r\n CardElement.prototype.overrideInternalRender = function () {\r\n return this.internalRender();\r\n };\r\n CardElement.prototype.applyPadding = function () {\r\n if (this.separatorElement && this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n if (shared_1.GlobalSettings.alwaysBleedSeparators && !this.isBleeding()) {\r\n var padding = new shared_1.PaddingDefinition();\r\n this.getImmediateSurroundingPadding(padding);\r\n var physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n this.separatorElement.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n }\r\n else {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n };\r\n /*\r\n * Called when this element overflows the bottom of the card.\r\n * maxHeight will be the amount of space still available on the card (0 if\r\n * the element is fully off the card).\r\n */\r\n CardElement.prototype.truncateOverflow = function (_maxHeight) {\r\n // Child implementations should return true if the element handled\r\n // the truncation request such that its content fits within maxHeight,\r\n // false if the element should fall back to being hidden\r\n return false;\r\n };\r\n /*\r\n * This should reverse any changes performed in truncateOverflow().\r\n */\r\n CardElement.prototype.undoOverflowTruncation = function () {\r\n return;\r\n };\r\n CardElement.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition();\r\n };\r\n CardElement.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n return false;\r\n };\r\n CardElement.prototype.getHasBorder = function () {\r\n return false;\r\n };\r\n CardElement.prototype.getPadding = function () {\r\n return this._padding;\r\n };\r\n CardElement.prototype.setPadding = function (value) {\r\n this._padding = value;\r\n };\r\n CardElement.prototype.shouldSerialize = function (context) {\r\n return context.elementRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n };\r\n Object.defineProperty(CardElement.prototype, \"useDefaultSizing\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"separatorOrientation\", {\r\n get: function () {\r\n return Enums.Orientation.Horizontal;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"defaultStyle\", {\r\n get: function () {\r\n return Enums.ContainerStyle.Default;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElement.prototype.parse = function (source, context) {\r\n _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\r\n };\r\n CardElement.prototype.asString = function () {\r\n return \"\";\r\n };\r\n CardElement.prototype.isBleeding = function () {\r\n return false;\r\n };\r\n CardElement.prototype.getEffectiveStyle = function () {\r\n if (this.parent) {\r\n return this.parent.getEffectiveStyle();\r\n }\r\n return this.defaultStyle;\r\n };\r\n CardElement.prototype.getEffectiveStyleDefinition = function () {\r\n return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle());\r\n };\r\n CardElement.prototype.getEffectiveTextStyleDefinition = function () {\r\n if (this.parent) {\r\n return this.parent.getEffectiveTextStyleDefinition();\r\n }\r\n return this.hostConfig.textStyles.default;\r\n };\r\n CardElement.prototype.getForbiddenActionTypes = function () {\r\n return [];\r\n };\r\n CardElement.prototype.getImmediateSurroundingPadding = function (result, processTop, processRight, processBottom, processLeft) {\r\n if (processTop === void 0) { processTop = true; }\r\n if (processRight === void 0) { processRight = true; }\r\n if (processBottom === void 0) { processBottom = true; }\r\n if (processLeft === void 0) { processLeft = true; }\r\n if (this.parent) {\r\n var doProcessTop = processTop && this.parent.isTopElement(this);\r\n var doProcessRight = processRight && this.parent.isRightMostElement(this);\r\n var doProcessBottom = processBottom && this.parent.isBottomElement(this);\r\n var doProcessLeft = processLeft && this.parent.isLeftMostElement(this);\r\n var effectivePadding = this.parent.getEffectivePadding();\r\n if (effectivePadding) {\r\n if (doProcessTop && effectivePadding.top !== Enums.Spacing.None) {\r\n result.top = effectivePadding.top;\r\n doProcessTop = false;\r\n }\r\n if (doProcessRight && effectivePadding.right !== Enums.Spacing.None) {\r\n result.right = effectivePadding.right;\r\n doProcessRight = false;\r\n }\r\n if (doProcessBottom && effectivePadding.bottom !== Enums.Spacing.None) {\r\n result.bottom = effectivePadding.bottom;\r\n doProcessBottom = false;\r\n }\r\n if (doProcessLeft && effectivePadding.left !== Enums.Spacing.None) {\r\n result.left = effectivePadding.left;\r\n doProcessLeft = false;\r\n }\r\n }\r\n if (doProcessTop || doProcessRight || doProcessBottom || doProcessLeft) {\r\n this.parent.getImmediateSurroundingPadding(result, doProcessTop, doProcessRight, doProcessBottom, doProcessLeft);\r\n }\r\n }\r\n };\r\n CardElement.prototype.getActionCount = function () {\r\n return 0;\r\n };\r\n CardElement.prototype.getActionAt = function (index) {\r\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\r\n };\r\n CardElement.prototype.indexOfAction = function (action) {\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n if (this.getActionAt(i) === action) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n CardElement.prototype.remove = function () {\r\n if (this.parent && this.parent instanceof CardElementContainer) {\r\n return this.parent.removeItem(this);\r\n }\r\n return false;\r\n };\r\n CardElement.prototype.render = function () {\r\n this._renderedElement = this.overrideInternalRender();\r\n this._separatorElement = this.internalRenderSeparator();\r\n if (this._renderedElement) {\r\n if (this.id) {\r\n this._renderedElement.id = this.id;\r\n }\r\n if (this.customCssSelector) {\r\n this._renderedElement.classList.add(this.customCssSelector);\r\n }\r\n this._renderedElement.style.boxSizing = \"border-box\";\r\n this._defaultRenderedElementDisplayMode = this._renderedElement.style.display\r\n ? this._renderedElement.style.display\r\n : undefined;\r\n this.adjustRenderedElementSize(this._renderedElement);\r\n this.updateLayout(false);\r\n }\r\n else if (this.isDesignMode()) {\r\n this._renderedElement = this.createPlaceholderElement();\r\n }\r\n return this._renderedElement;\r\n };\r\n CardElement.prototype.updateLayout = function (_processChildren) {\r\n if (_processChildren === void 0) { _processChildren = true; }\r\n this.updateRenderedElementVisibility();\r\n this.applyPadding();\r\n };\r\n CardElement.prototype.updateActionsEnabledState = function () {\r\n var allActions = this.getRootElement().getAllActions();\r\n for (var _i = 0, allActions_1 = allActions; _i < allActions_1.length; _i++) {\r\n var action = allActions_1[_i];\r\n action.updateEnabledState();\r\n }\r\n };\r\n CardElement.prototype.indexOf = function (_cardElement) {\r\n return -1;\r\n };\r\n CardElement.prototype.isDesignMode = function () {\r\n var rootElement = this.getRootElement();\r\n return rootElement instanceof AdaptiveCard && rootElement.designMode;\r\n };\r\n CardElement.prototype.isFirstElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isLastElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isAtTheVeryLeft = function () {\r\n return this.parent\r\n ? this.parent.isLeftMostElement(this) && this.parent.isAtTheVeryLeft()\r\n : true;\r\n };\r\n CardElement.prototype.isAtTheVeryRight = function () {\r\n return this.parent\r\n ? this.parent.isRightMostElement(this) && this.parent.isAtTheVeryRight()\r\n : true;\r\n };\r\n CardElement.prototype.isAtTheVeryTop = function () {\r\n return this.parent\r\n ? this.parent.isFirstElement(this) && this.parent.isAtTheVeryTop()\r\n : true;\r\n };\r\n CardElement.prototype.isAtTheVeryBottom = function () {\r\n return this.parent\r\n ? this.parent.isLastElement(this) && this.parent.isAtTheVeryBottom()\r\n : true;\r\n };\r\n CardElement.prototype.isBleedingAtTop = function () {\r\n return false;\r\n };\r\n CardElement.prototype.isBleedingAtBottom = function () {\r\n return false;\r\n };\r\n CardElement.prototype.isLeftMostElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isRightMostElement = function (_element) {\r\n return true;\r\n };\r\n CardElement.prototype.isTopElement = function (element) {\r\n return this.isFirstElement(element);\r\n };\r\n CardElement.prototype.isBottomElement = function (element) {\r\n return this.isLastElement(element);\r\n };\r\n CardElement.prototype.isHiddenDueToOverflow = function () {\r\n return (this._renderedElement !== undefined &&\r\n this._renderedElement.style.visibility === \"hidden\");\r\n };\r\n CardElement.prototype.getRootElement = function () {\r\n return this.getRootObject();\r\n };\r\n CardElement.prototype.getParentContainer = function () {\r\n var currentElement = this.parent;\r\n while (currentElement) {\r\n if (currentElement instanceof Container) {\r\n return currentElement;\r\n }\r\n currentElement = currentElement.parent;\r\n }\r\n return undefined;\r\n };\r\n CardElement.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return [];\r\n };\r\n CardElement.prototype.getAllActions = function () {\r\n var result = [];\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n return result;\r\n };\r\n CardElement.prototype.getResourceInformation = function () {\r\n return [];\r\n };\r\n CardElement.prototype.getElementById = function (id) {\r\n return this.id === id ? this : undefined;\r\n };\r\n CardElement.prototype.getActionById = function (_id) {\r\n return undefined;\r\n };\r\n CardElement.prototype.getElementByIdFromAction = function (id) {\r\n var result = undefined;\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action instanceof ShowCardAction) {\r\n result = action.card.getElementById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n CardElement.prototype.getEffectivePadding = function () {\r\n var padding = this.getPadding();\r\n return padding ? padding : this.getDefaultPadding();\r\n };\r\n CardElement.prototype.getEffectiveHorizontalAlignment = function () {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n if (this.parent) {\r\n return this.parent.getEffectiveHorizontalAlignment();\r\n }\r\n return Enums.HorizontalAlignment.Left;\r\n };\r\n Object.defineProperty(CardElement.prototype, \"hostConfig\", {\r\n get: function () {\r\n if (this._hostConfig) {\r\n return this._hostConfig;\r\n }\r\n else {\r\n if (this.parent) {\r\n return this.parent.hostConfig;\r\n }\r\n else {\r\n return host_config_1.defaultHostConfig;\r\n }\r\n }\r\n },\r\n set: function (value) {\r\n this._hostConfig = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"index\", {\r\n get: function () {\r\n if (this.parent) {\r\n return this.parent.indexOf(this);\r\n }\r\n else {\r\n return 0;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isInteractive\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isStandalone\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"isInline\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n if (this.parent && this.separatorElement) {\r\n return !this.parent.isFirstElement(this) && (this.isVisible || this.isDesignMode());\r\n }\r\n else {\r\n return false;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"separatorElement\", {\r\n get: function () {\r\n return this._separatorElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardElement.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElement.langProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"lang\", true, /^[a-z]{2,3}$/gi);\r\n CardElement.isVisibleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"isVisible\", true);\r\n CardElement.separatorProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"separator\", false);\r\n CardElement.heightProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_1, \"height\", [{ value: \"auto\" }, { value: \"stretch\" }], \"auto\");\r\n CardElement.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"horizontalAlignment\", Enums.HorizontalAlignment);\r\n CardElement.spacingProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"spacing\", Enums.Spacing, Enums.Spacing.Default);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.horizontalAlignmentProperty)\r\n ], CardElement.prototype, \"horizontalAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.spacingProperty)\r\n ], CardElement.prototype, \"spacing\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.separatorProperty)\r\n ], CardElement.prototype, \"separator\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.heightProperty)\r\n ], CardElement.prototype, \"height\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.langProperty)\r\n ], CardElement.prototype, \"lang\", null);\r\n __decorate([\r\n (0, serialization_1.property)(CardElement.isVisibleProperty)\r\n ], CardElement.prototype, \"isVisible\", null);\r\n return CardElement;\r\n}(card_object_1.CardObject));\r\nexports.CardElement = CardElement;\r\nvar ActionProperty = /** @class */ (function (_super) {\r\n __extends(ActionProperty, _super);\r\n function ActionProperty(targetVersion, name, forbiddenActionTypes) {\r\n if (forbiddenActionTypes === void 0) { forbiddenActionTypes = []; }\r\n var _this = _super.call(this, targetVersion, name, undefined) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.forbiddenActionTypes = forbiddenActionTypes;\r\n return _this;\r\n }\r\n ActionProperty.prototype.parse = function (sender, source, context) {\r\n var parent = sender;\r\n return context.parseAction(parent, source[this.name], this.forbiddenActionTypes, parent.isDesignMode());\r\n };\r\n ActionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\r\n };\r\n return ActionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nexports.ActionProperty = ActionProperty;\r\nvar BaseTextBlock = /** @class */ (function (_super) {\r\n __extends(BaseTextBlock, _super);\r\n function BaseTextBlock(text) {\r\n var _this = _super.call(this) || this;\r\n _this.ariaHidden = false;\r\n if (text) {\r\n _this.text = text;\r\n }\r\n return _this;\r\n }\r\n BaseTextBlock.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n // selectAction is declared on BaseTextBlock but is only exposed on TextRun,\r\n // so the property is removed from the BaseTextBlock schema.\r\n schema.remove(BaseTextBlock.selectActionProperty);\r\n };\r\n Object.defineProperty(BaseTextBlock.prototype, \"text\", {\r\n get: function () {\r\n return this.getValue(BaseTextBlock.textProperty);\r\n },\r\n set: function (value) {\r\n this.setText(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#endregion\r\n BaseTextBlock.prototype.getFontSize = function (fontType) {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n return fontType.fontSizes.small;\r\n case Enums.TextSize.Medium:\r\n return fontType.fontSizes.medium;\r\n case Enums.TextSize.Large:\r\n return fontType.fontSizes.large;\r\n case Enums.TextSize.ExtraLarge:\r\n return fontType.fontSizes.extraLarge;\r\n default:\r\n return fontType.fontSizes.default;\r\n }\r\n };\r\n BaseTextBlock.prototype.getColorDefinition = function (colorSet, color) {\r\n switch (color) {\r\n case Enums.TextColor.Accent:\r\n return colorSet.accent;\r\n case Enums.TextColor.Dark:\r\n return colorSet.dark;\r\n case Enums.TextColor.Light:\r\n return colorSet.light;\r\n case Enums.TextColor.Good:\r\n return colorSet.good;\r\n case Enums.TextColor.Warning:\r\n return colorSet.warning;\r\n case Enums.TextColor.Attention:\r\n return colorSet.attention;\r\n default:\r\n return colorSet.default;\r\n }\r\n };\r\n BaseTextBlock.prototype.setText = function (value) {\r\n this.setValue(BaseTextBlock.textProperty, value);\r\n };\r\n BaseTextBlock.prototype.init = function (textDefinition) {\r\n this.size = textDefinition.size;\r\n this.weight = textDefinition.weight;\r\n this.color = textDefinition.color;\r\n this.isSubtle = textDefinition.isSubtle;\r\n };\r\n BaseTextBlock.prototype.asString = function () {\r\n return this.text;\r\n };\r\n BaseTextBlock.prototype.applyStylesTo = function (targetElement) {\r\n var fontType = this.hostConfig.getFontTypeDefinition(this.effectiveFontType);\r\n if (fontType.fontFamily) {\r\n targetElement.style.fontFamily = fontType.fontFamily;\r\n }\r\n var fontSize;\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n fontSize = fontType.fontSizes.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n fontSize = fontType.fontSizes.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n fontSize = fontType.fontSizes.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n fontSize = fontType.fontSizes.extraLarge;\r\n break;\r\n default:\r\n fontSize = fontType.fontSizes.default;\r\n break;\r\n }\r\n targetElement.style.fontSize = fontSize + \"px\";\r\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\r\n var targetColor = Utils.stringToCssColor(this.effectiveIsSubtle ? colorDefinition.subtle : colorDefinition.default);\r\n if (targetColor) {\r\n targetElement.style.color = targetColor;\r\n }\r\n var fontWeight;\r\n switch (this.effectiveWeight) {\r\n case Enums.TextWeight.Lighter:\r\n fontWeight = fontType.fontWeights.lighter;\r\n break;\r\n case Enums.TextWeight.Bolder:\r\n fontWeight = fontType.fontWeights.bolder;\r\n break;\r\n default:\r\n fontWeight = fontType.fontWeights.default;\r\n break;\r\n }\r\n targetElement.style.fontWeight = fontWeight.toString();\r\n if (this.ariaHidden) {\r\n targetElement.setAttribute(\"aria-hidden\", \"true\");\r\n }\r\n };\r\n BaseTextBlock.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveColor\", {\r\n get: function () {\r\n return this.color !== undefined ? this.color : this.getEffectiveTextStyleDefinition().color;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveFontType\", {\r\n get: function () {\r\n return this.fontType !== undefined\r\n ? this.fontType\r\n : this.getEffectiveTextStyleDefinition().fontType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveIsSubtle\", {\r\n get: function () {\r\n return this.isSubtle !== undefined\r\n ? this.isSubtle\r\n : this.getEffectiveTextStyleDefinition().isSubtle;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveSize\", {\r\n get: function () {\r\n return this.size !== undefined ? this.size : this.getEffectiveTextStyleDefinition().size;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(BaseTextBlock.prototype, \"effectiveWeight\", {\r\n get: function () {\r\n return this.weight !== undefined\r\n ? this.weight\r\n : this.getEffectiveTextStyleDefinition().weight;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n BaseTextBlock.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"text\", true);\r\n BaseTextBlock.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.TextSize);\r\n BaseTextBlock.weightProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"weight\", Enums.TextWeight);\r\n BaseTextBlock.colorProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"color\", Enums.TextColor);\r\n BaseTextBlock.isSubtleProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isSubtle\");\r\n BaseTextBlock.fontTypeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fontType\", Enums.FontType);\r\n BaseTextBlock.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.sizeProperty)\r\n ], BaseTextBlock.prototype, \"size\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.weightProperty)\r\n ], BaseTextBlock.prototype, \"weight\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.colorProperty)\r\n ], BaseTextBlock.prototype, \"color\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.fontTypeProperty)\r\n ], BaseTextBlock.prototype, \"fontType\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.isSubtleProperty)\r\n ], BaseTextBlock.prototype, \"isSubtle\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.textProperty)\r\n ], BaseTextBlock.prototype, \"text\", null);\r\n __decorate([\r\n (0, serialization_1.property)(BaseTextBlock.selectActionProperty)\r\n ], BaseTextBlock.prototype, \"selectAction\", void 0);\r\n return BaseTextBlock;\r\n}(CardElement));\r\nexports.BaseTextBlock = BaseTextBlock;\r\nvar TextBlock = /** @class */ (function (_super) {\r\n __extends(TextBlock, _super);\r\n function TextBlock() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.wrap = false;\r\n _this._treatAsPlainText = true;\r\n _this.useMarkdown = true;\r\n return _this;\r\n }\r\n TextBlock.prototype.restoreOriginalContent = function () {\r\n var _a, _b;\r\n if (this.renderedElement !== undefined) {\r\n if (this.maxLines && this.maxLines > 0) {\r\n this.renderedElement.style.maxHeight =\r\n this._computedLineHeight * this.maxLines + \"px\";\r\n }\r\n var originalHtml = (_b = (_a = TextBlock._ttRoundtripPolicy) === null || _a === void 0 ? void 0 : _a.createHTML(this._originalInnerHtml)) !== null && _b !== void 0 ? _b : this._originalInnerHtml;\r\n this.renderedElement.innerHTML = originalHtml;\r\n }\r\n };\r\n TextBlock.prototype.truncateIfSupported = function (maxHeight) {\r\n if (this.renderedElement !== undefined) {\r\n // For now, only truncate TextBlocks that contain just a single\r\n // paragraph -- since the maxLines calculation doesn't take into\r\n // account Markdown lists\r\n var children = this.renderedElement.children;\r\n var isTextOnly = !children.length;\r\n var truncationSupported = isTextOnly ||\r\n (children.length === 1 && children[0].tagName.toLowerCase() === \"p\" && !children[0].children.length);\r\n if (truncationSupported) {\r\n var element = isTextOnly ? this.renderedElement : children[0];\r\n Utils.truncateText(element, maxHeight, this._computedLineHeight);\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n TextBlock.prototype.setText = function (value) {\r\n _super.prototype.setText.call(this, value);\r\n this._processedText = undefined;\r\n };\r\n TextBlock.prototype.internalRender = function () {\r\n var _this = this;\r\n var _a, _b;\r\n this._processedText = undefined;\r\n if (this.text) {\r\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n var hostConfig = this.hostConfig;\r\n var element = void 0;\r\n if (this.forElementId) {\r\n var labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n element = labelElement;\r\n }\r\n else {\r\n element = document.createElement(\"div\");\r\n }\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textBlock\"));\r\n element.style.overflow = \"hidden\";\r\n this.applyStylesTo(element);\r\n if (this.style === \"heading\") {\r\n element.setAttribute(\"role\", \"heading\");\r\n var headingLevel = this.hostConfig.textBlock.headingLevel;\r\n if (headingLevel !== undefined && headingLevel > 0) {\r\n element.setAttribute(\"aria-level\", headingLevel.toString());\r\n }\r\n }\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n element.onclick = function (e) {\r\n if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n this.selectAction.setupElementForAccessibility(element);\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n if (!this._processedText) {\r\n this._treatAsPlainText = true;\r\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n if (this.useMarkdown && formattedText) {\r\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting) {\r\n formattedText = formattedText\r\n .replace(//g, \"===\")\r\n .replace(/<\\/mark>/g, \"/==/\");\r\n }\r\n var markdownProcessingResult = AdaptiveCard.applyMarkdown(formattedText);\r\n if (markdownProcessingResult.didProcess &&\r\n markdownProcessingResult.outputHtml) {\r\n this._processedText = markdownProcessingResult.outputHtml;\r\n this._treatAsPlainText = false;\r\n // Only process tag if markdown processing was applied because\r\n // markdown processing is also responsible for sanitizing the input string\r\n if (shared_1.GlobalSettings.allowMarkForTextHighlighting && this._processedText) {\r\n var markStyle = \"\";\r\n var effectiveStyle = this.getEffectiveStyleDefinition();\r\n if (effectiveStyle.highlightBackgroundColor) {\r\n markStyle +=\r\n \"background-color: \" +\r\n effectiveStyle.highlightBackgroundColor +\r\n \";\";\r\n }\r\n if (effectiveStyle.highlightForegroundColor) {\r\n markStyle +=\r\n \"color: \" + effectiveStyle.highlightForegroundColor + \";\";\r\n }\r\n if (markStyle) {\r\n markStyle = 'style=\"' + markStyle + '\"';\r\n }\r\n this._processedText = this._processedText\r\n .replace(/===/g, \"\")\r\n .replace(/\\/==\\//g, \"\");\r\n }\r\n }\r\n else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n }\r\n else {\r\n this._processedText = formattedText;\r\n this._treatAsPlainText = true;\r\n }\r\n }\r\n if (!this._processedText) {\r\n this._processedText = \"\";\r\n }\r\n if (this._treatAsPlainText) {\r\n element.innerText = this._processedText;\r\n }\r\n else {\r\n var processedHtml = (_b = (_a = TextBlock._ttMarkdownPolicy) === null || _a === void 0 ? void 0 : _a.createHTML(this._processedText)) !== null && _b !== void 0 ? _b : this._processedText;\r\n element.innerHTML = processedHtml;\r\n }\r\n if (element.firstElementChild instanceof HTMLElement) {\r\n var firstElementChild = element.firstElementChild;\r\n firstElementChild.style.marginTop = \"0px\";\r\n firstElementChild.style.width = \"100%\";\r\n if (!this.wrap) {\r\n firstElementChild.style.overflow = \"hidden\";\r\n firstElementChild.style.textOverflow = \"ellipsis\";\r\n }\r\n }\r\n if (element.lastElementChild instanceof HTMLElement) {\r\n element.lastElementChild.style.marginBottom = \"0px\";\r\n }\r\n var anchors = element.getElementsByTagName(\"a\");\r\n var _loop_1 = function (anchor) {\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n anchor.target = \"_blank\";\r\n anchor.onclick = function (e) {\r\n if (raiseAnchorClickedEvent(_this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n }\r\n };\r\n anchor.oncontextmenu = function (e) {\r\n if (raiseAnchorClickedEvent(_this, anchor, e)) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n return false;\r\n }\r\n return true;\r\n };\r\n };\r\n for (var _i = 0, _c = Array.from(anchors); _i < _c.length; _i++) {\r\n var anchor = _c[_i];\r\n _loop_1(anchor);\r\n }\r\n if (this.wrap) {\r\n element.style.wordWrap = \"break-word\";\r\n if (this.maxLines && this.maxLines > 0) {\r\n element.style.overflow = \"hidden\";\r\n if (Utils.isInternetExplorer() || !shared_1.GlobalSettings.useWebkitLineClamp) {\r\n element.style.maxHeight = this._computedLineHeight * this.maxLines + \"px\";\r\n }\r\n else {\r\n // While non standard, --webkit-line-clamp works in every browser (except IE)\r\n // and is a great solution to support the maxLines feature with ellipsis\r\n // truncation. With --webkit-line-clamp there is need to use explicit line heights\r\n element.style.removeProperty(\"line-height\");\r\n element.style.display = \"-webkit-box\";\r\n element.style.webkitBoxOrient = \"vertical\";\r\n element.style.webkitLineClamp = this.maxLines.toString();\r\n }\r\n }\r\n }\r\n else {\r\n element.style.whiteSpace = \"nowrap\";\r\n element.style.textOverflow = \"ellipsis\";\r\n }\r\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation ||\r\n shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n this._originalInnerHtml = element.innerHTML;\r\n }\r\n return element;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n TextBlock.prototype.truncateOverflow = function (maxHeight) {\r\n if (maxHeight >= this._computedLineHeight) {\r\n return this.truncateIfSupported(maxHeight);\r\n }\r\n return false;\r\n };\r\n TextBlock.prototype.undoOverflowTruncation = function () {\r\n this.restoreOriginalContent();\r\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines) {\r\n var maxHeight = this._computedLineHeight * this.maxLines;\r\n this.truncateIfSupported(maxHeight);\r\n }\r\n };\r\n TextBlock.prototype.applyStylesTo = function (targetElement) {\r\n _super.prototype.applyStylesTo.call(this, targetElement);\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n targetElement.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n targetElement.style.textAlign = \"end\";\r\n break;\r\n default:\r\n targetElement.style.textAlign = \"start\";\r\n break;\r\n }\r\n var lineHeights = this.hostConfig.lineHeights;\r\n if (lineHeights) {\r\n switch (this.effectiveSize) {\r\n case Enums.TextSize.Small:\r\n this._computedLineHeight = lineHeights.small;\r\n break;\r\n case Enums.TextSize.Medium:\r\n this._computedLineHeight = lineHeights.medium;\r\n break;\r\n case Enums.TextSize.Large:\r\n this._computedLineHeight = lineHeights.large;\r\n break;\r\n case Enums.TextSize.ExtraLarge:\r\n this._computedLineHeight = lineHeights.extraLarge;\r\n break;\r\n default:\r\n this._computedLineHeight = lineHeights.default;\r\n break;\r\n }\r\n }\r\n else {\r\n // Looks like 1.33 is the magic number to compute line-height\r\n // from font size.\r\n this._computedLineHeight =\r\n this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType)) *\r\n 1.33;\r\n }\r\n targetElement.style.lineHeight = this._computedLineHeight + \"px\";\r\n };\r\n TextBlock.prototype.getJsonTypeName = function () {\r\n return \"TextBlock\";\r\n };\r\n TextBlock.prototype.getEffectiveTextStyleDefinition = function () {\r\n if (this.style) {\r\n return this.hostConfig.textStyles.getStyleByName(this.style);\r\n }\r\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\r\n };\r\n TextBlock.prototype.updateLayout = function (processChildren) {\r\n if (processChildren === void 0) { processChildren = false; }\r\n _super.prototype.updateLayout.call(this, processChildren);\r\n if (shared_1.GlobalSettings.useAdvancedTextBlockTruncation && this.maxLines && this.isDisplayed()) {\r\n // Reset the element's innerHTML in case the available room for\r\n // content has increased\r\n this.restoreOriginalContent();\r\n this.truncateIfSupported(this._computedLineHeight * this.maxLines);\r\n }\r\n };\r\n var _a, _b;\r\n TextBlock.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"wrap\", false);\r\n TextBlock.maxLinesProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLines\");\r\n TextBlock.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"style\", [\r\n { value: \"default\" },\r\n { value: \"columnHeader\" },\r\n { value: \"heading\" }\r\n ]);\r\n // Markdown processing is handled outside of Adaptive Cards. It's up to the host to ensure that markdown is safely\r\n // processed.\r\n TextBlock._ttMarkdownPolicy = (typeof window === 'undefined') ? undefined : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy(\"adaptivecards#markdownPassthroughPolicy\", { createHTML: function (value) { return value; } });\r\n // When \"advanced\" truncation is enabled (see GlobalSettings.useAdvancedCardBottomTruncation and\r\n // GlobalSettings.useAdvancedTextBlockTruncation), we store the original pre-truncation content in\r\n // _originalInnerHtml so that we can restore/recalculate truncation later if space availability has changed (see\r\n // TextBlock.restoreOriginalContent())\r\n TextBlock._ttRoundtripPolicy = (typeof window === 'undefined') ? undefined : (_b = window.trustedTypes) === null || _b === void 0 ? void 0 : _b.createPolicy(\"adaptivecards#restoreContentsPolicy\", { createHTML: function (value) { return value; } });\r\n __decorate([\r\n (0, serialization_1.property)(TextBlock.wrapProperty)\r\n ], TextBlock.prototype, \"wrap\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextBlock.maxLinesProperty)\r\n ], TextBlock.prototype, \"maxLines\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextBlock.styleProperty)\r\n ], TextBlock.prototype, \"style\", void 0);\r\n return TextBlock;\r\n}(BaseTextBlock));\r\nexports.TextBlock = TextBlock;\r\nvar TextRun = /** @class */ (function (_super) {\r\n __extends(TextRun, _super);\r\n function TextRun() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.italic = false;\r\n _this.strikethrough = false;\r\n _this.highlight = false;\r\n _this.underline = false;\r\n return _this;\r\n }\r\n TextRun.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n schema.add(BaseTextBlock.selectActionProperty);\r\n };\r\n //#endregion\r\n TextRun.prototype.internalRender = function () {\r\n var _this = this;\r\n if (this.text) {\r\n var preProcessedText = this.preProcessPropertyValue(BaseTextBlock.textProperty);\r\n var hostConfig = this.hostConfig;\r\n var formattedText = TextFormatters.formatText(this.lang, preProcessedText);\r\n if (!formattedText) {\r\n formattedText = \"\";\r\n }\r\n var element = document.createElement(\"span\");\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-textRun\"));\r\n this.applyStylesTo(element);\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n var anchor = document.createElement(\"a\");\r\n anchor.classList.add(hostConfig.makeCssClassName(\"ac-anchor\"));\r\n var href = this.selectAction.getHref();\r\n anchor.href = href ? href : \"\";\r\n anchor.target = \"_blank\";\r\n anchor.onclick = function (e) {\r\n if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n this.selectAction.setupElementForAccessibility(anchor);\r\n anchor.innerText = formattedText;\r\n element.appendChild(anchor);\r\n }\r\n else {\r\n element.innerText = formattedText;\r\n }\r\n return element;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n TextRun.prototype.applyStylesTo = function (targetElement) {\r\n _super.prototype.applyStylesTo.call(this, targetElement);\r\n if (this.italic) {\r\n targetElement.style.fontStyle = \"italic\";\r\n }\r\n if (this.strikethrough) {\r\n targetElement.style.textDecoration = \"line-through\";\r\n }\r\n if (this.highlight) {\r\n var colorDefinition = this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors, this.effectiveColor);\r\n var backgroundColor = Utils.stringToCssColor(this.effectiveIsSubtle\r\n ? colorDefinition.highlightColors.subtle\r\n : colorDefinition.highlightColors.default);\r\n if (backgroundColor) {\r\n targetElement.style.backgroundColor = backgroundColor;\r\n }\r\n }\r\n if (this.underline) {\r\n targetElement.style.textDecoration = \"underline\";\r\n }\r\n };\r\n TextRun.prototype.getJsonTypeName = function () {\r\n return \"TextRun\";\r\n };\r\n Object.defineProperty(TextRun.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TextRun.prototype, \"isInline\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n TextRun.italicProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"italic\", false);\r\n TextRun.strikethroughProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"strikethrough\", false);\r\n TextRun.highlightProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"highlight\", false);\r\n TextRun.underlineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"underline\", false);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.italicProperty)\r\n ], TextRun.prototype, \"italic\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.strikethroughProperty)\r\n ], TextRun.prototype, \"strikethrough\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.highlightProperty)\r\n ], TextRun.prototype, \"highlight\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextRun.underlineProperty)\r\n ], TextRun.prototype, \"underline\", void 0);\r\n return TextRun;\r\n}(BaseTextBlock));\r\nexports.TextRun = TextRun;\r\nvar RichTextBlock = /** @class */ (function (_super) {\r\n __extends(RichTextBlock, _super);\r\n function RichTextBlock() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._inlines = [];\r\n return _this;\r\n }\r\n RichTextBlock.prototype.internalAddInline = function (inline, forceAdd) {\r\n if (forceAdd === void 0) { forceAdd = false; }\r\n if (!inline.isInline) {\r\n throw new Error(strings_1.Strings.errors.elementCannotBeUsedAsInline());\r\n }\r\n var doAdd = inline.parent === undefined || forceAdd;\r\n if (!doAdd && inline.parent !== this) {\r\n throw new Error(strings_1.Strings.errors.inlineAlreadyParented());\r\n }\r\n else {\r\n inline.setParent(this);\r\n this._inlines.push(inline);\r\n }\r\n };\r\n RichTextBlock.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._inlines = [];\r\n if (Array.isArray(source[\"inlines\"])) {\r\n for (var _i = 0, _a = source[\"inlines\"]; _i < _a.length; _i++) {\r\n var jsonInline = _a[_i];\r\n var inline = void 0;\r\n if (typeof jsonInline === \"string\") {\r\n var textRun = new TextRun();\r\n textRun.text = jsonInline;\r\n inline = textRun;\r\n }\r\n else {\r\n // No fallback for inlines in 1.2\r\n inline = context.parseElement(this, jsonInline, [], false);\r\n }\r\n if (inline) {\r\n this.internalAddInline(inline, true);\r\n }\r\n }\r\n }\r\n };\r\n RichTextBlock.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n if (this._inlines.length > 0) {\r\n var jsonInlines = [];\r\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\r\n var inline = _a[_i];\r\n jsonInlines.push(inline.toJSON(context));\r\n }\r\n context.serializeValue(target, \"inlines\", jsonInlines);\r\n }\r\n };\r\n RichTextBlock.prototype.internalRender = function () {\r\n if (this._inlines.length > 0) {\r\n var element = void 0;\r\n if (this.forElementId) {\r\n var labelElement = document.createElement(\"label\");\r\n labelElement.htmlFor = this.forElementId;\r\n element = labelElement;\r\n }\r\n else {\r\n element = document.createElement(\"div\");\r\n }\r\n element.className = this.hostConfig.makeCssClassName(\"ac-richTextBlock\");\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.textAlign = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.textAlign = \"end\";\r\n break;\r\n default:\r\n element.style.textAlign = \"start\";\r\n break;\r\n }\r\n var renderedInlines = 0;\r\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\r\n var inline = _a[_i];\r\n var renderedInline = inline.render();\r\n if (renderedInline) {\r\n element.appendChild(renderedInline);\r\n renderedInlines++;\r\n }\r\n }\r\n if (renderedInlines > 0) {\r\n return element;\r\n }\r\n }\r\n return undefined;\r\n };\r\n RichTextBlock.prototype.asString = function () {\r\n var result = \"\";\r\n for (var _i = 0, _a = this._inlines; _i < _a.length; _i++) {\r\n var inline = _a[_i];\r\n result += inline.asString();\r\n }\r\n return result;\r\n };\r\n RichTextBlock.prototype.getJsonTypeName = function () {\r\n return \"RichTextBlock\";\r\n };\r\n RichTextBlock.prototype.getInlineCount = function () {\r\n return this._inlines.length;\r\n };\r\n RichTextBlock.prototype.getInlineAt = function (index) {\r\n if (index >= 0 && index < this._inlines.length) {\r\n return this._inlines[index];\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.indexOutOfRange(index));\r\n }\r\n };\r\n RichTextBlock.prototype.addInline = function (inline) {\r\n if (typeof inline === \"string\") {\r\n this.internalAddInline(new TextRun(inline));\r\n }\r\n else {\r\n this.internalAddInline(inline);\r\n }\r\n };\r\n RichTextBlock.prototype.removeInline = function (inline) {\r\n var index = this._inlines.indexOf(inline);\r\n if (index >= 0) {\r\n this._inlines[index].setParent(undefined);\r\n this._inlines.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n };\r\n return RichTextBlock;\r\n}(CardElement));\r\nexports.RichTextBlock = RichTextBlock;\r\nvar Fact = /** @class */ (function (_super) {\r\n __extends(Fact, _super);\r\n function Fact(name, value) {\r\n var _this = _super.call(this) || this;\r\n _this.name = name;\r\n _this.value = value;\r\n return _this;\r\n }\r\n //#endregion\r\n Fact.prototype.getSchemaKey = function () {\r\n return \"Fact\";\r\n };\r\n //#region Schema\r\n Fact.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n Fact.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(Fact.titleProperty)\r\n ], Fact.prototype, \"name\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Fact.valueProperty)\r\n ], Fact.prototype, \"value\", void 0);\r\n return Fact;\r\n}(serialization_1.SerializableObject));\r\nexports.Fact = Fact;\r\nvar FactSet = /** @class */ (function (_super) {\r\n __extends(FactSet, _super);\r\n function FactSet() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(FactSet.prototype, \"useDefaultSizing\", {\r\n //#endregion\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n FactSet.prototype.internalRender = function () {\r\n var element = undefined;\r\n var hostConfig = this.hostConfig;\r\n if (this.facts.length > 0) {\r\n element = document.createElement(\"table\");\r\n element.style.borderWidth = \"0px\";\r\n element.style.borderSpacing = \"0px\";\r\n element.style.borderStyle = \"none\";\r\n element.style.borderCollapse = \"collapse\";\r\n element.style.display = \"block\";\r\n element.style.overflow = \"hidden\";\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-factset\"));\r\n element.setAttribute(\"role\", \"presentation\");\r\n for (var i = 0; i < this.facts.length; i++) {\r\n var trElement = document.createElement(\"tr\");\r\n if (i > 0) {\r\n trElement.style.marginTop = hostConfig.factSet.spacing + \"px\";\r\n }\r\n // Title column\r\n var tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-title\"));\r\n if (hostConfig.factSet.title.maxWidth) {\r\n tdElement.style.maxWidth = hostConfig.factSet.title.maxWidth + \"px\";\r\n }\r\n tdElement.style.verticalAlign = \"top\";\r\n var textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text =\r\n !this.facts[i].name && this.isDesignMode() ? \"Title\" : this.facts[i].name;\r\n textBlock.size = hostConfig.factSet.title.size;\r\n textBlock.color = hostConfig.factSet.title.color;\r\n textBlock.isSubtle = hostConfig.factSet.title.isSubtle;\r\n textBlock.weight = hostConfig.factSet.title.weight;\r\n textBlock.wrap = hostConfig.factSet.title.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n // Spacer column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.width = \"10px\";\r\n Utils.appendChild(trElement, tdElement);\r\n // Value column\r\n tdElement = document.createElement(\"td\");\r\n tdElement.style.padding = \"0\";\r\n tdElement.style.verticalAlign = \"top\";\r\n tdElement.classList.add(hostConfig.makeCssClassName(\"ac-fact-value\"));\r\n textBlock = new TextBlock();\r\n textBlock.setParent(this);\r\n textBlock.text = this.facts[i].value;\r\n textBlock.size = hostConfig.factSet.value.size;\r\n textBlock.color = hostConfig.factSet.value.color;\r\n textBlock.isSubtle = hostConfig.factSet.value.isSubtle;\r\n textBlock.weight = hostConfig.factSet.value.weight;\r\n textBlock.wrap = hostConfig.factSet.value.wrap;\r\n textBlock.spacing = Enums.Spacing.None;\r\n Utils.appendChild(tdElement, textBlock.render());\r\n Utils.appendChild(trElement, tdElement);\r\n Utils.appendChild(element, trElement);\r\n }\r\n }\r\n return element;\r\n };\r\n FactSet.prototype.getJsonTypeName = function () {\r\n return \"FactSet\";\r\n };\r\n //#region Schema\r\n FactSet.factsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"facts\", Fact);\r\n __decorate([\r\n (0, serialization_1.property)(FactSet.factsProperty)\r\n ], FactSet.prototype, \"facts\", void 0);\r\n return FactSet;\r\n}(CardElement));\r\nexports.FactSet = FactSet;\r\nvar ImageDimensionProperty = /** @class */ (function (_super) {\r\n __extends(ImageDimensionProperty, _super);\r\n function ImageDimensionProperty(targetVersion, name, internalName, fallbackProperty) {\r\n var _this = _super.call(this, targetVersion, name) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.internalName = internalName;\r\n _this.fallbackProperty = fallbackProperty;\r\n return _this;\r\n }\r\n ImageDimensionProperty.prototype.getInternalName = function () {\r\n return this.internalName;\r\n };\r\n ImageDimensionProperty.prototype.parse = function (sender, source, context) {\r\n var result = undefined;\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n var isValid = false;\r\n if (typeof sourceValue === \"string\") {\r\n try {\r\n var size = shared_1.SizeAndUnit.parse(sourceValue, true);\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n isValid = true;\r\n }\r\n }\r\n catch (_a) {\r\n // Swallow the exception\r\n }\r\n // If the source value isn't valid per this property definition,\r\n // check its validity per the fallback property, if specified\r\n if (!isValid && this.fallbackProperty) {\r\n isValid = this.fallbackProperty.isValidValue(sourceValue, context);\r\n }\r\n }\r\n if (!isValid) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\r\n }\r\n return result;\r\n };\r\n ImageDimensionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\r\n };\r\n return ImageDimensionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nvar Image = /** @class */ (function (_super) {\r\n __extends(Image, _super);\r\n function Image() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.size = Enums.Size.Auto;\r\n _this.style = Enums.ImageStyle.Default;\r\n return _this;\r\n }\r\n Image.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n schema.remove(CardElement.heightProperty);\r\n };\r\n //#endregion\r\n Image.prototype.applySize = function (element) {\r\n if (this.pixelWidth || this.pixelHeight) {\r\n if (this.pixelWidth) {\r\n element.style.width = this.pixelWidth + \"px\";\r\n }\r\n if (this.pixelHeight) {\r\n element.style.height = this.pixelHeight + \"px\";\r\n }\r\n }\r\n else {\r\n if (this.maxHeight) {\r\n // If the image is constrained in height, we set its height property and\r\n // auto and stretch are ignored (default to medium). THis is necessary for\r\n // ImageSet which uses a maximum image height as opposed to the cards width\r\n // as a constraining dimension\r\n switch (this.size) {\r\n case Enums.Size.Small:\r\n element.style.height = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.height = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n default:\r\n element.style.height = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n element.style.maxHeight = this.maxHeight + \"px\";\r\n }\r\n else {\r\n switch (this.size) {\r\n case Enums.Size.Stretch:\r\n element.style.width = \"100%\";\r\n break;\r\n case Enums.Size.Auto:\r\n element.style.maxWidth = \"100%\";\r\n break;\r\n case Enums.Size.Small:\r\n element.style.width = this.hostConfig.imageSizes.small + \"px\";\r\n break;\r\n case Enums.Size.Large:\r\n element.style.width = this.hostConfig.imageSizes.large + \"px\";\r\n break;\r\n case Enums.Size.Medium:\r\n element.style.width = this.hostConfig.imageSizes.medium + \"px\";\r\n break;\r\n }\r\n element.style.maxHeight = \"100%\";\r\n }\r\n }\r\n };\r\n Object.defineProperty(Image.prototype, \"useDefaultSizing\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Image.prototype.internalRender = function () {\r\n var _this = this;\r\n var element = undefined;\r\n if (this.url) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"flex-start\";\r\n // Cache hostConfig to avoid walking the parent hierarchy multiple times\r\n var hostConfig = this.hostConfig;\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n var imageElement = document.createElement(\"img\");\r\n this.renderedImageElement = imageElement;\r\n imageElement.onload = function (_e) {\r\n raiseImageLoadedEvent(_this);\r\n };\r\n imageElement.onerror = function (_e) {\r\n if (_this.renderedElement) {\r\n var card = _this.getRootElement();\r\n clearElement(_this.renderedElement);\r\n if (card && card.designMode) {\r\n var errorElement = document.createElement(\"div\");\r\n errorElement.style.display = \"flex\";\r\n errorElement.style.alignItems = \"center\";\r\n errorElement.style.justifyContent = \"center\";\r\n errorElement.style.backgroundColor = \"#EEEEEE\";\r\n errorElement.style.color = \"black\";\r\n errorElement.innerText = \":-(\";\r\n errorElement.style.padding = \"10px\";\r\n _this.applySize(errorElement);\r\n _this.renderedElement.appendChild(errorElement);\r\n }\r\n }\r\n raiseImageLoadedEvent(_this);\r\n };\r\n imageElement.style.minWidth = \"0\";\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-image\"));\r\n if (this.selectAction && hostConfig.supportsInteractivity) {\r\n imageElement.onkeypress = function (e) {\r\n if (_this.selectAction &&\r\n _this.selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")) {\r\n // enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n imageElement.onclick = function (e) {\r\n if (_this.selectAction && _this.selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.selectAction.execute();\r\n }\r\n };\r\n this.selectAction.setupElementForAccessibility(imageElement);\r\n if (this.selectAction.isEffectivelyEnabled()) {\r\n imageElement.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n this.applySize(imageElement);\r\n if (this.style === Enums.ImageStyle.Person) {\r\n imageElement.style.borderRadius = \"50%\";\r\n imageElement.style.backgroundPosition = \"50% 50%\";\r\n imageElement.style.backgroundRepeat = \"no-repeat\";\r\n }\r\n var backgroundColor = Utils.stringToCssColor(this.backgroundColor);\r\n if (backgroundColor) {\r\n imageElement.style.backgroundColor = backgroundColor;\r\n }\r\n this.setImageSource(imageElement);\r\n var altTextProperty = this.preProcessPropertyValue(Image.altTextProperty);\r\n if (altTextProperty) {\r\n imageElement.alt = altTextProperty;\r\n }\r\n element.appendChild(imageElement);\r\n }\r\n return element;\r\n };\r\n Image.prototype.getJsonTypeName = function () {\r\n return \"Image\";\r\n };\r\n Image.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n if (this.selectAction) {\r\n result.push(this.selectAction);\r\n }\r\n return result;\r\n };\r\n Image.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result && this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n return result;\r\n };\r\n Image.prototype.getResourceInformation = function () {\r\n return this.url ? [{ url: this.url, mimeType: \"image\" }] : [];\r\n };\r\n Image.prototype.setImageSource = function (imageElement) {\r\n var imageForceLoader = new ImageForceLoader(this.forceLoad, this.url);\r\n imageForceLoader.configureImage(this);\r\n imageElement.src = this.preProcessPropertyValue(Image.urlProperty);\r\n imageForceLoader.resetImage(this);\r\n };\r\n Image.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\r\n Image.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"altText\");\r\n Image.backgroundColorProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"backgroundColor\");\r\n Image.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.ImageStyle, Enums.ImageStyle.Default);\r\n Image.sizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"size\", Enums.Size, Enums.Size.Auto);\r\n Image.pixelWidthProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"width\", \"pixelWidth\");\r\n Image.pixelHeightProperty = new ImageDimensionProperty(serialization_1.Versions.v1_1, \"height\", \"pixelHeight\", CardElement.heightProperty);\r\n Image.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n Image.shouldForceLoadProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, \"forceLoad\", false);\r\n __decorate([\r\n (0, serialization_1.property)(Image.urlProperty)\r\n ], Image.prototype, \"url\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.altTextProperty)\r\n ], Image.prototype, \"altText\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.backgroundColorProperty)\r\n ], Image.prototype, \"backgroundColor\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.sizeProperty)\r\n ], Image.prototype, \"size\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.styleProperty)\r\n ], Image.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.pixelWidthProperty)\r\n ], Image.prototype, \"pixelWidth\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.pixelHeightProperty)\r\n ], Image.prototype, \"pixelHeight\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.selectActionProperty)\r\n ], Image.prototype, \"selectAction\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Image.shouldForceLoadProperty)\r\n ], Image.prototype, \"forceLoad\", void 0);\r\n return Image;\r\n}(CardElement));\r\nexports.Image = Image;\r\n// configures Image element to fetch a new image data from url source instead of relying on cache\r\n// currently rudimentary refreshing scheme is used\r\n// by attaching unique query string to url, we bypass the cache usage\r\nvar ImageForceLoader = /** @class */ (function () {\r\n function ImageForceLoader(doForceLoad, url) {\r\n this.doForceLoad = doForceLoad;\r\n this.url = url;\r\n if (url && url.length && doForceLoad) {\r\n // we can do better by appending unique key such as uuid instead of epoch\r\n // however the current usage is for front-end ui and networking, \r\n // since ui is running in single main thread, this is sufficient mechanism\r\n // without needing to depend on external library for our small use cases.\r\n this.uniqueHash = '?' + Date.now();\r\n this.urlWithForceLoadOption = url + this.uniqueHash;\r\n }\r\n }\r\n ImageForceLoader.prototype.configureImage = function (image) {\r\n if (this.urlWithForceLoadOption && this.urlWithForceLoadOption.length) {\r\n image.url = this.urlWithForceLoadOption;\r\n }\r\n };\r\n ImageForceLoader.prototype.resetImage = function (image) {\r\n image.url = this.url;\r\n };\r\n return ImageForceLoader;\r\n}());\r\nvar CardElementContainer = /** @class */ (function (_super) {\r\n __extends(CardElementContainer, _super);\r\n function CardElementContainer() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.allowVerticalOverflow = false;\r\n return _this;\r\n }\r\n CardElementContainer.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n if (!this.isSelectable) {\r\n schema.remove(CardElementContainer.selectActionProperty);\r\n }\r\n };\r\n //#endregion\r\n CardElementContainer.prototype.isElementAllowed = function (element) {\r\n return this.hostConfig.supportsInteractivity || !element.isInteractive;\r\n };\r\n CardElementContainer.prototype.applyPadding = function () {\r\n _super.prototype.applyPadding.call(this);\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n var physicalPadding = new shared_1.SpacingDefinition();\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\r\n }\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n };\r\n Object.defineProperty(CardElementContainer.prototype, \"isSelectable\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardElementContainer.prototype.forbiddenChildElements = function () {\r\n return [];\r\n };\r\n CardElementContainer.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).releaseDOMResources();\r\n }\r\n };\r\n CardElementContainer.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n var item = this.getItemAt(i);\r\n if (!this.hostConfig.supportsInteractivity && item.isInteractive) {\r\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\r\n }\r\n if (!this.isElementAllowed(item)) {\r\n context.addFailure(this, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(item.getJsonTypeName()));\r\n }\r\n item.internalValidateProperties(context);\r\n }\r\n if (this._selectAction) {\r\n this._selectAction.internalValidateProperties(context);\r\n }\r\n };\r\n CardElementContainer.prototype.render = function () {\r\n var _this = this;\r\n var element = _super.prototype.render.call(this);\r\n if (element) {\r\n var hostConfig = this.hostConfig;\r\n if (this.allowVerticalOverflow) {\r\n element.style.overflowX = \"hidden\";\r\n element.style.overflowY = \"auto\";\r\n }\r\n if (element &&\r\n this.isSelectable &&\r\n this._selectAction &&\r\n hostConfig.supportsInteractivity) {\r\n element.onclick = function (e) {\r\n if (_this._selectAction && _this._selectAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this._selectAction.execute();\r\n }\r\n };\r\n element.onkeypress = function (e) {\r\n if (_this._selectAction &&\r\n _this._selectAction.isEffectivelyEnabled() &&\r\n (e.code === \"Enter\" || e.code === \"Space\")) {\r\n // Enter or space pressed\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this._selectAction.execute();\r\n }\r\n };\r\n this._selectAction.setupElementForAccessibility(element);\r\n if (this._selectAction.isEffectivelyEnabled()) {\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n }\r\n }\r\n return element;\r\n };\r\n CardElementContainer.prototype.updateLayout = function (processChildren) {\r\n if (processChildren === void 0) { processChildren = true; }\r\n _super.prototype.updateLayout.call(this, processChildren);\r\n if (processChildren) {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).updateLayout();\r\n }\r\n }\r\n };\r\n CardElementContainer.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n var result = [];\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result.push.apply(result, this.getItemAt(i).getAllInputs(processActions));\r\n }\r\n return result;\r\n };\r\n CardElementContainer.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result.push.apply(result, this.getItemAt(i).getAllActions());\r\n }\r\n if (this._selectAction) {\r\n result.push(this._selectAction);\r\n }\r\n return result;\r\n };\r\n CardElementContainer.prototype.getResourceInformation = function () {\r\n var result = [];\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result.push.apply(result, this.getItemAt(i).getResourceInformation());\r\n }\r\n return result;\r\n };\r\n CardElementContainer.prototype.getElementById = function (id) {\r\n var result = _super.prototype.getElementById.call(this, id);\r\n if (!result) {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n result = this.getItemAt(i).getElementById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n CardElementContainer.prototype.findDOMNodeOwner = function (node) {\r\n var _a;\r\n var target = undefined;\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n // recur through child elements\r\n target = this.getItemAt(i).findDOMNodeOwner(node);\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n // If not found in children, check the actions\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n target = (_a = this.getActionAt(i)) === null || _a === void 0 ? void 0 : _a.findDOMNodeOwner(node);\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n // if not found in children or actions, defer to parent implementation\r\n return _super.prototype.findDOMNodeOwner.call(this, node);\r\n };\r\n CardElementContainer.selectActionProperty = new ActionProperty(serialization_1.Versions.v1_1, \"selectAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n __decorate([\r\n (0, serialization_1.property)(CardElementContainer.selectActionProperty)\r\n ], CardElementContainer.prototype, \"_selectAction\", void 0);\r\n return CardElementContainer;\r\n}(CardElement));\r\nexports.CardElementContainer = CardElementContainer;\r\nvar ImageSet = /** @class */ (function (_super) {\r\n __extends(ImageSet, _super);\r\n function ImageSet() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._images = [];\r\n _this.imageSize = Enums.ImageSize.Medium;\r\n _this.presentationStyle = Enums.ImageSetPresentationStyle.Default;\r\n _this.pixelOffset = 0;\r\n return _this;\r\n }\r\n //#endregion\r\n ImageSet.prototype.internalRender = function () {\r\n var element = undefined;\r\n if (this._images.length > 0) {\r\n element = document.createElement(\"div\");\r\n element.style.display = \"flex\";\r\n element.style.flexWrap = \"wrap\";\r\n for (var _i = 0, _a = this._images; _i < _a.length; _i++) {\r\n var image = _a[_i];\r\n switch (this.imageSize) {\r\n case Enums.ImageSize.Small:\r\n image.size = Enums.Size.Small;\r\n break;\r\n case Enums.ImageSize.Large:\r\n image.size = Enums.Size.Large;\r\n break;\r\n default:\r\n image.size = Enums.Size.Medium;\r\n break;\r\n }\r\n image.maxHeight = this.hostConfig.imageSet.maxImageHeight;\r\n var renderedImage = image.render();\r\n if (renderedImage) {\r\n renderedImage.style.display = \"inline-flex\";\r\n renderedImage.style.margin = \"0px\";\r\n if (this.presentationStyle == Enums.ImageSetPresentationStyle.Default) {\r\n renderedImage.style.marginRight = \"10px\";\r\n }\r\n Utils.appendChild(element, renderedImage);\r\n }\r\n }\r\n if (this.presentationStyle == Enums.ImageSetPresentationStyle.Stacked) {\r\n this.applyStackedPresentationStyle();\r\n }\r\n }\r\n return element;\r\n };\r\n ImageSet.prototype.applyStackedPresentationStyle = function () {\r\n if (this._images[0].renderedImageElement) {\r\n var dimension = StackedImageConfigurator.parseNumericPixelDimension(this._images[0].renderedImageElement.style.height);\r\n var bgColor = this.getEffectiveBackgroundColor();\r\n if (dimension) {\r\n var stackedImageConfigurator = new StackedImageConfigurator(this.pixelOffset, dimension, bgColor);\r\n stackedImageConfigurator.configureImagesArrayAsStackedLayout(this._images);\r\n }\r\n }\r\n };\r\n ImageSet.prototype.getEffectiveBackgroundColor = function () {\r\n var parentContainer = this.getParentContainer();\r\n var style = parentContainer === null || parentContainer === void 0 ? void 0 : parentContainer.getEffectiveStyle();\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\r\n return Utils.stringToCssColor(styleDefinition.backgroundColor);\r\n };\r\n ImageSet.prototype.getItemCount = function () {\r\n return this._images.length;\r\n };\r\n ImageSet.prototype.getItemAt = function (index) {\r\n return this._images[index];\r\n };\r\n ImageSet.prototype.getFirstVisibleRenderedItem = function () {\r\n return this._images && this._images.length > 0 ? this._images[0] : undefined;\r\n };\r\n ImageSet.prototype.getLastVisibleRenderedItem = function () {\r\n return this._images && this._images.length > 0\r\n ? this._images[this._images.length - 1]\r\n : undefined;\r\n };\r\n ImageSet.prototype.removeItem = function (item) {\r\n if (item instanceof Image) {\r\n var itemIndex = this._images.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._images.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n ImageSet.prototype.getJsonTypeName = function () {\r\n return \"ImageSet\";\r\n };\r\n ImageSet.prototype.addImage = function (image) {\r\n if (!image.parent) {\r\n this._images.push(image);\r\n image.setParent(this);\r\n }\r\n else {\r\n throw new Error(\"This image already belongs to another ImageSet\");\r\n }\r\n };\r\n ImageSet.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof Image ? this._images.indexOf(cardElement) : -1;\r\n };\r\n ImageSet.imagesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"images\", Image, function (sender, item) {\r\n item.setParent(sender);\r\n });\r\n ImageSet.imageSizeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"imageSize\", Enums.ImageSize, Enums.ImageSize.Medium);\r\n ImageSet.imagePresentationStyle = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"style\", Enums.ImageSetPresentationStyle, Enums.ImageSetPresentationStyle.Default);\r\n ImageSet.pixelOffset = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"offset\", 0, undefined);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.imagesProperty)\r\n ], ImageSet.prototype, \"_images\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.imageSizeProperty)\r\n ], ImageSet.prototype, \"imageSize\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.imagePresentationStyle)\r\n ], ImageSet.prototype, \"presentationStyle\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ImageSet.pixelOffset)\r\n ], ImageSet.prototype, \"pixelOffset\", void 0);\r\n return ImageSet;\r\n}(CardElementContainer));\r\nexports.ImageSet = ImageSet;\r\nvar StackedImageConfigurator = /** @class */ (function () {\r\n function StackedImageConfigurator(offset, dimension, style) {\r\n this.sign45 = 0.7071;\r\n this.maxImageCounts = 2;\r\n this.offset = 0;\r\n this.normalizationConstant = 0;\r\n this.border = 5;\r\n this.dimension = 0;\r\n this.dimension = dimension;\r\n this.normalizationConstant = (dimension * this.sign45 - 0.5 * dimension) * 2;\r\n // offset determines how far images are placed from each other\r\n // at zero, images are separated only by the border\r\n // there is no restriction on how far they are apart in positive values, their actual\r\n // positioning is limited by maximum size imposed by Image renderer\r\n // a negative value can decrease upto the diameter of the image since a value less than the diameter\r\n // put the images past each other, and the use of such value is not reasonable request\r\n // users should change image positions in such case.\r\n this.offset = this.sign45 * (Math.max(offset, -dimension) - this.normalizationConstant);\r\n this.style = style ? style : \"\";\r\n }\r\n StackedImageConfigurator.prototype.moveImageRight = function (element) {\r\n element.style.marginLeft = this.offset + \"px\";\r\n };\r\n StackedImageConfigurator.prototype.moveImageUp = function (element) {\r\n element.style.marginBottom = this.offset + this.dimension + \"px\";\r\n };\r\n StackedImageConfigurator.prototype.moveImageDown = function (element) {\r\n element.style.marginTop = this.offset + this.dimension + \"px\";\r\n };\r\n StackedImageConfigurator.prototype.makeImageRound = function (element) {\r\n element.style.borderRadius = \"50%\";\r\n element.style.backgroundPosition = \"50% 50%\";\r\n element.style.backgroundRepeat = \"no-repeat\";\r\n };\r\n StackedImageConfigurator.prototype.applyBorder = function (element) {\r\n element.style.height = (this.dimension + this.border * 2) + \"px\";\r\n element.style.border = this.border + \"px\" + \" solid \" + this.style;\r\n };\r\n StackedImageConfigurator.prototype.configureImageForBottomLeft = function (element) {\r\n this.moveImageDown(element);\r\n this.makeImageRound(element);\r\n this.applyBorder(element);\r\n element.style.zIndex = \"2\";\r\n };\r\n StackedImageConfigurator.prototype.configureImageForTopRight = function (element) {\r\n this.moveImageUp(element);\r\n this.moveImageRight(element);\r\n this.makeImageRound(element);\r\n element.style.zIndex = \"1\";\r\n };\r\n // stacked layout is applied when there are two images in ImageSet,\r\n // first image in the ImageSet is put bottom left of ImageSet,\r\n // second image is placed top right diagonally to the first image at 45 angle\r\n // first image is placed over the second image should the overlap to occur.\r\n StackedImageConfigurator.prototype.configureImagesArrayAsStackedLayout = function (elements) {\r\n if (elements.length == 1) {\r\n if (elements[0].renderedImageElement) {\r\n this.makeImageRound(elements[0].renderedImageElement);\r\n }\r\n }\r\n else if (elements.length <= this.maxImageCounts) {\r\n if (elements[0].renderedImageElement && elements[1].renderedImageElement) {\r\n this.configureImageForBottomLeft(elements[0].renderedImageElement);\r\n this.configureImageForTopRight(elements[1].renderedImageElement);\r\n }\r\n }\r\n };\r\n StackedImageConfigurator.parseNumericPixelDimension = function (dimension) {\r\n if ((dimension === null || dimension === void 0 ? void 0 : dimension.substring(dimension.length - 2)) == 'px') {\r\n return parseInt(dimension.substring(0, dimension.length - 2));\r\n }\r\n return undefined;\r\n };\r\n return StackedImageConfigurator;\r\n}());\r\nvar ContentSource = /** @class */ (function (_super) {\r\n __extends(ContentSource, _super);\r\n //#endregion\r\n function ContentSource(url, mimeType) {\r\n var _this = _super.call(this) || this;\r\n _this.url = url;\r\n _this.mimeType = mimeType;\r\n return _this;\r\n }\r\n ContentSource.prototype.isValid = function () {\r\n return this.mimeType && this.url ? true : false;\r\n };\r\n //#region Schema\r\n ContentSource.mimeTypeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"mimeType\");\r\n ContentSource.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"url\");\r\n __decorate([\r\n (0, serialization_1.property)(ContentSource.mimeTypeProperty)\r\n ], ContentSource.prototype, \"mimeType\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ContentSource.urlProperty)\r\n ], ContentSource.prototype, \"url\", void 0);\r\n return ContentSource;\r\n}(serialization_1.SerializableObject));\r\nexports.ContentSource = ContentSource;\r\nvar CaptionSource = /** @class */ (function (_super) {\r\n __extends(CaptionSource, _super);\r\n //#endregion\r\n function CaptionSource(url, mimeType, label) {\r\n var _this = _super.call(this, url, mimeType) || this;\r\n _this.label = label;\r\n return _this;\r\n }\r\n CaptionSource.prototype.getSchemaKey = function () {\r\n return \"CaptionSource\";\r\n };\r\n CaptionSource.prototype.render = function () {\r\n var result = undefined;\r\n if (this.isValid()) {\r\n result = document.createElement(\"track\");\r\n result.src = this.url;\r\n result.kind = \"captions\";\r\n result.label = this.label;\r\n }\r\n return result;\r\n };\r\n //#region Schema\r\n CaptionSource.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"label\");\r\n __decorate([\r\n (0, serialization_1.property)(CaptionSource.labelProperty)\r\n ], CaptionSource.prototype, \"label\", void 0);\r\n return CaptionSource;\r\n}(ContentSource));\r\nexports.CaptionSource = CaptionSource;\r\nvar MediaSource = /** @class */ (function (_super) {\r\n __extends(MediaSource, _super);\r\n function MediaSource() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n MediaSource.prototype.getSchemaKey = function () {\r\n return \"MediaSource\";\r\n };\r\n MediaSource.prototype.render = function () {\r\n var result = undefined;\r\n if (this.isValid()) {\r\n result = document.createElement(\"source\");\r\n result.src = this.url;\r\n result.type = this.mimeType;\r\n }\r\n return result;\r\n };\r\n return MediaSource;\r\n}(ContentSource));\r\nexports.MediaSource = MediaSource;\r\nvar MediaPlayer = /** @class */ (function () {\r\n function MediaPlayer() {\r\n }\r\n MediaPlayer.prototype.play = function () {\r\n // Do nothing in base implementation\r\n };\r\n Object.defineProperty(MediaPlayer.prototype, \"posterUrl\", {\r\n get: function () {\r\n return this._posterUrl;\r\n },\r\n set: function (value) {\r\n this._posterUrl = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaPlayer.prototype, \"selectedMediaType\", {\r\n get: function () {\r\n return undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return MediaPlayer;\r\n}());\r\nexports.MediaPlayer = MediaPlayer;\r\nvar HTML5MediaPlayer = /** @class */ (function (_super) {\r\n __extends(HTML5MediaPlayer, _super);\r\n function HTML5MediaPlayer(owner) {\r\n var _this = _super.call(this) || this;\r\n _this.owner = owner;\r\n _this._selectedSources = [];\r\n _this._captionSources = [];\r\n _this.processSources();\r\n return _this;\r\n }\r\n HTML5MediaPlayer.prototype.processSources = function () {\r\n var _a;\r\n this._selectedSources = [];\r\n this._captionSources = [];\r\n this._selectedMediaType = undefined;\r\n for (var _i = 0, _b = this.owner.sources; _i < _b.length; _i++) {\r\n var source = _b[_i];\r\n var mimeComponents = source.mimeType ? source.mimeType.split(\"/\") : [];\r\n if (mimeComponents.length === 2) {\r\n if (!this._selectedMediaType) {\r\n var index = HTML5MediaPlayer.supportedMediaTypes.indexOf(mimeComponents[0]);\r\n if (index >= 0) {\r\n this._selectedMediaType = HTML5MediaPlayer.supportedMediaTypes[index];\r\n }\r\n }\r\n if (mimeComponents[0] === this._selectedMediaType) {\r\n this._selectedSources.push(source);\r\n }\r\n }\r\n }\r\n (_a = this._captionSources).push.apply(_a, this.owner.captionSources);\r\n };\r\n HTML5MediaPlayer.prototype.canPlay = function () {\r\n return this._selectedSources.length > 0;\r\n };\r\n HTML5MediaPlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n HTML5MediaPlayer.prototype.render = function () {\r\n if (this._selectedMediaType === \"video\") {\r\n this._mediaElement = document.createElement(\"video\");\r\n }\r\n else {\r\n this._mediaElement = document.createElement(\"audio\");\r\n }\r\n this._mediaElement.setAttribute(\"aria-label\", this.owner.altText ? this.owner.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\r\n this._mediaElement.setAttribute(\"webkit-playsinline\", \"\");\r\n this._mediaElement.setAttribute(\"playsinline\", \"\");\r\n // We enable crossorigin for cases where the caption file has a different domain than\r\n // the video file. If the caption file lives in a different domain than the video file\r\n // and crossorigin is not set, then the caption file will fail to load.\r\n this._mediaElement.setAttribute(\"crossorigin\", \"\");\r\n this._mediaElement.autoplay = true;\r\n this._mediaElement.controls = true;\r\n if (Utils.isMobileOS()) {\r\n this._mediaElement.muted = true;\r\n }\r\n this._mediaElement.preload = \"none\";\r\n this._mediaElement.style.width = \"100%\";\r\n for (var _i = 0, _a = this.owner.sources; _i < _a.length; _i++) {\r\n var source = _a[_i];\r\n var renderedSource = source.render();\r\n Utils.appendChild(this._mediaElement, renderedSource);\r\n }\r\n for (var _b = 0, _c = this.owner.captionSources; _b < _c.length; _b++) {\r\n var captionSource = _c[_b];\r\n if (captionSource.mimeType == \"vtt\") {\r\n var renderedCaptionSource = captionSource.render();\r\n Utils.appendChild(this._mediaElement, renderedCaptionSource);\r\n }\r\n }\r\n return this._mediaElement;\r\n };\r\n HTML5MediaPlayer.prototype.play = function () {\r\n if (this._mediaElement) {\r\n this._mediaElement.play();\r\n }\r\n };\r\n Object.defineProperty(HTML5MediaPlayer.prototype, \"selectedMediaType\", {\r\n get: function () {\r\n return this._selectedMediaType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n HTML5MediaPlayer.supportedMediaTypes = [\"audio\", \"video\"];\r\n return HTML5MediaPlayer;\r\n}(MediaPlayer));\r\nexports.HTML5MediaPlayer = HTML5MediaPlayer;\r\nvar CustomMediaPlayer = /** @class */ (function (_super) {\r\n __extends(CustomMediaPlayer, _super);\r\n function CustomMediaPlayer(matches) {\r\n return _super.call(this) || this;\r\n }\r\n return CustomMediaPlayer;\r\n}(MediaPlayer));\r\nexports.CustomMediaPlayer = CustomMediaPlayer;\r\nvar IFrameMediaMediaPlayer = /** @class */ (function (_super) {\r\n __extends(IFrameMediaMediaPlayer, _super);\r\n function IFrameMediaMediaPlayer(matches, iFrameTitle) {\r\n var _this = _super.call(this, matches) || this;\r\n _this.iFrameTitle = iFrameTitle;\r\n if (matches.length >= 2) {\r\n _this._videoId = matches[1];\r\n }\r\n return _this;\r\n }\r\n IFrameMediaMediaPlayer.prototype.canPlay = function () {\r\n return this._videoId !== undefined;\r\n };\r\n IFrameMediaMediaPlayer.prototype.render = function () {\r\n var container = document.createElement(\"div\");\r\n container.style.position = \"relative\";\r\n container.style.width = \"100%\";\r\n container.style.height = \"0\";\r\n container.style.paddingBottom = \"56.25%\";\r\n var iFrame = document.createElement(\"iframe\");\r\n iFrame.style.position = \"absolute\";\r\n iFrame.style.top = \"0\";\r\n iFrame.style.left = \"0\";\r\n iFrame.style.width = \"100%\";\r\n iFrame.style.height = \"100%\";\r\n iFrame.src = this.getEmbedVideoUrl();\r\n iFrame.frameBorder = \"0\";\r\n if (this.iFrameTitle) {\r\n iFrame.title = this.iFrameTitle;\r\n }\r\n iFrame.allow =\r\n \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\";\r\n iFrame.allowFullscreen = true;\r\n container.appendChild(iFrame);\r\n return container;\r\n };\r\n Object.defineProperty(IFrameMediaMediaPlayer.prototype, \"videoId\", {\r\n get: function () {\r\n return this._videoId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return IFrameMediaMediaPlayer;\r\n}(CustomMediaPlayer));\r\nexports.IFrameMediaMediaPlayer = IFrameMediaMediaPlayer;\r\nvar VimeoPlayer = /** @class */ (function (_super) {\r\n __extends(VimeoPlayer, _super);\r\n function VimeoPlayer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n VimeoPlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var oEmbedUrl, response, json;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n oEmbedUrl = \"https://vimeo.com/api/oembed.json?url=\".concat(this.getEmbedVideoUrl());\r\n return [4 /*yield*/, fetch(oEmbedUrl)];\r\n case 1:\r\n response = _a.sent();\r\n if (!response.ok) return [3 /*break*/, 3];\r\n return [4 /*yield*/, response.json()];\r\n case 2:\r\n json = _a.sent();\r\n this.posterUrl = json[\"thumbnail_url\"];\r\n _a.label = 3;\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n VimeoPlayer.prototype.getEmbedVideoUrl = function () {\r\n return \"https://player.vimeo.com/video/\".concat(this.videoId, \"?autoplay=1\");\r\n };\r\n return VimeoPlayer;\r\n}(IFrameMediaMediaPlayer));\r\nexports.VimeoPlayer = VimeoPlayer;\r\nvar DailymotionPlayer = /** @class */ (function (_super) {\r\n __extends(DailymotionPlayer, _super);\r\n function DailymotionPlayer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DailymotionPlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var apiUrl, response, json;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n apiUrl = \"https://api.dailymotion.com/video/\".concat(this.videoId, \"?fields=thumbnail_720_url\");\r\n return [4 /*yield*/, fetch(apiUrl)];\r\n case 1:\r\n response = _a.sent();\r\n if (!response.ok) return [3 /*break*/, 3];\r\n return [4 /*yield*/, response.json()];\r\n case 2:\r\n json = _a.sent();\r\n this.posterUrl = json[\"thumbnail_720_url\"];\r\n _a.label = 3;\r\n case 3: return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n DailymotionPlayer.prototype.getEmbedVideoUrl = function () {\r\n return \"https://www.dailymotion.com/embed/video/\".concat(this.videoId, \"?autoplay=1\");\r\n };\r\n return DailymotionPlayer;\r\n}(IFrameMediaMediaPlayer));\r\nexports.DailymotionPlayer = DailymotionPlayer;\r\nvar YouTubePlayer = /** @class */ (function (_super) {\r\n __extends(YouTubePlayer, _super);\r\n function YouTubePlayer(matches, iFrameTitle) {\r\n var _this = _super.call(this, matches, iFrameTitle) || this;\r\n _this.iFrameTitle = iFrameTitle;\r\n if (matches.length >= 3 && matches[2] !== undefined) {\r\n _this._startTimeIndex = parseInt(matches[2]);\r\n }\r\n return _this;\r\n }\r\n YouTubePlayer.prototype.fetchVideoDetails = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n this.posterUrl = this.videoId\r\n ? \"https://img.youtube.com/vi/\".concat(this.videoId, \"/maxresdefault.jpg\")\r\n : undefined;\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n YouTubePlayer.prototype.getEmbedVideoUrl = function () {\r\n var url = \"https://www.youtube.com/embed/\".concat(this.videoId, \"?autoplay=1\");\r\n if (this._startTimeIndex !== undefined) {\r\n url += \"&start=\".concat(this._startTimeIndex);\r\n }\r\n return url;\r\n };\r\n return YouTubePlayer;\r\n}(IFrameMediaMediaPlayer));\r\nexports.YouTubePlayer = YouTubePlayer;\r\nvar Media = /** @class */ (function (_super) {\r\n __extends(Media, _super);\r\n function Media() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.sources = [];\r\n _this.captionSources = [];\r\n return _this;\r\n }\r\n Media.prototype.createMediaPlayer = function () {\r\n for (var _i = 0, _a = Media.customMediaPlayers; _i < _a.length; _i++) {\r\n var provider = _a[_i];\r\n for (var _b = 0, _c = this.sources; _b < _c.length; _b++) {\r\n var source = _c[_b];\r\n if (source.url) {\r\n for (var _d = 0, _f = provider.urlPatterns; _d < _f.length; _d++) {\r\n var pattern = _f[_d];\r\n var matches = pattern.exec(source.url);\r\n if (matches !== null) {\r\n return provider.createMediaPlayer(matches);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return new HTML5MediaPlayer(this);\r\n };\r\n Media.prototype.handlePlayButtonInvoke = function (event) {\r\n if (this.hostConfig.media.allowInlinePlayback) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n if (this.renderedElement) {\r\n var mediaPlayerElement = this._mediaPlayer.render();\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(mediaPlayerElement);\r\n this._mediaPlayer.play();\r\n mediaPlayerElement.focus();\r\n }\r\n }\r\n else {\r\n if (Media.onPlay) {\r\n event.preventDefault();\r\n event.cancelBubble = true;\r\n Media.onPlay(this);\r\n }\r\n }\r\n };\r\n Media.prototype.displayPoster = function () {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var playButtonArrowWidth, playButtonArrowHeight, posterRootElement_1, posterUrl, posterImageElement_1, playButtonOuterElement, playButtonInnerElement, playButtonContainer;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n if (this.renderedElement) {\r\n playButtonArrowWidth = 12;\r\n playButtonArrowHeight = 15;\r\n posterRootElement_1 = document.createElement(\"div\");\r\n posterRootElement_1.className = this.hostConfig.makeCssClassName(\"ac-media-poster\");\r\n posterRootElement_1.setAttribute(\"role\", \"contentinfo\");\r\n posterRootElement_1.setAttribute(\"aria-label\", this.altText ? this.altText : strings_1.Strings.defaults.mediaPlayerAriaLabel());\r\n posterRootElement_1.style.position = \"relative\";\r\n posterRootElement_1.style.display = \"flex\";\r\n posterUrl = this.poster ? this.poster : this._mediaPlayer.posterUrl;\r\n if (!posterUrl) {\r\n posterUrl = this.hostConfig.media.defaultPoster;\r\n }\r\n if (posterUrl) {\r\n posterImageElement_1 = document.createElement(\"img\");\r\n posterImageElement_1.style.width = \"100%\";\r\n posterImageElement_1.style.height = \"100%\";\r\n posterImageElement_1.setAttribute(\"role\", \"presentation\");\r\n posterImageElement_1.onerror = function (_e) {\r\n if (posterImageElement_1.parentNode) {\r\n posterImageElement_1.parentNode.removeChild(posterImageElement_1);\r\n }\r\n posterRootElement_1.classList.add(\"empty\");\r\n posterRootElement_1.style.minHeight = \"150px\";\r\n };\r\n posterImageElement_1.src = posterUrl;\r\n posterRootElement_1.appendChild(posterImageElement_1);\r\n }\r\n else {\r\n posterRootElement_1.classList.add(\"empty\");\r\n posterRootElement_1.style.minHeight = \"150px\";\r\n }\r\n if (this.hostConfig.supportsInteractivity && this._mediaPlayer.canPlay()) {\r\n playButtonOuterElement = document.createElement(\"div\");\r\n playButtonOuterElement.tabIndex = 0;\r\n playButtonOuterElement.setAttribute(\"role\", \"button\");\r\n playButtonOuterElement.setAttribute(\"aria-label\", strings_1.Strings.defaults.mediaPlayerPlayMedia());\r\n playButtonOuterElement.className =\r\n this.hostConfig.makeCssClassName(\"ac-media-playButton\");\r\n playButtonOuterElement.style.display = \"flex\";\r\n playButtonOuterElement.style.alignItems = \"center\";\r\n playButtonOuterElement.style.justifyContent = \"center\";\r\n playButtonOuterElement.onclick = function (e) {\r\n _this.handlePlayButtonInvoke(e);\r\n };\r\n playButtonOuterElement.onkeypress = function (e) {\r\n if (e.code === \"Enter\" || e.code === \"Space\") {\r\n // space or enter\r\n _this.handlePlayButtonInvoke(e);\r\n }\r\n };\r\n playButtonInnerElement = document.createElement(\"div\");\r\n playButtonInnerElement.className = this.hostConfig.makeCssClassName(\"ac-media-playButton-arrow\");\r\n playButtonInnerElement.style.width = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.height = playButtonArrowHeight + \"px\";\r\n playButtonInnerElement.style.borderTopWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderBottomWidth = playButtonArrowHeight / 2 + \"px\";\r\n playButtonInnerElement.style.borderLeftWidth = playButtonArrowWidth + \"px\";\r\n playButtonInnerElement.style.borderRightWidth = \"0\";\r\n playButtonInnerElement.style.borderStyle = \"solid\";\r\n playButtonInnerElement.style.borderTopColor = \"transparent\";\r\n playButtonInnerElement.style.borderRightColor = \"transparent\";\r\n playButtonInnerElement.style.borderBottomColor = \"transparent\";\r\n playButtonInnerElement.style.transform =\r\n \"translate(\" + playButtonArrowWidth / 10 + \"px,0px)\";\r\n playButtonOuterElement.appendChild(playButtonInnerElement);\r\n playButtonContainer = document.createElement(\"div\");\r\n playButtonContainer.style.position = \"absolute\";\r\n playButtonContainer.style.left = \"0\";\r\n playButtonContainer.style.top = \"0\";\r\n playButtonContainer.style.width = \"100%\";\r\n playButtonContainer.style.height = \"100%\";\r\n playButtonContainer.style.display = \"flex\";\r\n playButtonContainer.style.justifyContent = \"center\";\r\n playButtonContainer.style.alignItems = \"center\";\r\n playButtonContainer.appendChild(playButtonOuterElement);\r\n posterRootElement_1.appendChild(playButtonContainer);\r\n }\r\n clearElement(this.renderedElement);\r\n this.renderedElement.appendChild(posterRootElement_1);\r\n }\r\n return [2 /*return*/];\r\n });\r\n });\r\n };\r\n Media.prototype.internalRender = function () {\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-media\");\r\n return element;\r\n };\r\n Media.prototype.render = function () {\r\n var _this = this;\r\n var result = _super.prototype.render.call(this);\r\n if (result) {\r\n this._mediaPlayer = this.createMediaPlayer();\r\n this._mediaPlayer.fetchVideoDetails().then(function () { return _this.displayPoster(); });\r\n }\r\n return result;\r\n };\r\n Media.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this.displayPoster();\r\n };\r\n Media.prototype.getJsonTypeName = function () {\r\n return \"Media\";\r\n };\r\n Media.prototype.getResourceInformation = function () {\r\n var result = [];\r\n if (this._mediaPlayer) {\r\n var posterUrl = this.poster ? this.poster : this.hostConfig.media.defaultPoster;\r\n if (posterUrl) {\r\n result.push({ url: posterUrl, mimeType: \"image\" });\r\n }\r\n }\r\n for (var _i = 0, _a = this.sources; _i < _a.length; _i++) {\r\n var mediaSource = _a[_i];\r\n if (mediaSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `mediaSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: mediaSource.url,\r\n mimeType: mediaSource.mimeType\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n for (var _b = 0, _c = this.captionSources; _b < _c.length; _b++) {\r\n var captionSource = _c[_b];\r\n if (captionSource.isValid()) {\r\n result.push({\r\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion -- `captionSource.url` is of type `string | undefined`, but is validated by `isValid()` call */\r\n url: captionSource.url,\r\n mimeType: captionSource.mimeType\r\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\r\n });\r\n }\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(Media.prototype, \"selectedMediaType\", {\r\n get: function () {\r\n return this._mediaPlayer.selectedMediaType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Media.customMediaPlayers = [\r\n {\r\n urlPatterns: [\r\n /^(?:https?:\\/\\/)?(?:www.)?youtube.com\\/watch\\?(?=.*v=([\\w\\d-_]+))(?=(?:.*t=(\\d+))?).*/gi,\r\n /^(?:https?:\\/\\/)?youtu.be\\/([\\w\\d-_]+)(?:\\?t=(\\d+))?/gi\r\n ],\r\n createMediaPlayer: function (matches) {\r\n return new YouTubePlayer(matches, strings_1.Strings.defaults.youTubeVideoPlayer());\r\n }\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?vimeo.com\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: function (matches) {\r\n return new VimeoPlayer(matches, strings_1.Strings.defaults.vimeoVideoPlayer());\r\n }\r\n },\r\n {\r\n urlPatterns: [/^(?:https?:\\/\\/)?(?:www.)?dailymotion.com\\/video\\/([\\w\\d-_]+).*/gi],\r\n createMediaPlayer: function (matches) {\r\n return new DailymotionPlayer(matches, strings_1.Strings.defaults.dailymotionVideoPlayer());\r\n }\r\n }\r\n ];\r\n //#region Schema\r\n Media.sourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_1, \"sources\", MediaSource);\r\n Media.captionSourcesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_6, \"captionSources\", CaptionSource);\r\n Media.posterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"poster\");\r\n Media.altTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"altText\");\r\n __decorate([\r\n (0, serialization_1.property)(Media.sourcesProperty)\r\n ], Media.prototype, \"sources\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Media.captionSourcesProperty)\r\n ], Media.prototype, \"captionSources\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Media.posterProperty)\r\n ], Media.prototype, \"poster\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Media.altTextProperty)\r\n ], Media.prototype, \"altText\", void 0);\r\n return Media;\r\n}(CardElement));\r\nexports.Media = Media;\r\nvar InputEventType;\r\n(function (InputEventType) {\r\n InputEventType[InputEventType[\"InitialRender\"] = 0] = \"InitialRender\";\r\n InputEventType[InputEventType[\"MouseEnterOnCard\"] = 1] = \"MouseEnterOnCard\";\r\n InputEventType[InputEventType[\"MouseLeaveOnCard\"] = 2] = \"MouseLeaveOnCard\";\r\n InputEventType[InputEventType[\"FocusLeave\"] = 3] = \"FocusLeave\";\r\n})(InputEventType || (InputEventType = {}));\r\nvar Input = /** @class */ (function (_super) {\r\n __extends(Input, _super);\r\n function Input() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.inputStyle = Enums.InputStyle.Default;\r\n return _this;\r\n }\r\n Input.prototype.getAllLabelIds = function () {\r\n var labelIds = [];\r\n if (this.labelledBy) {\r\n labelIds.push(this.labelledBy);\r\n }\r\n if (this._renderedLabelElement) {\r\n labelIds.push(this._renderedLabelElement.id);\r\n }\r\n if (this._renderedErrorMessageElement) {\r\n labelIds.push(this._renderedErrorMessageElement.id);\r\n }\r\n return labelIds;\r\n };\r\n Input.prototype.updateInputControlAriaLabelledBy = function () {\r\n if (this._renderedInputControlElement) {\r\n var labelIds = this.getAllLabelIds();\r\n if (labelIds.length > 0) {\r\n this._renderedInputControlElement.setAttribute(\"aria-labelledby\", labelIds.join(\" \"));\r\n }\r\n else {\r\n this._renderedInputControlElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n };\r\n Object.defineProperty(Input.prototype, \"isNullable\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Input.prototype, \"renderedInputControlElement\", {\r\n get: function () {\r\n return this._renderedInputControlElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Input.prototype, \"inputControlContainerElement\", {\r\n get: function () {\r\n return this._inputControlContainerElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Input.prototype.overrideInternalRender = function () {\r\n var _this = this;\r\n var hostConfig = this.hostConfig;\r\n this._outerContainerElement = document.createElement(\"div\");\r\n this._outerContainerElement.style.display = \"flex\";\r\n if (this.labelPosition === Enums.InputLabelPosition.Inline) {\r\n this._outerContainerElement.style.flexDirection = \"row\";\r\n }\r\n else {\r\n this._outerContainerElement.style.flexDirection = \"column\";\r\n }\r\n var renderedInputControlId = Utils.generateUniqueId();\r\n if (this.label) {\r\n var labelRichTextBlock = new RichTextBlock();\r\n labelRichTextBlock.setParent(this);\r\n labelRichTextBlock.forElementId = renderedInputControlId;\r\n var labelInline = new TextRun(this.label);\r\n labelRichTextBlock.addInline(labelInline);\r\n if (this.isRequired) {\r\n labelInline.init(hostConfig.inputs.label.requiredInputs);\r\n var isRequiredCueInline = new TextRun(hostConfig.inputs.label.requiredInputs.suffix);\r\n isRequiredCueInline.color = hostConfig.inputs.label.requiredInputs.suffixColor;\r\n isRequiredCueInline.ariaHidden = true;\r\n labelRichTextBlock.addInline(isRequiredCueInline);\r\n }\r\n else {\r\n labelInline.init(hostConfig.inputs.label.optionalInputs);\r\n }\r\n this._renderedLabelElement = labelRichTextBlock.render();\r\n if (this._renderedLabelElement) {\r\n this._renderedLabelElement.id = Utils.generateUniqueId();\r\n if (this.labelPosition === Enums.InputLabelPosition.Inline) {\r\n // For inline label position: label should be in center of the div and no extra spacing needed\r\n this._renderedLabelElement.style.alignSelf = \"center\";\r\n }\r\n else {\r\n this._renderedLabelElement.style.marginBottom =\r\n hostConfig.getEffectiveSpacing(hostConfig.inputs.label.inputSpacing) + \"px\";\r\n }\r\n this._outerContainerElement.appendChild(this._renderedLabelElement);\r\n }\r\n }\r\n this._inputControlContainerElement = document.createElement(\"div\");\r\n this._inputControlContainerElement.className =\r\n hostConfig.makeCssClassName(\"ac-input-container\");\r\n this._inputControlContainerElement.style.display = \"flex\";\r\n if (this.height === \"stretch\") {\r\n this._inputControlContainerElement.style.alignItems = \"stretch\";\r\n this._inputControlContainerElement.style.flex = \"1 1 auto\";\r\n }\r\n this._renderedInputControlElement = this.internalRender();\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.id = renderedInputControlId;\r\n this._renderedInputControlElement.style.minWidth = \"0px\";\r\n if (this.isNullable && this.isRequired) {\r\n this._renderedInputControlElement.setAttribute(\"aria-required\", \"true\");\r\n this._renderedInputControlElement.classList.add(hostConfig.makeCssClassName(\"ac-input-required\"));\r\n }\r\n this._inputControlContainerElement.appendChild(this._renderedInputControlElement);\r\n this._outerContainerElement.appendChild(this._inputControlContainerElement);\r\n if (this._renderedLabelElement && this.labelPosition === Enums.InputLabelPosition.Inline) {\r\n if (!this.labelWidth) {\r\n var defaultLabelWidth = hostConfig.inputs.label.width;\r\n this._renderedLabelElement.style.width = defaultLabelWidth.toString() + \"%\";\r\n this._inputControlContainerElement.style.width = (100 - defaultLabelWidth) + \"%\";\r\n }\r\n else if (this.labelWidth.unit == Enums.SizeUnit.Weight) {\r\n var labelWidthInPercent = this.labelWidth.physicalSize;\r\n this._renderedLabelElement.style.width = labelWidthInPercent.toString() + \"%\";\r\n this._inputControlContainerElement.style.width = (100 - labelWidthInPercent).toString() + \"%\";\r\n }\r\n else if (this.labelWidth.unit == Enums.SizeUnit.Pixel) {\r\n var labelWidthInPixel = this.labelWidth.physicalSize;\r\n this._renderedLabelElement.style.width = labelWidthInPixel.toString() + \"px\";\r\n }\r\n }\r\n this.updateVisualState(InputEventType.InitialRender);\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.onblur = function (ev) {\r\n _this.updateVisualState(InputEventType.FocusLeave);\r\n };\r\n }\r\n this.updateInputControlAriaLabelledBy();\r\n return this._outerContainerElement;\r\n }\r\n this.resetDirtyState();\r\n return undefined;\r\n };\r\n Input.prototype.valueChanged = function () {\r\n this.getRootElement().updateActionsEnabledState();\r\n if (this.isValid()) {\r\n this.resetValidationFailureCue();\r\n }\r\n if (this.onValueChanged) {\r\n this.onValueChanged(this);\r\n }\r\n raiseInputValueChangedEvent(this);\r\n };\r\n Input.prototype.resetValidationFailureCue = function () {\r\n if (this.renderedInputControlElement) {\r\n if (this instanceof ChoiceSetInput && this.isDynamicTypeahead()) {\r\n this.removeValidationFailureCue();\r\n }\r\n else {\r\n this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n }\r\n this.updateInputControlAriaLabelledBy();\r\n if (this._renderedErrorMessageElement) {\r\n this._outerContainerElement.removeChild(this._renderedErrorMessageElement);\r\n this._renderedErrorMessageElement = undefined;\r\n }\r\n }\r\n };\r\n Input.prototype.showValidationErrorMessage = function () {\r\n if (this.renderedElement &&\r\n this.errorMessage &&\r\n shared_1.GlobalSettings.displayInputValidationErrors) {\r\n var errorMessageTextBlock = new TextBlock();\r\n errorMessageTextBlock.setParent(this);\r\n errorMessageTextBlock.text = this.errorMessage;\r\n errorMessageTextBlock.wrap = true;\r\n errorMessageTextBlock.init(this.hostConfig.inputs.errorMessage);\r\n this._renderedErrorMessageElement = errorMessageTextBlock.render();\r\n if (this._renderedErrorMessageElement) {\r\n this._renderedErrorMessageElement.id = Utils.generateUniqueId();\r\n this._outerContainerElement.appendChild(this._renderedErrorMessageElement);\r\n this.updateInputControlAriaLabelledBy();\r\n }\r\n }\r\n };\r\n Object.defineProperty(Input.prototype, \"allowRevealOnHoverStyle\", {\r\n get: function () {\r\n return this.hostConfig.inputs && this.hostConfig.inputs.allowRevealOnHoverStyle;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Input.prototype.shouldHideInputAdornersForRevealOnHover = function (input, eventType) {\r\n // show/hide input adorners (date picker, time picker, select dropdown picker) with inputStyle RevealOnHover\r\n // 1. intial render of card: hide input adorners\r\n // 2. mouse hover on the card: show input adorners\r\n // 3. mouse hover outside the card: hide input adorners unless input is still in focus state\r\n // 4. input loses focus: hide the input adorners unless mouse is still hovering on the card\r\n // check if input still has the focus\r\n var isInputInFocus = input === document.activeElement;\r\n // check if mouse is still on the card\r\n var inputHoverClassName = this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onhover\");\r\n var isMouseOverCard = input.classList.contains(inputHoverClassName);\r\n var hideInputAdorners = (eventType === InputEventType.InitialRender) ||\r\n (eventType === InputEventType.FocusLeave && !isMouseOverCard) ||\r\n (eventType === InputEventType.MouseLeaveOnCard && !isInputInFocus);\r\n return hideInputAdorners;\r\n };\r\n Input.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle ||\r\n !this._renderedInputControlElement ||\r\n this.inputStyle !== Enums.InputStyle.RevealOnHover) {\r\n return;\r\n }\r\n if (eventType === InputEventType.InitialRender) {\r\n // on initial render, we will show input fields as read only view\r\n this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onrender\"));\r\n }\r\n else if (eventType === InputEventType.MouseEnterOnCard) {\r\n // on hover on the card, we will reveal the inputs by showing borders etc\r\n // ac-inputStyle-revealOnHover-onhover class is also used to identify if mouse is hovering on the card\r\n this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onhover\"));\r\n }\r\n else if (eventType === InputEventType.MouseLeaveOnCard) {\r\n this._renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onhover\"));\r\n }\r\n };\r\n Input.prototype.focus = function () {\r\n if (this._renderedInputControlElement) {\r\n this._renderedInputControlElement.focus();\r\n }\r\n };\r\n Input.prototype.isValid = function () {\r\n return true;\r\n };\r\n Input.prototype.isDirty = function () {\r\n return this.value !== this._oldValue;\r\n };\r\n Input.prototype.resetDirtyState = function () {\r\n this._oldValue = this.value;\r\n };\r\n Input.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.id) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.inputsMustHaveUniqueId());\r\n }\r\n if (this.isRequired) {\r\n if (!this.label) {\r\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveLabel, \"Required inputs should have a label\");\r\n }\r\n if (!this.errorMessage) {\r\n context.addFailure(this, Enums.ValidationEvent.RequiredInputsShouldHaveErrorMessage, \"Required inputs should have an error message\");\r\n }\r\n }\r\n };\r\n Input.prototype.validateValue = function () {\r\n this.resetValidationFailureCue();\r\n var result = this.isRequired ? this.isSet() && this.isValid() : this.isValid();\r\n if (!result && this.renderedInputControlElement) {\r\n if (this instanceof ChoiceSetInput && this.isDynamicTypeahead()) {\r\n this.showValidationFailureCue();\r\n }\r\n else {\r\n this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n }\r\n this.showValidationErrorMessage();\r\n }\r\n return result;\r\n };\r\n Input.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return [this];\r\n };\r\n Input.prototype.render = function () {\r\n var result = _super.prototype.render.call(this);\r\n this.resetDirtyState();\r\n return result;\r\n };\r\n Object.defineProperty(Input.prototype, \"isInteractive\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n Input.labelProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"label\", true);\r\n Input.isRequiredProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"isRequired\", false);\r\n Input.errorMessageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"errorMessage\", true);\r\n Input.inputStyleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"inputStyle\", Enums.InputStyle, Enums.InputStyle.Default, [\r\n { value: Enums.InputStyle.RevealOnHover },\r\n { value: Enums.InputStyle.Default }\r\n ]);\r\n Input.labelWidthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_6, \"labelWidth\", function (sender, prop, source, context) {\r\n var result = prop.defaultValue;\r\n var value = source[prop.name];\r\n var invalidLabelWidth = false;\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight);\r\n if (result.physicalSize < 0 || result.physicalSize > 100) {\r\n invalidLabelWidth = true;\r\n }\r\n }\r\n else if (typeof value === \"string\") {\r\n try {\r\n result = shared_1.SizeAndUnit.parse(value);\r\n }\r\n catch (e) {\r\n invalidLabelWidth = true;\r\n }\r\n }\r\n else {\r\n invalidLabelWidth = true;\r\n }\r\n if (invalidLabelWidth) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidInputLabelWidth());\r\n result = undefined;\r\n }\r\n return result;\r\n }, function (sender, property, target, value, context) {\r\n if (value instanceof shared_1.SizeAndUnit) {\r\n if (value.unit === Enums.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"labelWidth\", value.physicalSize + \"px\");\r\n }\r\n else {\r\n context.serializeNumber(target, \"labelWidth\", value.physicalSize);\r\n }\r\n }\r\n }, undefined);\r\n Input.labelPositionProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"labelPosition\", Enums.InputLabelPosition, Enums.InputLabelPosition.Above, [\r\n { value: Enums.InputLabelPosition.Inline },\r\n { value: Enums.InputLabelPosition.Above }\r\n ]);\r\n __decorate([\r\n (0, serialization_1.property)(Input.labelProperty)\r\n ], Input.prototype, \"label\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.isRequiredProperty)\r\n ], Input.prototype, \"isRequired\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.errorMessageProperty)\r\n ], Input.prototype, \"errorMessage\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.inputStyleProperty)\r\n ], Input.prototype, \"inputStyle\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.labelWidthProperty)\r\n ], Input.prototype, \"labelWidth\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Input.labelPositionProperty)\r\n ], Input.prototype, \"labelPosition\", void 0);\r\n return Input;\r\n}(CardElement));\r\nexports.Input = Input;\r\nvar TextInput = /** @class */ (function (_super) {\r\n __extends(TextInput, _super);\r\n function TextInput() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.isMultiline = false;\r\n _this.style = Enums.InputTextStyle.Text;\r\n return _this;\r\n }\r\n //#endregion\r\n TextInput.prototype.setupInput = function (input) {\r\n var _this = this;\r\n input.style.flex = \"1 1 auto\";\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.placeholder) {\r\n input.placeholder = this.placeholder;\r\n input.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n if (this.defaultValue) {\r\n input.value = this.defaultValue;\r\n }\r\n if (this.maxLength && this.maxLength > 0) {\r\n input.maxLength = this.maxLength;\r\n }\r\n input.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n input.onkeypress = function (e) {\r\n // Ctrl+Enter pressed\r\n if (e.ctrlKey &&\r\n e.code === \"Enter\" &&\r\n _this.inlineAction &&\r\n _this.inlineAction.isEffectivelyEnabled()) {\r\n _this.inlineAction.execute();\r\n }\r\n };\r\n };\r\n TextInput.prototype.internalRender = function () {\r\n var result;\r\n if (this.isMultiline && this.style !== Enums.InputTextStyle.Password) {\r\n result = document.createElement(\"textarea\");\r\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\", \"ac-multiline\");\r\n if (this.height === \"stretch\") {\r\n result.style.height = \"initial\";\r\n }\r\n }\r\n else {\r\n result = document.createElement(\"input\");\r\n result.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-textInput\");\r\n result.type = Enums.InputTextStyle[this.style].toLowerCase();\r\n }\r\n this.setupInput(result);\r\n return result;\r\n };\r\n TextInput.prototype.overrideInternalRender = function () {\r\n var _this = this;\r\n var renderedInputControl = _super.prototype.overrideInternalRender.call(this);\r\n if (this.inlineAction) {\r\n var button_1 = document.createElement(\"button\");\r\n button_1.className = this.hostConfig.makeCssClassName(this.inlineAction.isEffectivelyEnabled()\r\n ? \"ac-inlineActionButton\"\r\n : \"ac-inlineActionButton-disabled\");\r\n button_1.onclick = function (e) {\r\n if (_this.inlineAction && _this.inlineAction.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.inlineAction.execute();\r\n }\r\n };\r\n if (this.inlineAction.iconUrl) {\r\n button_1.classList.add(\"iconOnly\");\r\n var icon_1 = document.createElement(\"img\");\r\n icon_1.style.height = \"100%\";\r\n icon_1.setAttribute(\"role\", \"presentation\");\r\n // The below trick is necessary as a workaround in Chrome where the icon is initially displayed\r\n // at its native size then resized to 100% of the button's height. This cfreates an unpleasant\r\n // flicker. On top of that, Chrome's flex implementation fails to prperly re-layout the button\r\n // after the image has loaded and been gicven its final size. The below trick also fixes that.\r\n icon_1.style.display = \"none\";\r\n icon_1.onload = function () {\r\n icon_1.style.removeProperty(\"display\");\r\n };\r\n icon_1.onerror = function () {\r\n button_1.removeChild(icon_1);\r\n button_1.classList.remove(\"iconOnly\");\r\n button_1.classList.add(\"textOnly\");\r\n button_1.textContent =\r\n _this.inlineAction && _this.inlineAction.title\r\n ? _this.inlineAction.title\r\n : strings_1.Strings.defaults.inlineActionTitle();\r\n };\r\n icon_1.src = this.inlineAction.iconUrl;\r\n button_1.appendChild(icon_1);\r\n button_1.title = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : strings_1.Strings.defaults.inlineActionTitle();\r\n }\r\n else {\r\n button_1.classList.add(\"textOnly\");\r\n button_1.textContent = this.inlineAction.title\r\n ? this.inlineAction.title\r\n : strings_1.Strings.defaults.inlineActionTitle();\r\n }\r\n this.inlineAction.setupElementForAccessibility(button_1, true);\r\n button_1.style.marginLeft = \"8px\";\r\n this.inputControlContainerElement.appendChild(button_1);\r\n }\r\n return renderedInputControl;\r\n };\r\n TextInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n if (!(this.inlineAction || this.isMultiline)) {\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n }\r\n };\r\n TextInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Text\";\r\n };\r\n TextInput.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n if (this.inlineAction) {\r\n result.push(this.inlineAction);\r\n }\r\n return result;\r\n };\r\n TextInput.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result && this.inlineAction) {\r\n result = this.inlineAction.getActionById(id);\r\n }\r\n return result;\r\n };\r\n TextInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n TextInput.prototype.isValid = function () {\r\n if (!this.value) {\r\n return true;\r\n }\r\n if (this.regex) {\r\n return new RegExp(this.regex, \"g\").test(this.value);\r\n }\r\n return true;\r\n };\r\n Object.defineProperty(TextInput.prototype, \"value\", {\r\n get: function () {\r\n if (this.renderedInputControlElement) {\r\n if (this.isMultiline) {\r\n return this.renderedInputControlElement.value;\r\n }\r\n else {\r\n return this.renderedInputControlElement.value;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n TextInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n TextInput.maxLengthProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"maxLength\");\r\n TextInput.isMultilineProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiline\", false);\r\n TextInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n TextInput.styleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_0, \"style\", Enums.InputTextStyle, Enums.InputTextStyle.Text, [\r\n { value: Enums.InputTextStyle.Text },\r\n { value: Enums.InputTextStyle.Tel },\r\n { value: Enums.InputTextStyle.Url },\r\n { value: Enums.InputTextStyle.Email },\r\n { value: Enums.InputTextStyle.Password, targetVersion: serialization_1.Versions.v1_5 }\r\n ]);\r\n TextInput.inlineActionProperty = new ActionProperty(serialization_1.Versions.v1_0, \"inlineAction\", [\r\n \"Action.ShowCard\"\r\n ]);\r\n TextInput.regexProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_3, \"regex\", true);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.valueProperty)\r\n ], TextInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.maxLengthProperty)\r\n ], TextInput.prototype, \"maxLength\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.isMultilineProperty)\r\n ], TextInput.prototype, \"isMultiline\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.placeholderProperty)\r\n ], TextInput.prototype, \"placeholder\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.styleProperty)\r\n ], TextInput.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.inlineActionProperty)\r\n ], TextInput.prototype, \"inlineAction\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TextInput.regexProperty)\r\n ], TextInput.prototype, \"regex\", void 0);\r\n return TextInput;\r\n}(Input));\r\nexports.TextInput = TextInput;\r\nvar ToggleInput = /** @class */ (function (_super) {\r\n __extends(ToggleInput, _super);\r\n function ToggleInput() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.valueOn = \"true\";\r\n _this.valueOff = \"false\";\r\n _this.wrap = false;\r\n return _this;\r\n }\r\n ToggleInput.prototype.updateInputControlAriaLabelledBy = function () {\r\n if (this._checkboxInputElement) {\r\n var joinedLabelIds = this.getAllLabelIds().join(\" \");\r\n if (this._checkboxInputLabelElement && this._checkboxInputLabelElement.id) {\r\n joinedLabelIds += \" \" + this._checkboxInputLabelElement.id;\r\n }\r\n if (joinedLabelIds) {\r\n this._checkboxInputElement.setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n }\r\n else {\r\n this._checkboxInputElement.removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n };\r\n ToggleInput.prototype.internalRender = function () {\r\n var _this = this;\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-toggleInput\");\r\n element.style.width = \"100%\";\r\n element.style.display = \"flex\";\r\n element.style.alignItems = \"center\";\r\n this._checkboxInputElement = document.createElement(\"input\");\r\n this._checkboxInputElement.id = Utils.generateUniqueId();\r\n this._checkboxInputElement.type = \"checkbox\";\r\n this._checkboxInputElement.style.display = \"inline-block\";\r\n this._checkboxInputElement.style.verticalAlign = \"middle\";\r\n this._checkboxInputElement.style.margin = \"0\";\r\n this._checkboxInputElement.style.flex = \"0 0 auto\";\r\n if (this.title) {\r\n this._checkboxInputElement.setAttribute(\"aria-label\", this.title);\r\n }\r\n if (this.isRequired) {\r\n this._checkboxInputElement.setAttribute(\"aria-required\", \"true\");\r\n }\r\n this._checkboxInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.defaultValue === this.valueOn) {\r\n this._checkboxInputElement.checked = true;\r\n }\r\n this._oldCheckboxValue = this._checkboxInputElement.checked;\r\n this._checkboxInputElement.onchange = function () {\r\n _this.valueChanged();\r\n };\r\n Utils.appendChild(element, this._checkboxInputElement);\r\n if (this.title || this.isDesignMode()) {\r\n var label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = this._checkboxInputElement.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = !this.title ? this.getJsonTypeName() : this.title;\r\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n this._checkboxInputLabelElement = label.render();\r\n if (this._checkboxInputLabelElement) {\r\n this._checkboxInputLabelElement.id = Utils.generateUniqueId();\r\n this._checkboxInputLabelElement.style.display = \"inline-block\";\r\n this._checkboxInputLabelElement.style.flex = \"1 1 auto\";\r\n this._checkboxInputLabelElement.style.marginLeft = \"6px\";\r\n this._checkboxInputLabelElement.style.verticalAlign = \"middle\";\r\n var spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n Utils.appendChild(element, spacerElement);\r\n Utils.appendChild(element, this._checkboxInputLabelElement);\r\n }\r\n }\r\n return element;\r\n };\r\n Object.defineProperty(ToggleInput.prototype, \"isNullable\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ToggleInput.prototype.updateVisualState = function (eventType) {\r\n };\r\n ToggleInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Toggle\";\r\n };\r\n ToggleInput.prototype.focus = function () {\r\n if (this._checkboxInputElement) {\r\n this._checkboxInputElement.focus();\r\n }\r\n };\r\n ToggleInput.prototype.isSet = function () {\r\n if (this.isRequired) {\r\n return this.value === this.valueOn;\r\n }\r\n return this.value ? true : false;\r\n };\r\n ToggleInput.prototype.isDirty = function () {\r\n return this._checkboxInputElement\r\n ? this._checkboxInputElement.checked !== this._oldCheckboxValue\r\n : false;\r\n };\r\n Object.defineProperty(ToggleInput.prototype, \"value\", {\r\n get: function () {\r\n if (this._checkboxInputElement) {\r\n return this._checkboxInputElement.checked ? this.valueOn : this.valueOff;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ToggleInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n ToggleInput.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n ToggleInput.valueOnProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOn\", true, undefined, \"true\", function (sender) {\r\n return \"true\";\r\n });\r\n ToggleInput.valueOffProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"valueOff\", true, undefined, \"false\", function (sender) {\r\n return \"false\";\r\n });\r\n ToggleInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.valueProperty)\r\n ], ToggleInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.titleProperty)\r\n ], ToggleInput.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.valueOnProperty)\r\n ], ToggleInput.prototype, \"valueOn\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.valueOffProperty)\r\n ], ToggleInput.prototype, \"valueOff\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ToggleInput.wrapProperty)\r\n ], ToggleInput.prototype, \"wrap\", void 0);\r\n return ToggleInput;\r\n}(Input));\r\nexports.ToggleInput = ToggleInput;\r\nvar Choice = /** @class */ (function (_super) {\r\n __extends(Choice, _super);\r\n function Choice(title, value) {\r\n var _this = _super.call(this) || this;\r\n _this.title = title;\r\n _this.value = value;\r\n return _this;\r\n }\r\n //#endregion\r\n Choice.prototype.getSchemaKey = function () {\r\n return \"Choice\";\r\n };\r\n //#region Schema\r\n Choice.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n Choice.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(Choice.titleProperty)\r\n ], Choice.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Choice.valueProperty)\r\n ], Choice.prototype, \"value\", void 0);\r\n return Choice;\r\n}(serialization_1.SerializableObject));\r\nexports.Choice = Choice;\r\n/**\r\n * DataQuery class is declared later in the file and derives from subsequent base classes\r\n * Hence, it cannot be used in ChoiceSetInput.\r\n * Refactor is needed to separate elements and actions in separate files.\r\n */\r\nvar ChoiceSetInputDataQuery = /** @class */ (function (_super) {\r\n __extends(ChoiceSetInputDataQuery, _super);\r\n function ChoiceSetInputDataQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n ChoiceSetInputDataQuery.prototype.getSchemaKey = function () {\r\n return \"choices.data\";\r\n };\r\n //#region Schema\r\n ChoiceSetInputDataQuery.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"type\", true, new RegExp(\"^Data.Query$\"));\r\n ChoiceSetInputDataQuery.datasetProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"dataset\");\r\n ChoiceSetInputDataQuery.countProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"count\");\r\n ChoiceSetInputDataQuery.skipProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"skip\");\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.typeProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"type\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.datasetProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"dataset\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.countProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"count\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInputDataQuery.skipProperty)\r\n ], ChoiceSetInputDataQuery.prototype, \"skip\", void 0);\r\n return ChoiceSetInputDataQuery;\r\n}(serialization_1.SerializableObject));\r\nexports.ChoiceSetInputDataQuery = ChoiceSetInputDataQuery;\r\nvar ChoiceSetInput = /** @class */ (function (_super) {\r\n __extends(ChoiceSetInput, _super);\r\n function ChoiceSetInput() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.isMultiSelect = false;\r\n _this.wrap = false;\r\n _this.choices = [];\r\n return _this;\r\n }\r\n Object.defineProperty(ChoiceSetInput.prototype, \"isCompact\", {\r\n get: function () {\r\n return !this.style || this.style === \"compact\";\r\n },\r\n set: function (value) {\r\n this.style = value ? undefined : \"expanded\";\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ChoiceSetInput.getUniqueCategoryName = function () {\r\n var uniqueCategoryName = \"__ac-category\" + ChoiceSetInput._uniqueCategoryCounter;\r\n ChoiceSetInput._uniqueCategoryCounter++;\r\n return uniqueCategoryName;\r\n };\r\n ChoiceSetInput.prototype.isDynamicTypeahead = function () {\r\n return (this.hostConfig.inputs.allowDynamicallyFilteredChoiceSet &&\r\n !!this.choicesData &&\r\n !!this.choicesData.dataset &&\r\n this.choicesData.type === \"Data.Query\");\r\n };\r\n ChoiceSetInput.prototype.getFilterForDynamicSearch = function () {\r\n var _a;\r\n return (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;\r\n };\r\n ChoiceSetInput.prototype.getDropdownElement = function () {\r\n var _a;\r\n return (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.dropdown;\r\n };\r\n ChoiceSetInput.prototype.renderChoices = function (filter, fetchedChoices) {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.processResponse(filter, fetchedChoices);\r\n };\r\n ChoiceSetInput.prototype.showLoadingIndicator = function () {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.showLoadingIndicator();\r\n };\r\n ChoiceSetInput.prototype.removeLoadingIndicator = function () {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.removeLoadingIndicator();\r\n };\r\n ChoiceSetInput.prototype.showErrorIndicator = function (filter, error) {\r\n var _a;\r\n (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.showErrorIndicator(filter, error);\r\n };\r\n ChoiceSetInput.prototype.showValidationFailureCue = function () {\r\n var _a;\r\n (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.classList.add(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n };\r\n ChoiceSetInput.prototype.removeValidationFailureCue = function () {\r\n var _a;\r\n (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.classList.remove(this.hostConfig.makeCssClassName(\"ac-input-validation-failed\"));\r\n };\r\n ChoiceSetInput.prototype.createPlaceholderOptionWhenValueDoesNotExist = function () {\r\n if (!this.value) {\r\n var placeholderOption = document.createElement(\"option\");\r\n placeholderOption.selected = true;\r\n placeholderOption.disabled = true;\r\n placeholderOption.hidden = true;\r\n placeholderOption.value = \"\";\r\n if (this.placeholder) {\r\n placeholderOption.text = this.placeholder;\r\n }\r\n return placeholderOption;\r\n }\r\n return undefined;\r\n };\r\n // Make sure `aria-current` is applied to the currently-selected item\r\n ChoiceSetInput.prototype.internalApplyAriaCurrent = function () {\r\n if (this._selectElement) {\r\n var options = this._selectElement.options;\r\n if (options) {\r\n for (var _i = 0, _a = Array.from(options); _i < _a.length; _i++) {\r\n var option = _a[_i];\r\n if (option.selected) {\r\n option.setAttribute(\"aria-current\", \"true\");\r\n }\r\n else {\r\n option.removeAttribute(\"aria-current\");\r\n }\r\n }\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.renderCompoundInput = function (cssClassName, type, defaultValues) {\r\n var _this = this;\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-input\", cssClassName);\r\n element.style.width = \"100%\";\r\n element.tabIndex = this.isDesignMode() ? -1 : 0;\r\n this._toggleInputs = [];\r\n this._labels = [];\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n var input = document.createElement(\"input\");\r\n input.id = Utils.generateUniqueId();\r\n input.type = type;\r\n input.style.margin = \"0\";\r\n input.style.display = \"inline-block\";\r\n input.style.verticalAlign = \"middle\";\r\n input.style.flex = \"0 0 auto\";\r\n input.name = this.id ? this.id : this._uniqueCategoryName;\r\n if (this.isRequired) {\r\n input.setAttribute(\"aria-required\", \"true\");\r\n }\r\n input.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (choice.value) {\r\n input.value = choice.value;\r\n }\r\n if (choice.title) {\r\n input.setAttribute(\"aria-label\", choice.title);\r\n }\r\n if (defaultValues && choice.value) {\r\n if (defaultValues.indexOf(choice.value) >= 0) {\r\n input.checked = true;\r\n }\r\n }\r\n input.onchange = function () {\r\n _this.valueChanged();\r\n };\r\n this._toggleInputs.push(input);\r\n var compoundInput = document.createElement(\"div\");\r\n compoundInput.style.display = \"flex\";\r\n compoundInput.style.alignItems = \"center\";\r\n Utils.appendChild(compoundInput, input);\r\n var label = new TextBlock();\r\n label.setParent(this);\r\n label.forElementId = input.id;\r\n label.hostConfig = this.hostConfig;\r\n label.text = choice.title ? choice.title : \"Choice \" + this._toggleInputs.length;\r\n label.useMarkdown = shared_1.GlobalSettings.useMarkdownInRadioButtonAndCheckbox;\r\n label.wrap = this.wrap;\r\n var labelElement = label.render();\r\n this._labels.push(labelElement);\r\n if (labelElement) {\r\n labelElement.id = Utils.generateUniqueId();\r\n labelElement.style.display = \"inline-block\";\r\n labelElement.style.flex = \"1 1 auto\";\r\n labelElement.style.marginLeft = \"6px\";\r\n labelElement.style.verticalAlign = \"middle\";\r\n var spacerElement = document.createElement(\"div\");\r\n spacerElement.style.width = \"6px\";\r\n Utils.appendChild(compoundInput, spacerElement);\r\n Utils.appendChild(compoundInput, labelElement);\r\n }\r\n Utils.appendChild(element, compoundInput);\r\n }\r\n return element;\r\n };\r\n ChoiceSetInput.prototype.updateInputControlAriaLabelledBy = function () {\r\n if ((this.isMultiSelect || this.style === \"expanded\") &&\r\n this._toggleInputs &&\r\n this._labels) {\r\n var labelIds = this.getAllLabelIds();\r\n for (var i = 0; i < this._toggleInputs.length; i++) {\r\n var joinedLabelIds = labelIds.join(\" \");\r\n var label = this._labels[i];\r\n if (label && label.id) {\r\n joinedLabelIds += \" \" + label.id;\r\n }\r\n if (joinedLabelIds) {\r\n this._toggleInputs[i].setAttribute(\"aria-labelledby\", joinedLabelIds);\r\n }\r\n else {\r\n this._toggleInputs[i].removeAttribute(\"aria-labelledby\");\r\n }\r\n }\r\n }\r\n else {\r\n _super.prototype.updateInputControlAriaLabelledBy.call(this);\r\n }\r\n };\r\n ChoiceSetInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._uniqueCategoryName = ChoiceSetInput.getUniqueCategoryName();\r\n if (this.isDynamicTypeahead()) {\r\n var filteredChoiceSet_1 = new FilteredChoiceSet(ChoiceSetInput._uniqueCategoryCounter, this.choices, this.hostConfig);\r\n filteredChoiceSet_1.render();\r\n if (filteredChoiceSet_1.textInput) {\r\n this._textInput = filteredChoiceSet_1.textInput;\r\n if (this.defaultValue) {\r\n this._textInput.value = this.defaultValue;\r\n }\r\n if (this.placeholder && !this._textInput.value) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._textInput.tabIndex = this.isDesignMode() ? -1 : 0;\r\n var onInputChangeEventHandler = Utils.debounce(function () {\r\n filteredChoiceSet_1.processChoices();\r\n _this.valueChanged();\r\n if (_this._textInput) {\r\n // Remove aria-label when value is not empty so narration software doesn't\r\n // read the placeholder\r\n if (_this.value) {\r\n _this._textInput.removeAttribute(\"placeholder\");\r\n _this._textInput.removeAttribute(\"aria-label\");\r\n }\r\n else if (_this.placeholder) {\r\n _this._textInput.placeholder = _this.placeholder;\r\n _this._textInput.setAttribute(\"aria-label\", _this.placeholder);\r\n }\r\n }\r\n }, this.hostConfig.inputs.debounceTimeInMilliSeconds);\r\n this._textInput.onclick = onInputChangeEventHandler;\r\n this._textInput.oninput = onInputChangeEventHandler;\r\n }\r\n filteredChoiceSet_1.parent = this;\r\n this._filteredChoiceSet = filteredChoiceSet_1;\r\n return filteredChoiceSet_1.renderedElement;\r\n }\r\n else if (this.isMultiSelect) {\r\n // Render as a list of toggle inputs\r\n return this.renderCompoundInput(\"ac-choiceSetInput-multiSelect\", \"checkbox\", this.defaultValue\r\n ? this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator)\r\n : undefined);\r\n }\r\n else {\r\n if (this.style === \"expanded\") {\r\n // Render as a series of radio buttons\r\n return this.renderCompoundInput(\"ac-choiceSetInput-expanded\", \"radio\", this.defaultValue ? [this.defaultValue] : undefined);\r\n }\r\n else if (this.style === \"filtered\") {\r\n // Render as a text input coupled with a datalist\r\n var inputContainer = document.createElement(\"div\");\r\n inputContainer.style.width = \"100%\";\r\n this._textInput = document.createElement(\"input\");\r\n this._textInput.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-filtered\");\r\n this._textInput.type = \"text\";\r\n this._textInput.style.width = \"100%\";\r\n this._textInput.oninput = function () {\r\n _this.valueChanged();\r\n if (_this._textInput) {\r\n // Remove aria-label when value is not empty so narration software doesn't\r\n // read the placeholder\r\n if (_this.value) {\r\n _this._textInput.removeAttribute(\"placeholder\");\r\n _this._textInput.removeAttribute(\"aria-label\");\r\n }\r\n else if (_this.placeholder) {\r\n _this._textInput.placeholder = _this.placeholder;\r\n _this._textInput.setAttribute(\"aria-label\", _this.placeholder);\r\n }\r\n }\r\n };\r\n if (this.defaultValue) {\r\n this._textInput.value = this.defaultValue;\r\n }\r\n if (this.placeholder && !this._textInput.value) {\r\n this._textInput.placeholder = this.placeholder;\r\n this._textInput.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._textInput.tabIndex = this.isDesignMode() ? -1 : 0;\r\n var dataList = document.createElement(\"datalist\");\r\n dataList.id = Utils.generateUniqueId();\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n var option = document.createElement(\"option\");\r\n // To fix https://stackoverflow.com/questions/29882361/show-datalist-labels-but-submit-the-actual-value\r\n // value is mapped to choice.title other than choice.value\r\n if (choice.title) {\r\n option.value = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n dataList.appendChild(option);\r\n }\r\n this._textInput.setAttribute(\"list\", dataList.id);\r\n inputContainer.append(this._textInput, dataList);\r\n return inputContainer;\r\n }\r\n else {\r\n // Render as a combo box\r\n this._selectElement = document.createElement(\"select\");\r\n this._selectElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-multichoiceInput\", \"ac-choiceSetInput-compact\");\r\n this._selectElement.style.width = \"100%\";\r\n this._selectElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n var placeholderOption = this.createPlaceholderOptionWhenValueDoesNotExist();\r\n Utils.appendChild(this._selectElement, placeholderOption);\r\n for (var _b = 0, _c = this.choices; _b < _c.length; _b++) {\r\n var choice = _c[_b];\r\n var option = document.createElement(\"option\");\r\n option.value = choice.value;\r\n if (choice.title) {\r\n option.text = choice.title;\r\n option.setAttribute(\"aria-label\", choice.title);\r\n }\r\n option.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (choice.value === this.defaultValue) {\r\n option.selected = true;\r\n }\r\n Utils.appendChild(this._selectElement, option);\r\n }\r\n this._selectElement.onchange = function () {\r\n _this.internalApplyAriaCurrent();\r\n _this.valueChanged();\r\n };\r\n this.internalApplyAriaCurrent();\r\n return this._selectElement;\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n if (!this.isMultiSelect && this.isCompact) {\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n if (this._selectElement && this.inputStyle === Enums.InputStyle.RevealOnHover) {\r\n var hideDropDownPicker = this.shouldHideInputAdornersForRevealOnHover(this._selectElement, eventType);\r\n if (hideDropDownPicker) {\r\n this._selectElement.style.appearance = \"none\";\r\n this._selectElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n else {\r\n this._selectElement.style.appearance = \"auto\";\r\n this._selectElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.getJsonTypeName = function () {\r\n return \"Input.ChoiceSet\";\r\n };\r\n ChoiceSetInput.prototype.focus = function () {\r\n if (this._toggleInputs && (this.isMultiSelect || this.style === \"expanded\")) {\r\n if (this._toggleInputs.length > 0) {\r\n this._toggleInputs[0].focus();\r\n }\r\n }\r\n else if (this._textInput) {\r\n this._textInput.focus();\r\n }\r\n else {\r\n _super.prototype.focus.call(this);\r\n }\r\n };\r\n ChoiceSetInput.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (this.choices.length === 0) {\r\n context.addFailure(this, Enums.ValidationEvent.CollectionCantBeEmpty, strings_1.Strings.errors.choiceSetMustHaveAtLeastOneChoice());\r\n }\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n if (!choice.title || !choice.value) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.choiceSetChoicesMustHaveTitleAndValue());\r\n }\r\n }\r\n };\r\n ChoiceSetInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n ChoiceSetInput.prototype.isValid = function () {\r\n if (this._textInput) {\r\n if (this.value === \"\" || this.value === this.placeholder) {\r\n return true;\r\n }\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n if (this.value === choice.value) {\r\n return true;\r\n }\r\n }\r\n if (this.dynamicChoices) {\r\n for (var _b = 0, _c = this.dynamicChoices; _b < _c.length; _b++) {\r\n var choice = _c[_b];\r\n if (this.value === choice) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n return _super.prototype.isValid.call(this);\r\n };\r\n Object.defineProperty(ChoiceSetInput.prototype, \"value\", {\r\n get: function () {\r\n if (!this.isMultiSelect) {\r\n if (this._selectElement) {\r\n return this._selectElement.selectedIndex > 0\r\n ? this._selectElement.value\r\n : undefined;\r\n }\r\n else if (this._textInput) {\r\n for (var _i = 0, _a = this.choices; _i < _a.length; _i++) {\r\n var choice = _a[_i];\r\n if (choice.title && this._textInput.value === choice.title) {\r\n return choice.value;\r\n }\r\n }\r\n return this._textInput.value;\r\n }\r\n else if (this._toggleInputs && this._toggleInputs.length > 0) {\r\n for (var _b = 0, _c = this._toggleInputs; _b < _c.length; _b++) {\r\n var toggleInput = _c[_b];\r\n if (toggleInput.checked) {\r\n return toggleInput.value;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n else {\r\n if (!this._toggleInputs || this._toggleInputs.length === 0) {\r\n return undefined;\r\n }\r\n var result = \"\";\r\n for (var _d = 0, _f = this._toggleInputs; _d < _f.length; _d++) {\r\n var toggleInput = _f[_d];\r\n if (toggleInput.checked) {\r\n if (result !== \"\") {\r\n result += this.hostConfig.choiceSetInputValueSeparator;\r\n }\r\n result += toggleInput.value;\r\n }\r\n }\r\n return result ? result : undefined;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ChoiceSetInput.prototype, \"dynamicChoices\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._filteredChoiceSet) === null || _a === void 0 ? void 0 : _a.dynamicChoices;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ChoiceSetInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n ChoiceSetInput.choicesProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"choices\", Choice);\r\n ChoiceSetInput.choicesDataProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_6, \"choices.data\", ChoiceSetInputDataQuery);\r\n ChoiceSetInput.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_0, \"style\", [\r\n { value: \"compact\" },\r\n { value: \"expanded\" },\r\n { value: \"filtered\", targetVersion: serialization_1.Versions.v1_5 }\r\n ], \"compact\");\r\n ChoiceSetInput.isMultiSelectProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"isMultiSelect\", false);\r\n ChoiceSetInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n ChoiceSetInput.wrapProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"wrap\", false);\r\n //#endregion\r\n ChoiceSetInput._uniqueCategoryCounter = 0;\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.valueProperty)\r\n ], ChoiceSetInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.styleProperty)\r\n ], ChoiceSetInput.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.isMultiSelectProperty)\r\n ], ChoiceSetInput.prototype, \"isMultiSelect\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.placeholderProperty)\r\n ], ChoiceSetInput.prototype, \"placeholder\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.wrapProperty)\r\n ], ChoiceSetInput.prototype, \"wrap\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.choicesProperty)\r\n ], ChoiceSetInput.prototype, \"choices\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ChoiceSetInput.choicesDataProperty)\r\n ], ChoiceSetInput.prototype, \"choicesData\", void 0);\r\n return ChoiceSetInput;\r\n}(Input));\r\nexports.ChoiceSetInput = ChoiceSetInput;\r\nvar FilteredChoiceSet = /** @class */ (function () {\r\n function FilteredChoiceSet(choiceSetId, choices, hostConfig) {\r\n this._choiceSetId = choiceSetId;\r\n this._choices = choices;\r\n this._dynamicChoices = [];\r\n this._visibleChoiceCount = 0;\r\n this._highlightedChoiceId = -1;\r\n this._hostConfig = hostConfig;\r\n }\r\n FilteredChoiceSet.prototype.render = function () {\r\n var _this = this;\r\n var choiceSetContainer = document.createElement(\"div\");\r\n choiceSetContainer.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-filtered-container\");\r\n this._textInput = document.createElement(\"input\");\r\n this._textInput.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-filtered-textbox\");\r\n this._textInput.type = \"text\";\r\n this._textInput.onkeydown = function (event) {\r\n if (event.key === \"ArrowDown\") {\r\n event.preventDefault();\r\n _this.highlightChoice(_this._highlightedChoiceId + 1);\r\n }\r\n else if (event.key === \"ArrowUp\") {\r\n event.preventDefault();\r\n _this.highlightChoice(_this._highlightedChoiceId - 1);\r\n }\r\n else if (event.key === \"Enter\") {\r\n var choice = document.getElementById(\"ac-choiceSetInput-\".concat(_this._choiceSetId, \"-choice-\").concat(_this._highlightedChoiceId));\r\n choice === null || choice === void 0 ? void 0 : choice.click();\r\n }\r\n };\r\n this._dropdown = document.createElement(\"div\");\r\n this._dropdown.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-filtered-dropdown\");\r\n choiceSetContainer.append(this._textInput, this._dropdown);\r\n this._renderedElement = choiceSetContainer;\r\n };\r\n FilteredChoiceSet.prototype.createChoice = function (value, filter, id) {\r\n var _this = this;\r\n var choice = document.createElement(\"span\");\r\n choice.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-choice\");\r\n choice.id = \"ac-choiceSetInput-\".concat(this._choiceSetId, \"-choice-\").concat(id);\r\n choice.innerHTML = value.replace(filter, \"\".concat(filter, \"\"));\r\n choice.tabIndex = -1;\r\n choice.onclick = function () {\r\n choice.classList.remove(_this.hostConfig.makeCssClassName(\"ac-choiceSetInput-choice-highlighted\"));\r\n _this._highlightedChoiceId = -1;\r\n if (_this._textInput) {\r\n _this._textInput.value = choice.innerText;\r\n _this._textInput.focus();\r\n }\r\n if (_this._dropdown) {\r\n _this._dropdown.classList.remove(_this.hostConfig.makeCssClassName(\"ac-choiceSetInput-filtered-dropdown-open\"));\r\n }\r\n };\r\n choice.onmousemove = function () {\r\n if (_this._highlightedChoiceId !== id) {\r\n _this.highlightChoice(id, false);\r\n }\r\n };\r\n return choice;\r\n };\r\n FilteredChoiceSet.prototype.highlightChoice = function (id, scrollIntoView) {\r\n if (scrollIntoView === void 0) { scrollIntoView = true; }\r\n if (this._visibleChoiceCount > 0) {\r\n var currentHighlightedChoice = document.getElementById(\"ac-choiceSetInput-\".concat(this._choiceSetId, \"-choice-\").concat(this._highlightedChoiceId));\r\n var nextHighlightedChoice = document.getElementById(\"ac-choiceSetInput-\".concat(this._choiceSetId, \"-choice-\").concat(id));\r\n if (nextHighlightedChoice) {\r\n currentHighlightedChoice === null || currentHighlightedChoice === void 0 ? void 0 : currentHighlightedChoice.classList.remove(this.hostConfig.makeCssClassName(\"ac-choiceSetInput-choice-highlighted\"));\r\n nextHighlightedChoice.classList.add(this.hostConfig.makeCssClassName(\"ac-choiceSetInput-choice-highlighted\"));\r\n if (scrollIntoView) {\r\n nextHighlightedChoice.scrollIntoView();\r\n }\r\n this._highlightedChoiceId = id;\r\n }\r\n else if (currentHighlightedChoice && this._highlightedChoiceId !== 0) {\r\n this.highlightChoice(0);\r\n }\r\n else {\r\n this.highlightChoice(this._visibleChoiceCount - 1);\r\n }\r\n }\r\n };\r\n FilteredChoiceSet.prototype.filterChoices = function () {\r\n var _a, _b;\r\n var filter = ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value.toLowerCase().trim()) || \"\";\r\n var choices = __spreadArray(__spreadArray([], this._choices, true), this._dynamicChoices, true);\r\n for (var _i = 0, choices_1 = choices; _i < choices_1.length; _i++) {\r\n var choice = choices_1[_i];\r\n if (choice.title) {\r\n var matchIndex = choice.title.toLowerCase().indexOf(filter);\r\n if (matchIndex !== -1) {\r\n var matchedText = choice.title.substring(matchIndex, matchIndex + filter.length);\r\n var choiceContainer = this.createChoice(choice.title, matchedText, this._visibleChoiceCount++);\r\n (_b = this._dropdown) === null || _b === void 0 ? void 0 : _b.appendChild(choiceContainer);\r\n }\r\n }\r\n }\r\n };\r\n FilteredChoiceSet.prototype.getStatusIndicator = function (error) {\r\n if (error) {\r\n if (!this._errorIndicator) {\r\n var errorIndicator = document.createElement(\"div\");\r\n errorIndicator.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-statusIndicator\", \"ac-choiceSetInput-errorIndicator\");\r\n this._errorIndicator = errorIndicator;\r\n }\r\n this._errorIndicator.innerText = error;\r\n return this._errorIndicator;\r\n }\r\n else {\r\n if (!this._loadingIndicator) {\r\n var loadingIndicator = document.createElement(\"div\");\r\n loadingIndicator.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-choiceSetInput-statusIndicator\");\r\n this._loadingIndicator = loadingIndicator;\r\n }\r\n this._loadingIndicator.innerText =\r\n this._visibleChoiceCount === 0 ? \"Loading...\" : \"Loading more...\";\r\n return this._loadingIndicator;\r\n }\r\n };\r\n FilteredChoiceSet.prototype.resetDropdown = function () {\r\n if (this._dropdown) {\r\n Utils.clearElementChildren(this._dropdown);\r\n this._visibleChoiceCount = 0;\r\n this._highlightedChoiceId = -1;\r\n }\r\n };\r\n FilteredChoiceSet.prototype.showDropdown = function () {\r\n var _a;\r\n if ((_a = this._dropdown) === null || _a === void 0 ? void 0 : _a.hasChildNodes()) {\r\n this._dropdown.classList.add(this.hostConfig.makeCssClassName(\"ac-choiceSetInput-filtered-dropdown-open\"));\r\n }\r\n };\r\n FilteredChoiceSet.prototype.processChoices = function () {\r\n this.resetDropdown();\r\n this.filterChoices();\r\n this.showDropdown();\r\n };\r\n FilteredChoiceSet.prototype.processResponse = function (filter, fetchedChoices) {\r\n var _a;\r\n if (filter === ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)) {\r\n this.resetDropdown();\r\n this._dynamicChoices = fetchedChoices;\r\n this.filterChoices();\r\n if (this._visibleChoiceCount === 0) {\r\n this.showErrorIndicator(filter, \"No results found\");\r\n }\r\n }\r\n };\r\n FilteredChoiceSet.prototype.showLoadingIndicator = function () {\r\n var _a;\r\n var loadingIndicator = this.getStatusIndicator();\r\n (_a = this._dropdown) === null || _a === void 0 ? void 0 : _a.appendChild(loadingIndicator);\r\n this.showDropdown();\r\n };\r\n FilteredChoiceSet.prototype.removeLoadingIndicator = function () {\r\n var _a, _b;\r\n if (this._loadingIndicator && ((_a = this._dropdown) === null || _a === void 0 ? void 0 : _a.contains(this._loadingIndicator))) {\r\n (_b = this._dropdown) === null || _b === void 0 ? void 0 : _b.removeChild(this._loadingIndicator);\r\n }\r\n };\r\n FilteredChoiceSet.prototype.showErrorIndicator = function (filter, error) {\r\n var _a, _b;\r\n if (filter === ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)) {\r\n this.processChoices();\r\n var errorIndicator = this.getStatusIndicator(error);\r\n (_b = this._dropdown) === null || _b === void 0 ? void 0 : _b.appendChild(errorIndicator);\r\n errorIndicator.scrollIntoView();\r\n }\r\n };\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"dynamicChoices\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._dynamicChoices) === null || _a === void 0 ? void 0 : _a.map(function (choice) { return choice.title; });\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"hostConfig\", {\r\n get: function () {\r\n if (this._hostConfig) {\r\n return this._hostConfig;\r\n }\r\n else {\r\n if (this.parent) {\r\n return this.parent.hostConfig;\r\n }\r\n else {\r\n return host_config_1.defaultHostConfig;\r\n }\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n set: function (value) {\r\n this._parent = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"renderedElement\", {\r\n get: function () {\r\n return this._renderedElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"textInput\", {\r\n get: function () {\r\n return this._textInput;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(FilteredChoiceSet.prototype, \"dropdown\", {\r\n get: function () {\r\n return this._dropdown;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return FilteredChoiceSet;\r\n}());\r\nexports.FilteredChoiceSet = FilteredChoiceSet;\r\nvar NumberInput = /** @class */ (function (_super) {\r\n __extends(NumberInput, _super);\r\n function NumberInput() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n NumberInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._numberInputElement = document.createElement(\"input\");\r\n this._numberInputElement.setAttribute(\"type\", \"number\");\r\n if (this.min !== undefined) {\r\n this._numberInputElement.setAttribute(\"min\", this.min.toString());\r\n }\r\n if (this.max !== undefined) {\r\n this._numberInputElement.setAttribute(\"max\", this.max.toString());\r\n }\r\n this._numberInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-numberInput\");\r\n this._numberInputElement.style.width = \"100%\";\r\n this._numberInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.defaultValue !== undefined) {\r\n this._numberInputElement.valueAsNumber = this.defaultValue;\r\n }\r\n if (this.placeholder) {\r\n this._numberInputElement.placeholder = this.placeholder;\r\n this._numberInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._numberInputElement.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n return this._numberInputElement;\r\n };\r\n NumberInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Number\";\r\n };\r\n NumberInput.prototype.isSet = function () {\r\n return this.value !== undefined && !isNaN(this.value);\r\n };\r\n NumberInput.prototype.isValid = function () {\r\n if (this.value === undefined) {\r\n return !this.isRequired;\r\n }\r\n var result = true;\r\n if (this.min !== undefined) {\r\n result = result && this.value >= this.min;\r\n }\r\n if (this.max !== undefined) {\r\n result = result && this.value <= this.max;\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(NumberInput.prototype, \"value\", {\r\n get: function () {\r\n return this._numberInputElement ? this._numberInputElement.valueAsNumber : undefined;\r\n },\r\n set: function (value) {\r\n if (value && this._numberInputElement) {\r\n this._numberInputElement.value = value.toString();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n NumberInput.valueProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"value\");\r\n NumberInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n NumberInput.minProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"min\");\r\n NumberInput.maxProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_0, \"max\");\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.valueProperty)\r\n ], NumberInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.minProperty)\r\n ], NumberInput.prototype, \"min\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.maxProperty)\r\n ], NumberInput.prototype, \"max\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(NumberInput.placeholderProperty)\r\n ], NumberInput.prototype, \"placeholder\", void 0);\r\n return NumberInput;\r\n}(Input));\r\nexports.NumberInput = NumberInput;\r\nvar DateInput = /** @class */ (function (_super) {\r\n __extends(DateInput, _super);\r\n function DateInput() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DateInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._dateInputElement = document.createElement(\"input\");\r\n this._dateInputElement.setAttribute(\"type\", \"date\");\r\n if (this.min) {\r\n this._dateInputElement.setAttribute(\"min\", this.min);\r\n }\r\n if (this.max) {\r\n this._dateInputElement.setAttribute(\"max\", this.max);\r\n }\r\n if (this.placeholder) {\r\n this._dateInputElement.placeholder = this.placeholder;\r\n this._dateInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._dateInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n this._dateInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-dateInput\");\r\n this._dateInputElement.style.width = \"100%\";\r\n this._dateInputElement.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n if (this.defaultValue) {\r\n this._dateInputElement.value = this.defaultValue;\r\n }\r\n return this._dateInputElement;\r\n };\r\n DateInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n if (this._dateInputElement && this.inputStyle === Enums.InputStyle.RevealOnHover) {\r\n var hideDatePicker = this.shouldHideInputAdornersForRevealOnHover(this._dateInputElement, eventType);\r\n if (hideDatePicker) {\r\n this._dateInputElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n else {\r\n this._dateInputElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n updateInputAdornersVisibility(this._dateInputElement, hideDatePicker /*hide*/);\r\n }\r\n };\r\n DateInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Date\";\r\n };\r\n DateInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n DateInput.prototype.isValid = function () {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n var valueAsDate = new Date(this.value);\r\n var result = true;\r\n if (this.min) {\r\n var minDate = new Date(this.min);\r\n result = result && valueAsDate >= minDate;\r\n }\r\n if (this.max) {\r\n var maxDate = new Date(this.max);\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(DateInput.prototype, \"value\", {\r\n get: function () {\r\n return this._dateInputElement ? this._dateInputElement.value : undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n DateInput.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"value\");\r\n DateInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n DateInput.minProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"min\");\r\n DateInput.maxProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"max\");\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.valueProperty)\r\n ], DateInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.minProperty)\r\n ], DateInput.prototype, \"min\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.maxProperty)\r\n ], DateInput.prototype, \"max\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DateInput.placeholderProperty)\r\n ], DateInput.prototype, \"placeholder\", void 0);\r\n return DateInput;\r\n}(Input));\r\nexports.DateInput = DateInput;\r\nvar TimeProperty = /** @class */ (function (_super) {\r\n __extends(TimeProperty, _super);\r\n function TimeProperty(targetVersion, name) {\r\n var _this = _super.call(this, targetVersion, name, function (sender, prop, source, context) {\r\n var value = source[prop.name];\r\n if (typeof value === \"string\" && value && /^[0-9]{2}:[0-9]{2}$/.test(value)) {\r\n return value;\r\n }\r\n return undefined;\r\n }, function (sender, prop, target, value, context) {\r\n context.serializeValue(target, prop.name, value);\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n return _this;\r\n }\r\n return TimeProperty;\r\n}(serialization_1.CustomProperty));\r\nexports.TimeProperty = TimeProperty;\r\nvar TimeInput = /** @class */ (function (_super) {\r\n __extends(TimeInput, _super);\r\n function TimeInput() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeInput.convertTimeStringToDate = function (timeString) {\r\n return new Date(\"1973-09-04T\" + timeString + \":00Z\");\r\n };\r\n TimeInput.prototype.internalRender = function () {\r\n var _this = this;\r\n this._timeInputElement = document.createElement(\"input\");\r\n this._timeInputElement.setAttribute(\"type\", \"time\");\r\n if (this.min) {\r\n this._timeInputElement.setAttribute(\"min\", this.min);\r\n }\r\n if (this.max) {\r\n this._timeInputElement.setAttribute(\"max\", this.max);\r\n }\r\n this._timeInputElement.className = this.hostConfig.makeCssClassName(\"ac-input\", \"ac-timeInput\");\r\n this._timeInputElement.style.width = \"100%\";\r\n this._timeInputElement.oninput = function () {\r\n _this.valueChanged();\r\n };\r\n if (this.placeholder) {\r\n this._timeInputElement.placeholder = this.placeholder;\r\n this._timeInputElement.setAttribute(\"aria-label\", this.placeholder);\r\n }\r\n this._timeInputElement.tabIndex = this.isDesignMode() ? -1 : 0;\r\n if (this.defaultValue) {\r\n this._timeInputElement.value = this.defaultValue;\r\n }\r\n return this._timeInputElement;\r\n };\r\n TimeInput.prototype.updateVisualState = function (eventType) {\r\n if (!this.allowRevealOnHoverStyle) {\r\n return;\r\n }\r\n _super.prototype.updateVisualState.call(this, eventType);\r\n if (this._timeInputElement && this.inputStyle === Enums.InputStyle.RevealOnHover) {\r\n var hideTimePicker = this.shouldHideInputAdornersForRevealOnHover(this._timeInputElement, eventType);\r\n if (hideTimePicker) {\r\n this._timeInputElement.classList.remove(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n else {\r\n this._timeInputElement.classList.add(this.hostConfig.makeCssClassName(\"ac-inputStyle-revealOnHover-onfocus\"));\r\n }\r\n updateInputAdornersVisibility(this._timeInputElement, hideTimePicker /*hide*/);\r\n }\r\n };\r\n TimeInput.prototype.getJsonTypeName = function () {\r\n return \"Input.Time\";\r\n };\r\n TimeInput.prototype.isSet = function () {\r\n return this.value ? true : false;\r\n };\r\n TimeInput.prototype.isValid = function () {\r\n if (!this.value) {\r\n return !this.isRequired;\r\n }\r\n var valueAsDate = TimeInput.convertTimeStringToDate(this.value);\r\n var result = true;\r\n if (this.min) {\r\n var minDate = TimeInput.convertTimeStringToDate(this.min);\r\n result = result && valueAsDate >= minDate;\r\n }\r\n if (this.max) {\r\n var maxDate = TimeInput.convertTimeStringToDate(this.max);\r\n result = result && valueAsDate <= maxDate;\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(TimeInput.prototype, \"value\", {\r\n get: function () {\r\n return this._timeInputElement ? this._timeInputElement.value : undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n TimeInput.valueProperty = new TimeProperty(serialization_1.Versions.v1_0, \"value\");\r\n TimeInput.placeholderProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"placeholder\");\r\n TimeInput.minProperty = new TimeProperty(serialization_1.Versions.v1_0, \"min\");\r\n TimeInput.maxProperty = new TimeProperty(serialization_1.Versions.v1_0, \"max\");\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.valueProperty)\r\n ], TimeInput.prototype, \"defaultValue\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.minProperty)\r\n ], TimeInput.prototype, \"min\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.maxProperty)\r\n ], TimeInput.prototype, \"max\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TimeInput.placeholderProperty)\r\n ], TimeInput.prototype, \"placeholder\", void 0);\r\n return TimeInput;\r\n}(Input));\r\nexports.TimeInput = TimeInput;\r\nvar Action = /** @class */ (function (_super) {\r\n __extends(Action, _super);\r\n function Action() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.style = Enums.ActionStyle.Default;\r\n _this.mode = Enums.ActionMode.Primary;\r\n _this._state = 0 /* Normal */;\r\n _this._isFocusable = true;\r\n return _this;\r\n }\r\n //#endregion\r\n Action.prototype.renderButtonContent = function () {\r\n if (this.renderedElement) {\r\n // Cache hostConfig for perf\r\n var hostConfig = this.hostConfig;\r\n var titleElement = document.createElement(\"div\");\r\n titleElement.style.overflow = \"hidden\";\r\n titleElement.style.textOverflow = \"ellipsis\";\r\n if (!(hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle ||\r\n hostConfig.actions.allowTitleToWrap)) {\r\n titleElement.style.whiteSpace = \"nowrap\";\r\n }\r\n if (this.title) {\r\n titleElement.innerText = this.title;\r\n }\r\n if (!this.iconUrl) {\r\n this.renderedElement.classList.add(\"noIcon\");\r\n this.renderedElement.appendChild(titleElement);\r\n }\r\n else {\r\n var iconElement = document.createElement(\"img\");\r\n iconElement.src = this.iconUrl;\r\n iconElement.style.width = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.height = hostConfig.actions.iconSize + \"px\";\r\n iconElement.style.flex = \"0 0 auto\";\r\n if (hostConfig.actions.iconPlacement === Enums.ActionIconPlacement.AboveTitle) {\r\n this.renderedElement.classList.add(\"iconAbove\");\r\n this.renderedElement.style.flexDirection = \"column\";\r\n if (this.title) {\r\n iconElement.style.marginBottom = \"6px\";\r\n }\r\n }\r\n else {\r\n this.renderedElement.classList.add(\"iconLeft\");\r\n iconElement.style.maxHeight = \"100%\";\r\n if (this.title) {\r\n iconElement.style.marginRight = \"6px\";\r\n }\r\n }\r\n this.renderedElement.appendChild(iconElement);\r\n this.renderedElement.appendChild(titleElement);\r\n }\r\n }\r\n };\r\n Action.prototype.getParentContainer = function () {\r\n if (this.parent instanceof Container) {\r\n return this.parent;\r\n }\r\n return this.parent ? this.parent.getParentContainer() : undefined;\r\n };\r\n Action.prototype.isDesignMode = function () {\r\n var rootElement = this.getRootObject();\r\n return rootElement instanceof CardElement && rootElement.isDesignMode();\r\n };\r\n Action.prototype.updateCssClasses = function () {\r\n var _a, _b;\r\n if (this.parent && this.renderedElement) {\r\n var hostConfig = this.parent.hostConfig;\r\n this.renderedElement.className = hostConfig.makeCssClassName(this.isEffectivelyEnabled() ? \"ac-pushButton\" : \"ac-pushButton-disabled\");\r\n var parentContainer = this.getParentContainer();\r\n if (parentContainer) {\r\n var parentContainerStyle = parentContainer.getEffectiveStyle();\r\n if (parentContainerStyle) {\r\n this.renderedElement.classList.add(\"style-\" + parentContainerStyle);\r\n }\r\n }\r\n this.renderedElement.tabIndex = !this.isDesignMode() && this.isFocusable ? 0 : -1;\r\n switch (this._state) {\r\n case 0 /* Normal */:\r\n // No additional classes needed\r\n break;\r\n case 1 /* Expanded */:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"expanded\"));\r\n break;\r\n case 2 /* Subdued */:\r\n this.renderedElement.classList.add(hostConfig.makeCssClassName(\"subdued\"));\r\n break;\r\n }\r\n if (this.style && this.isEffectivelyEnabled()) {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n (_a = this.renderedElement.classList).add.apply(_a, hostConfig.makeCssClassNames(\"primary\", \"style-positive\"));\r\n }\r\n else {\r\n (_b = this.renderedElement.classList).add.apply(_b, hostConfig.makeCssClassNames(\"style-\" + this.style.toLowerCase()));\r\n }\r\n }\r\n }\r\n };\r\n Action.prototype.getDefaultSerializationContext = function () {\r\n return new SerializationContext();\r\n };\r\n Action.prototype.internalGetReferencedInputs = function () {\r\n return {};\r\n };\r\n Action.prototype.internalPrepareForExecution = function (_inputs) {\r\n // Do nothing in base implementation\r\n };\r\n Action.prototype.internalValidateInputs = function (referencedInputs) {\r\n var result = [];\r\n if (referencedInputs) {\r\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = referencedInputs[key];\r\n if (!input.validateValue()) {\r\n result.push(input);\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n Action.prototype.shouldSerialize = function (context) {\r\n return context.actionRegistry.findByName(this.getJsonTypeName()) !== undefined;\r\n };\r\n Action.prototype.raiseExecuteActionEvent = function () {\r\n if (this.onExecute) {\r\n this.onExecute(this);\r\n }\r\n raiseExecuteActionEvent(this);\r\n };\r\n Action.prototype.internalAfterExecute = function () {\r\n var rootObject = this.getRootObject();\r\n if (rootObject instanceof CardElement) {\r\n rootObject.updateActionsEnabledState();\r\n }\r\n };\r\n Action.prototype.getHref = function () {\r\n return \"\";\r\n };\r\n Action.prototype.getAriaRole = function () {\r\n var ariaRole = this.getAriaRoleFromEnum();\r\n return ariaRole !== null && ariaRole !== void 0 ? ariaRole : \"button\";\r\n };\r\n Action.prototype.getAriaRoleFromEnum = function () {\r\n switch (this.role) {\r\n case Enums.ActionRole.Button:\r\n return \"button\";\r\n case Enums.ActionRole.Link:\r\n return \"link\";\r\n case Enums.ActionRole.Menu:\r\n return \"menu\";\r\n case Enums.ActionRole.MenuItem:\r\n return \"menuitem\";\r\n case Enums.ActionRole.Tab:\r\n return \"tab\";\r\n default:\r\n return undefined;\r\n }\r\n };\r\n Action.prototype.setupElementForAccessibility = function (element, promoteTooltipToLabel) {\r\n if (promoteTooltipToLabel === void 0) { promoteTooltipToLabel = false; }\r\n element.tabIndex = this.isEffectivelyEnabled() && !this.isDesignMode() ? 0 : -1;\r\n element.setAttribute(\"role\", this.getAriaRole());\r\n if (element instanceof HTMLButtonElement) {\r\n element.disabled = !this.isEffectivelyEnabled();\r\n }\r\n if (!this.isEffectivelyEnabled()) {\r\n element.setAttribute(\"aria-disabled\", \"true\");\r\n }\r\n else {\r\n element.removeAttribute(\"aria-disabled\");\r\n element.classList.add(this.hostConfig.makeCssClassName(\"ac-selectable\"));\r\n }\r\n if (this.title) {\r\n element.setAttribute(\"aria-label\", this.title);\r\n element.title = this.title;\r\n }\r\n else {\r\n element.removeAttribute(\"aria-label\");\r\n element.removeAttribute(\"title\");\r\n }\r\n if (this.tooltip) {\r\n if (promoteTooltipToLabel && !this.title) {\r\n element.setAttribute(\"aria-label\", this.tooltip);\r\n }\r\n element.title = this.tooltip;\r\n }\r\n };\r\n Action.prototype.parse = function (source, context) {\r\n return _super.prototype.parse.call(this, source, context ? context : new SerializationContext());\r\n };\r\n Action.prototype.render = function () {\r\n var _this = this;\r\n var buttonElement = document.createElement(\"button\");\r\n buttonElement.type = \"button\";\r\n buttonElement.style.display = \"flex\";\r\n buttonElement.style.alignItems = \"center\";\r\n buttonElement.style.justifyContent = \"center\";\r\n buttonElement.onclick = function (e) {\r\n if (_this.isEffectivelyEnabled()) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n _this.execute();\r\n }\r\n };\r\n this._renderedElement = buttonElement;\r\n this.renderButtonContent();\r\n this.updateCssClasses();\r\n this.setupElementForAccessibility(buttonElement);\r\n };\r\n Action.prototype.execute = function () {\r\n if (this._actionCollection) {\r\n this._actionCollection.actionExecuted(this);\r\n }\r\n this.raiseExecuteActionEvent();\r\n this.internalAfterExecute();\r\n };\r\n Action.prototype.prepareForExecution = function () {\r\n var referencedInputs = this.getReferencedInputs();\r\n var invalidInputs = this.internalValidateInputs(referencedInputs);\r\n if (invalidInputs.length > 0) {\r\n invalidInputs[0].focus();\r\n return false;\r\n }\r\n this.internalPrepareForExecution(referencedInputs);\r\n return true;\r\n };\r\n Action.prototype.remove = function () {\r\n if (this._actionCollection) {\r\n return this._actionCollection.removeAction(this);\r\n }\r\n return false;\r\n };\r\n Action.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return [];\r\n };\r\n Action.prototype.getAllActions = function () {\r\n return [this];\r\n };\r\n Action.prototype.getResourceInformation = function () {\r\n return this.iconUrl ? [{ url: this.iconUrl, mimeType: \"image\" }] : [];\r\n };\r\n Action.prototype.getActionById = function (id) {\r\n return this.id === id ? this : undefined;\r\n };\r\n Action.prototype.getReferencedInputs = function () {\r\n return this.internalGetReferencedInputs();\r\n };\r\n /**\r\n * Validates the inputs associated with this action.\r\n *\r\n * @returns A list of inputs that failed validation, or an empty array if no input failed validation.\r\n */\r\n Action.prototype.validateInputs = function () {\r\n return this.internalValidateInputs(this.getReferencedInputs());\r\n };\r\n Action.prototype.updateEnabledState = function () {\r\n // Do nothing in base implementation\r\n };\r\n Action.prototype.isEffectivelyEnabled = function () {\r\n return this.isEnabled;\r\n };\r\n Object.defineProperty(Action.prototype, \"isPrimary\", {\r\n get: function () {\r\n return this.style === Enums.ActionStyle.Positive;\r\n },\r\n set: function (value) {\r\n if (value) {\r\n this.style = Enums.ActionStyle.Positive;\r\n }\r\n else {\r\n if (this.style === Enums.ActionStyle.Positive) {\r\n this.style = Enums.ActionStyle.Default;\r\n }\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"hostConfig\", {\r\n get: function () {\r\n return this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"state\", {\r\n get: function () {\r\n return this._state;\r\n },\r\n set: function (value) {\r\n if (this._state !== value) {\r\n this._state = value;\r\n this.updateCssClasses();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Action.prototype, \"isFocusable\", {\r\n get: function () {\r\n return this._isFocusable;\r\n },\r\n set: function (value) {\r\n if (this._isFocusable !== value) {\r\n this._isFocusable = value;\r\n this.updateCssClasses();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Action.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"title\");\r\n Action.iconUrlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_1, \"iconUrl\");\r\n Action.styleProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_2, \"style\", [\r\n { value: Enums.ActionStyle.Default },\r\n { value: Enums.ActionStyle.Positive },\r\n { value: Enums.ActionStyle.Destructive }\r\n ], Enums.ActionStyle.Default);\r\n Action.modeProperty = new serialization_1.ValueSetProperty(serialization_1.Versions.v1_5, \"mode\", [{ value: Enums.ActionMode.Primary }, { value: Enums.ActionMode.Secondary }], Enums.ActionMode.Primary);\r\n Action.tooltipProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_5, \"tooltip\");\r\n Action.isEnabledProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"isEnabled\", true);\r\n Action.roleProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"role\", Enums.ActionRole);\r\n __decorate([\r\n (0, serialization_1.property)(Action.titleProperty)\r\n ], Action.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.iconUrlProperty)\r\n ], Action.prototype, \"iconUrl\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.styleProperty)\r\n ], Action.prototype, \"style\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.modeProperty)\r\n ], Action.prototype, \"mode\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.tooltipProperty)\r\n ], Action.prototype, \"tooltip\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.isEnabledProperty)\r\n ], Action.prototype, \"isEnabled\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Action.roleProperty)\r\n ], Action.prototype, \"role\", void 0);\r\n return Action;\r\n}(card_object_1.CardObject));\r\nexports.Action = Action;\r\nvar SubmitActionBase = /** @class */ (function (_super) {\r\n __extends(SubmitActionBase, _super);\r\n function SubmitActionBase() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.disabledUnlessAssociatedInputsChange = false;\r\n //#endregion\r\n _this._isPrepared = false;\r\n _this._areReferencedInputsDirty = false;\r\n return _this;\r\n }\r\n SubmitActionBase.prototype.internalGetReferencedInputs = function () {\r\n var result = {};\r\n if (this.associatedInputs !== \"none\") {\r\n var current = this.parent;\r\n var inputs = [];\r\n while (current) {\r\n inputs.push.apply(inputs, current.getAllInputs(false));\r\n current = current.parent;\r\n }\r\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\r\n var input = inputs_1[_i];\r\n if (input.id) {\r\n result[input.id] = input;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n SubmitActionBase.prototype.internalPrepareForExecution = function (inputs) {\r\n if (this._originalData) {\r\n this._processedData = JSON.parse(JSON.stringify(this._originalData));\r\n }\r\n else {\r\n this._processedData = {};\r\n }\r\n if (this._processedData && inputs) {\r\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = inputs[key];\r\n if (input.id && input.isSet()) {\r\n this._processedData[input.id] =\r\n typeof input.value === \"string\" ? input.value : input.value.toString();\r\n }\r\n }\r\n }\r\n this._isPrepared = true;\r\n };\r\n SubmitActionBase.prototype.internalAfterExecute = function () {\r\n if (shared_1.GlobalSettings.resetInputsDirtyStateAfterActionExecution) {\r\n this.resetReferencedInputsDirtyState();\r\n }\r\n };\r\n SubmitActionBase.prototype.resetReferencedInputsDirtyState = function () {\r\n var referencedInputs = this.getReferencedInputs();\r\n this._areReferencedInputsDirty = false;\r\n if (referencedInputs) {\r\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = referencedInputs[key];\r\n input.resetDirtyState();\r\n }\r\n }\r\n };\r\n SubmitActionBase.prototype.updateEnabledState = function () {\r\n this._areReferencedInputsDirty = false;\r\n var referencedInputs = this.getReferencedInputs();\r\n if (referencedInputs) {\r\n for (var _i = 0, _a = Object.keys(referencedInputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n var input = referencedInputs[key];\r\n if (input.isDirty()) {\r\n this._areReferencedInputsDirty = true;\r\n break;\r\n }\r\n }\r\n }\r\n this.updateCssClasses();\r\n if (this._renderedElement) {\r\n this.setupElementForAccessibility(this._renderedElement);\r\n }\r\n };\r\n SubmitActionBase.prototype.isEffectivelyEnabled = function () {\r\n var result = _super.prototype.isEffectivelyEnabled.call(this);\r\n return this.disabledUnlessAssociatedInputsChange\r\n ? result && this._areReferencedInputsDirty\r\n : result;\r\n };\r\n Object.defineProperty(SubmitActionBase.prototype, \"data\", {\r\n get: function () {\r\n return this._isPrepared ? this._processedData : this._originalData;\r\n },\r\n set: function (value) {\r\n this._originalData = value;\r\n this._isPrepared = false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SubmitActionBase.dataProperty = new serialization_1.PropertyDefinition(serialization_1.Versions.v1_0, \"data\");\r\n SubmitActionBase.associatedInputsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_3, \"associatedInputs\", function (sender, prop, source, context) {\r\n var value = source[prop.name];\r\n if (value !== undefined && typeof value === \"string\") {\r\n return value.toLowerCase() === \"none\" ? \"none\" : \"auto\";\r\n }\r\n return undefined;\r\n }, function (sender, prop, target, value, context) {\r\n context.serializeValue(target, prop.name, value);\r\n });\r\n SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, \"disabledUnlessAssociatedInputsChange\", false);\r\n __decorate([\r\n (0, serialization_1.property)(SubmitActionBase.dataProperty)\r\n ], SubmitActionBase.prototype, \"_originalData\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(SubmitActionBase.associatedInputsProperty)\r\n ], SubmitActionBase.prototype, \"associatedInputs\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(SubmitActionBase.disabledUnlessAssociatedInputsChangeProperty)\r\n ], SubmitActionBase.prototype, \"disabledUnlessAssociatedInputsChange\", void 0);\r\n return SubmitActionBase;\r\n}(Action));\r\nexports.SubmitActionBase = SubmitActionBase;\r\nvar SubmitAction = /** @class */ (function (_super) {\r\n __extends(SubmitAction, _super);\r\n function SubmitAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SubmitAction.prototype.getJsonTypeName = function () {\r\n return SubmitAction.JsonTypeName;\r\n };\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n SubmitAction.JsonTypeName = \"Action.Submit\";\r\n return SubmitAction;\r\n}(SubmitActionBase));\r\nexports.SubmitAction = SubmitAction;\r\nvar UniversalAction = /** @class */ (function (_super) {\r\n __extends(UniversalAction, _super);\r\n function UniversalAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return UniversalAction;\r\n}(SubmitActionBase));\r\nexports.UniversalAction = UniversalAction;\r\nvar ExecuteAction = /** @class */ (function (_super) {\r\n __extends(ExecuteAction, _super);\r\n function ExecuteAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n ExecuteAction.prototype.getJsonTypeName = function () {\r\n return ExecuteAction.JsonTypeName;\r\n };\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n ExecuteAction.JsonTypeName = \"Action.Execute\";\r\n //#region Schema\r\n ExecuteAction.verbProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"verb\");\r\n __decorate([\r\n (0, serialization_1.property)(ExecuteAction.verbProperty)\r\n ], ExecuteAction.prototype, \"verb\", void 0);\r\n return ExecuteAction;\r\n}(UniversalAction));\r\nexports.ExecuteAction = ExecuteAction;\r\nvar DataQuery = /** @class */ (function (_super) {\r\n __extends(DataQuery, _super);\r\n function DataQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n DataQuery.prototype.getJsonTypeName = function () {\r\n return DataQuery.JsonTypeName;\r\n };\r\n Object.defineProperty(DataQuery.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n DataQuery.JsonTypeName = \"Data.Query\";\r\n //#region Schema\r\n DataQuery.datasetProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"dataset\");\r\n DataQuery.filterProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_6, \"filter\");\r\n DataQuery.countProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"count\");\r\n DataQuery.skipProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"skip\");\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.datasetProperty)\r\n ], DataQuery.prototype, \"dataset\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.filterProperty)\r\n ], DataQuery.prototype, \"filter\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.countProperty)\r\n ], DataQuery.prototype, \"count\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(DataQuery.skipProperty)\r\n ], DataQuery.prototype, \"skip\", void 0);\r\n return DataQuery;\r\n}(UniversalAction));\r\nexports.DataQuery = DataQuery;\r\nvar OpenUrlAction = /** @class */ (function (_super) {\r\n __extends(OpenUrlAction, _super);\r\n function OpenUrlAction() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n OpenUrlAction.prototype.getJsonTypeName = function () {\r\n return OpenUrlAction.JsonTypeName;\r\n };\r\n OpenUrlAction.prototype.getAriaRole = function () {\r\n var ariaRole = this.getAriaRoleFromEnum();\r\n return ariaRole !== null && ariaRole !== void 0 ? ariaRole : \"link\";\r\n };\r\n OpenUrlAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.url) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\r\n }\r\n };\r\n OpenUrlAction.prototype.getHref = function () {\r\n return this.url;\r\n };\r\n //#region Schema\r\n OpenUrlAction.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\r\n //#endregion\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n OpenUrlAction.JsonTypeName = \"Action.OpenUrl\";\r\n __decorate([\r\n (0, serialization_1.property)(OpenUrlAction.urlProperty)\r\n ], OpenUrlAction.prototype, \"url\", void 0);\r\n return OpenUrlAction;\r\n}(Action));\r\nexports.OpenUrlAction = OpenUrlAction;\r\nvar ToggleVisibilityAction = /** @class */ (function (_super) {\r\n __extends(ToggleVisibilityAction, _super);\r\n function ToggleVisibilityAction() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.targetElements = {};\r\n return _this;\r\n }\r\n ToggleVisibilityAction.prototype.updateAriaControlsAttribute = function () {\r\n // apply aria labels to make it clear which elements this action will toggle\r\n if (this.targetElements) {\r\n var elementIds = Object.keys(this.targetElements);\r\n if (this._renderedElement) {\r\n if (elementIds.length > 0) {\r\n this._renderedElement.setAttribute(\"aria-controls\", elementIds.join(\" \"));\r\n }\r\n else {\r\n this._renderedElement.removeAttribute(\"aria-controls\");\r\n }\r\n }\r\n }\r\n };\r\n ToggleVisibilityAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.targetElements) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"targetElements\"));\r\n }\r\n };\r\n ToggleVisibilityAction.prototype.getJsonTypeName = function () {\r\n return ToggleVisibilityAction.JsonTypeName;\r\n };\r\n ToggleVisibilityAction.prototype.render = function () {\r\n _super.prototype.render.call(this);\r\n this.updateAriaControlsAttribute();\r\n };\r\n ToggleVisibilityAction.prototype.execute = function () {\r\n _super.prototype.execute.call(this);\r\n if (this.parent) {\r\n for (var _i = 0, _a = Object.keys(this.targetElements); _i < _a.length; _i++) {\r\n var elementId = _a[_i];\r\n var targetElement = this.parent.getRootElement().getElementById(elementId);\r\n if (targetElement) {\r\n if (typeof this.targetElements[elementId] === \"boolean\") {\r\n targetElement.isVisible = this.targetElements[elementId];\r\n }\r\n else {\r\n targetElement.isVisible = !targetElement.isVisible;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n ToggleVisibilityAction.prototype.addTargetElement = function (elementId, isVisible) {\r\n if (isVisible === void 0) { isVisible = undefined; }\r\n this.targetElements[elementId] = isVisible;\r\n this.updateAriaControlsAttribute();\r\n };\r\n ToggleVisibilityAction.prototype.removeTargetElement = function (elementId) {\r\n delete this.targetElements[elementId];\r\n this.updateAriaControlsAttribute();\r\n };\r\n ToggleVisibilityAction.targetElementsProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_2, \"targetElements\", function (sender, prop, source, context) {\r\n var result = {};\r\n if (Array.isArray(source[prop.name])) {\r\n for (var _i = 0, _a = source[prop.name]; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (typeof item === \"string\") {\r\n result[item] = undefined;\r\n }\r\n else if (typeof item === \"object\") {\r\n var elementId = item[\"elementId\"];\r\n if (typeof elementId === \"string\") {\r\n result[elementId] = Utils.parseBool(item[\"isVisible\"]);\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }, function (sender, prop, target, value, context) {\r\n var targetElements = [];\r\n for (var _i = 0, _a = Object.keys(value); _i < _a.length; _i++) {\r\n var id = _a[_i];\r\n if (typeof value[id] === \"boolean\") {\r\n targetElements.push({\r\n elementId: id,\r\n isVisible: value[id]\r\n });\r\n }\r\n else {\r\n targetElements.push(id);\r\n }\r\n }\r\n context.serializeArray(target, prop.name, targetElements);\r\n }, {}, function (sender) {\r\n return {};\r\n });\r\n //#endregion\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n ToggleVisibilityAction.JsonTypeName = \"Action.ToggleVisibility\";\r\n __decorate([\r\n (0, serialization_1.property)(ToggleVisibilityAction.targetElementsProperty)\r\n ], ToggleVisibilityAction.prototype, \"targetElements\", void 0);\r\n return ToggleVisibilityAction;\r\n}(Action));\r\nexports.ToggleVisibilityAction = ToggleVisibilityAction;\r\nvar StringWithSubstitutionProperty = /** @class */ (function (_super) {\r\n __extends(StringWithSubstitutionProperty, _super);\r\n function StringWithSubstitutionProperty(targetVersion, name) {\r\n var _this = _super.call(this, targetVersion, name, undefined, function () {\r\n return new shared_1.StringWithSubstitutions();\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n return _this;\r\n }\r\n StringWithSubstitutionProperty.prototype.parse = function (sender, source, context) {\r\n var result = new shared_1.StringWithSubstitutions();\r\n result.set(Utils.parseString(source[this.name]));\r\n return result;\r\n };\r\n StringWithSubstitutionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value.getOriginal());\r\n };\r\n return StringWithSubstitutionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nvar HttpHeader = /** @class */ (function (_super) {\r\n __extends(HttpHeader, _super);\r\n //#endregion\r\n function HttpHeader(name, value) {\r\n if (name === void 0) { name = \"\"; }\r\n if (value === void 0) { value = \"\"; }\r\n var _this = _super.call(this) || this;\r\n _this.name = name;\r\n _this.value = value;\r\n return _this;\r\n }\r\n HttpHeader.prototype.getSchemaKey = function () {\r\n return \"HttpHeader\";\r\n };\r\n HttpHeader.prototype.getReferencedInputs = function (inputs, referencedInputs) {\r\n this._value.getReferencedInputs(inputs, referencedInputs);\r\n };\r\n HttpHeader.prototype.prepareForExecution = function (inputs) {\r\n this._value.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\r\n };\r\n Object.defineProperty(HttpHeader.prototype, \"value\", {\r\n get: function () {\r\n return this._value.get();\r\n },\r\n set: function (newValue) {\r\n this._value.set(newValue);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n HttpHeader.nameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"name\");\r\n HttpHeader.valueProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(HttpHeader.nameProperty)\r\n ], HttpHeader.prototype, \"name\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpHeader.valueProperty)\r\n ], HttpHeader.prototype, \"_value\", void 0);\r\n return HttpHeader;\r\n}(serialization_1.SerializableObject));\r\nexports.HttpHeader = HttpHeader;\r\nvar HttpAction = /** @class */ (function (_super) {\r\n __extends(HttpAction, _super);\r\n function HttpAction() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._ignoreInputValidation = false;\r\n return _this;\r\n }\r\n HttpAction.prototype.internalGetReferencedInputs = function () {\r\n var allInputs = this.parent ? this.parent.getRootElement().getAllInputs() : [];\r\n var result = {};\r\n this._url.getReferencedInputs(allInputs, result);\r\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\r\n var header = _a[_i];\r\n header.getReferencedInputs(allInputs, result);\r\n }\r\n this._body.getReferencedInputs(allInputs, result);\r\n return result;\r\n };\r\n HttpAction.prototype.internalPrepareForExecution = function (inputs) {\r\n if (inputs) {\r\n this._url.substituteInputValues(inputs, shared_1.ContentTypes.applicationXWwwFormUrlencoded);\r\n var contentType = shared_1.ContentTypes.applicationJson;\r\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\r\n var header = _a[_i];\r\n header.prepareForExecution(inputs);\r\n if (header.name && header.name.toLowerCase() === \"content-type\") {\r\n contentType = header.value;\r\n }\r\n }\r\n this._body.substituteInputValues(inputs, contentType);\r\n }\r\n };\r\n HttpAction.prototype.getJsonTypeName = function () {\r\n return HttpAction.JsonTypeName;\r\n };\r\n HttpAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (!this.url) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"url\"));\r\n }\r\n if (this.headers.length > 0) {\r\n for (var _i = 0, _a = this.headers; _i < _a.length; _i++) {\r\n var header = _a[_i];\r\n if (!header.name) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.actionHttpHeadersMustHaveNameAndValue());\r\n }\r\n }\r\n }\r\n };\r\n Object.defineProperty(HttpAction.prototype, \"ignoreInputValidation\", {\r\n get: function () {\r\n return this._ignoreInputValidation;\r\n },\r\n set: function (value) {\r\n this._ignoreInputValidation = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HttpAction.prototype, \"url\", {\r\n get: function () {\r\n return this._url.get();\r\n },\r\n set: function (value) {\r\n this._url.set(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HttpAction.prototype, \"body\", {\r\n get: function () {\r\n return this._body.get();\r\n },\r\n set: function (value) {\r\n this._body.set(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n HttpAction.urlProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"url\");\r\n HttpAction.bodyProperty = new StringWithSubstitutionProperty(serialization_1.Versions.v1_0, \"body\");\r\n HttpAction.methodProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"method\");\r\n HttpAction.headersProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_0, \"headers\", HttpHeader);\r\n HttpAction.ignoreInputValidationProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_3, \"ignoreInputValidation\", false);\r\n //#endregion\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n HttpAction.JsonTypeName = \"Action.Http\";\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.urlProperty)\r\n ], HttpAction.prototype, \"_url\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.bodyProperty)\r\n ], HttpAction.prototype, \"_body\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.methodProperty)\r\n ], HttpAction.prototype, \"method\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.headersProperty)\r\n ], HttpAction.prototype, \"headers\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(HttpAction.ignoreInputValidationProperty)\r\n ], HttpAction.prototype, \"_ignoreInputValidation\", void 0);\r\n return HttpAction;\r\n}(Action));\r\nexports.HttpAction = HttpAction;\r\nvar ShowCardAction = /** @class */ (function (_super) {\r\n __extends(ShowCardAction, _super);\r\n function ShowCardAction() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.card = new InlineAdaptiveCard();\r\n return _this;\r\n }\r\n ShowCardAction.prototype.updateCssClasses = function () {\r\n _super.prototype.updateCssClasses.call(this);\r\n if (this.renderedElement) {\r\n var effectiveHostConfig = this.parent ? this.parent.hostConfig : host_config_1.defaultHostConfig;\r\n this.renderedElement.classList.add(effectiveHostConfig.makeCssClassName(\"expandable\"));\r\n this.renderedElement.setAttribute(\"aria-expanded\", (this.state === 1 /* Expanded */).toString());\r\n }\r\n };\r\n ShowCardAction.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n var jsonCard = source[\"card\"];\r\n if (jsonCard) {\r\n this.card.parse(jsonCard, context);\r\n }\r\n else {\r\n context.logParseEvent(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.showCardMustHaveCard());\r\n }\r\n };\r\n ShowCardAction.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n if (this.card) {\r\n context.serializeValue(target, \"card\", this.card.toJSON(context));\r\n }\r\n };\r\n ShowCardAction.prototype.raiseExecuteActionEvent = function () {\r\n if (this.hostConfig.actions.showCard.actionMode === Enums.ShowCardActionMode.Popup) {\r\n // Only raise the event in Popup mode.\r\n _super.prototype.raiseExecuteActionEvent.call(this);\r\n }\r\n };\r\n ShowCardAction.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this.card.releaseDOMResources();\r\n };\r\n ShowCardAction.prototype.getJsonTypeName = function () {\r\n return ShowCardAction.JsonTypeName;\r\n };\r\n ShowCardAction.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n this.card.internalValidateProperties(context);\r\n };\r\n ShowCardAction.prototype.setParent = function (value) {\r\n _super.prototype.setParent.call(this, value);\r\n this.card.setParent(value);\r\n };\r\n ShowCardAction.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return this.card.getAllInputs(processActions);\r\n };\r\n ShowCardAction.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n result.push.apply(result, this.card.getAllActions());\r\n return result;\r\n };\r\n ShowCardAction.prototype.getResourceInformation = function () {\r\n var result = _super.prototype.getResourceInformation.call(this);\r\n result.push.apply(result, this.card.getResourceInformation());\r\n return result;\r\n };\r\n ShowCardAction.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result) {\r\n result = this.card.getActionById(id);\r\n }\r\n return result;\r\n };\r\n // Note the \"weird\" way this field is declared is to work around a breaking\r\n // change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n ShowCardAction.JsonTypeName = \"Action.ShowCard\";\r\n return ShowCardAction;\r\n}(Action));\r\nexports.ShowCardAction = ShowCardAction;\r\nvar OverflowAction = /** @class */ (function (_super) {\r\n __extends(OverflowAction, _super);\r\n function OverflowAction(actions) {\r\n var _this = _super.call(this) || this;\r\n _this._actions = actions;\r\n _this.title = strings_1.Strings.defaults.overflowButtonText();\r\n _this.tooltip = strings_1.Strings.defaults.overflowButtonTooltip();\r\n return _this;\r\n }\r\n OverflowAction.prototype.getActions = function () {\r\n return this._actions;\r\n };\r\n OverflowAction.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n result.push.apply(result, this._actions);\r\n return result;\r\n };\r\n OverflowAction.prototype.getJsonTypeName = function () {\r\n return ShowCardAction.JsonTypeName;\r\n };\r\n OverflowAction.prototype.execute = function () {\r\n var _this = this;\r\n var _a;\r\n var shouldDisplayPopupMenu = !raiseDisplayOverflowActionMenuEvent(this, this.renderedElement);\r\n if (shouldDisplayPopupMenu && this.renderedElement) {\r\n var contextMenu_1 = new controls_1.PopupMenu();\r\n contextMenu_1.hostConfig = this.hostConfig;\r\n var _loop_2 = function (i) {\r\n var menuItem = new controls_1.MenuItem(i.toString(), (_a = this_1._actions[i].title) !== null && _a !== void 0 ? _a : \"\");\r\n menuItem.isEnabled = this_1._actions[i].isEnabled;\r\n menuItem.onClick = function () {\r\n var actionToExecute = _this._actions[i];\r\n contextMenu_1.closePopup(false);\r\n if (actionToExecute.isEnabled) {\r\n actionToExecute.execute();\r\n }\r\n };\r\n contextMenu_1.items.add(menuItem);\r\n };\r\n var this_1 = this;\r\n for (var i = 0; i < this._actions.length; i++) {\r\n _loop_2(i);\r\n }\r\n contextMenu_1.onClose = function () {\r\n var _a, _b;\r\n (_a = _this.renderedElement) === null || _a === void 0 ? void 0 : _a.focus();\r\n (_b = _this.renderedElement) === null || _b === void 0 ? void 0 : _b.setAttribute(\"aria-expanded\", \"false\");\r\n };\r\n this.renderedElement.setAttribute(\"aria-expanded\", \"true\");\r\n contextMenu_1.popup(this.renderedElement);\r\n contextMenu_1.selectedIndex = 0;\r\n }\r\n };\r\n OverflowAction.prototype.setupElementForAccessibility = function (element, promoteTooltipToLabel) {\r\n if (promoteTooltipToLabel === void 0) { promoteTooltipToLabel = false; }\r\n _super.prototype.setupElementForAccessibility.call(this, element, promoteTooltipToLabel);\r\n element.setAttribute(\"aria-label\", strings_1.Strings.defaults.overflowButtonTooltip());\r\n element.setAttribute(\"aria-expanded\", \"false\");\r\n };\r\n OverflowAction.JsonTypeName = \"Action.Overflow\";\r\n return OverflowAction;\r\n}(Action));\r\nvar ActionCollection = /** @class */ (function () {\r\n function ActionCollection(owner) {\r\n this._items = [];\r\n this._renderedActions = [];\r\n this._owner = owner;\r\n }\r\n ActionCollection.prototype.isActionAllowed = function (action) {\r\n var forbiddenTypes = this._owner.getForbiddenActionTypes();\r\n if (forbiddenTypes) {\r\n for (var _i = 0, forbiddenTypes_1 = forbiddenTypes; _i < forbiddenTypes_1.length; _i++) {\r\n var forbiddenType = forbiddenTypes_1[_i];\r\n if (action.constructor === forbiddenType) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n ActionCollection.prototype.refreshContainer = function () {\r\n clearElement(this._actionCardContainer);\r\n if (!this._actionCard) {\r\n this._actionCardContainer.style.marginTop = \"0px\";\r\n return;\r\n }\r\n this._actionCardContainer.style.marginTop =\r\n this.renderedActionCount > 0\r\n ? this._owner.hostConfig.actions.showCard.inlineTopMargin + \"px\"\r\n : \"0px\";\r\n var padding = this._owner.getEffectivePadding();\r\n this._owner.getImmediateSurroundingPadding(padding);\r\n var physicalPadding = this._owner.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n if (this._actionCard) {\r\n this._actionCard.style.paddingLeft = physicalPadding.left + \"px\";\r\n this._actionCard.style.paddingRight = physicalPadding.right + \"px\";\r\n this._actionCard.style.marginLeft = \"-\" + physicalPadding.left + \"px\";\r\n this._actionCard.style.marginRight = \"-\" + physicalPadding.right + \"px\";\r\n if (physicalPadding.bottom !== 0 && !this._owner.isDesignMode()) {\r\n this._actionCard.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this._actionCard.style.marginBottom = \"-\" + physicalPadding.bottom + \"px\";\r\n }\r\n Utils.appendChild(this._actionCardContainer, this._actionCard);\r\n }\r\n };\r\n ActionCollection.prototype.layoutChanged = function () {\r\n this._owner.getRootElement().updateLayout();\r\n };\r\n ActionCollection.prototype.showActionCard = function (action, suppressStyle, raiseEvent) {\r\n if (suppressStyle === void 0) { suppressStyle = false; }\r\n if (raiseEvent === void 0) { raiseEvent = true; }\r\n action.card.suppressStyle = suppressStyle;\r\n // Always re-render a ShowCard action in design mode; reuse already rendered ShowCard (if available) otherwise\r\n var renderedCard = action.card.renderedElement && !this._owner.isDesignMode()\r\n ? action.card.renderedElement\r\n : action.card.render();\r\n this._actionCard = renderedCard;\r\n this._expandedAction = action;\r\n this.refreshContainer();\r\n if (raiseEvent) {\r\n this.layoutChanged();\r\n raiseInlineCardExpandedEvent(action, true);\r\n }\r\n };\r\n ActionCollection.prototype.collapseExpandedAction = function () {\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n action.state = 0 /* Normal */;\r\n }\r\n var previouslyExpandedAction = this._expandedAction;\r\n this._expandedAction = undefined;\r\n this._actionCard = undefined;\r\n this.refreshContainer();\r\n if (previouslyExpandedAction) {\r\n this.layoutChanged();\r\n raiseInlineCardExpandedEvent(previouslyExpandedAction, false);\r\n }\r\n };\r\n ActionCollection.prototype.expandShowCardAction = function (action, raiseEvent) {\r\n var _this = this;\r\n var afterSelectedAction = false;\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var renderedAction = _a[_i];\r\n // Remove actions after selected action from tabOrder if the actions are oriented horizontally, to skip focus directly to expanded card\r\n if (this._owner.hostConfig.actions.actionsOrientation == Enums.Orientation.Horizontal &&\r\n afterSelectedAction) {\r\n renderedAction.isFocusable = false;\r\n }\r\n if (renderedAction !== action) {\r\n renderedAction.state = 2 /* Subdued */;\r\n }\r\n else {\r\n renderedAction.state = 1 /* Expanded */;\r\n afterSelectedAction = true;\r\n if (renderedAction.renderedElement) {\r\n renderedAction.renderedElement.onblur = function (_e) {\r\n for (var _i = 0, _a = _this._renderedActions; _i < _a.length; _i++) {\r\n var ra = _a[_i];\r\n ra.isFocusable = true;\r\n }\r\n };\r\n }\r\n }\r\n }\r\n this.showActionCard(action, !(this._owner.isAtTheVeryLeft() && this._owner.isAtTheVeryRight()), raiseEvent);\r\n };\r\n ActionCollection.prototype.releaseDOMResources = function () {\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n action.releaseDOMResources();\r\n }\r\n };\r\n ActionCollection.prototype.actionExecuted = function (action) {\r\n if (!(action instanceof ShowCardAction)) {\r\n this.collapseExpandedAction();\r\n }\r\n else {\r\n if (action === this._expandedAction) {\r\n this.collapseExpandedAction();\r\n }\r\n else if (this._owner.hostConfig.actions.showCard.actionMode ===\r\n Enums.ShowCardActionMode.Inline) {\r\n this.expandShowCardAction(action, true);\r\n }\r\n }\r\n };\r\n ActionCollection.prototype.parse = function (source, context) {\r\n this.clear();\r\n if (Array.isArray(source)) {\r\n for (var _i = 0, source_1 = source; _i < source_1.length; _i++) {\r\n var jsonAction = source_1[_i];\r\n var forbiddenActions = [];\r\n // If the action owner is a ContainerWithActions, we should check for forbidden actions\r\n if (this._owner instanceof ContainerWithActions) {\r\n forbiddenActions = this._owner.getForbiddenActionNames();\r\n }\r\n var action = context.parseAction(this._owner, jsonAction, forbiddenActions, !this._owner.isDesignMode());\r\n if (action) {\r\n this.addAction(action);\r\n }\r\n }\r\n }\r\n };\r\n ActionCollection.prototype.toJSON = function (target, propertyName, context) {\r\n context.serializeArray(target, propertyName, this._items);\r\n };\r\n ActionCollection.prototype.getActionAt = function (id) {\r\n return this._items[id];\r\n };\r\n ActionCollection.prototype.getActionCount = function () {\r\n return this._items.length;\r\n };\r\n ActionCollection.prototype.getActionById = function (id) {\r\n var result = undefined;\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n result = item.getActionById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n return result;\r\n };\r\n ActionCollection.prototype.validateProperties = function (context) {\r\n if (this._owner.hostConfig.actions.maxActions &&\r\n this._items.length > this._owner.hostConfig.actions.maxActions) {\r\n context.addFailure(this._owner, Enums.ValidationEvent.TooManyActions, strings_1.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions));\r\n }\r\n if (this._items.length > 0 && !this._owner.hostConfig.supportsInteractivity) {\r\n context.addFailure(this._owner, Enums.ValidationEvent.InteractivityNotAllowed, strings_1.Strings.errors.interactivityNotAllowed());\r\n }\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (!this.isActionAllowed(item)) {\r\n context.addFailure(this._owner, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(item.getJsonTypeName()));\r\n }\r\n item.internalValidateProperties(context);\r\n }\r\n };\r\n ActionCollection.prototype.render = function (orientation) {\r\n // Cache hostConfig for better perf\r\n var hostConfig = this._owner.hostConfig;\r\n if (!hostConfig.supportsInteractivity) {\r\n return undefined;\r\n }\r\n var element = document.createElement(\"div\");\r\n var maxActions = hostConfig.actions.maxActions\r\n ? Math.min(hostConfig.actions.maxActions, this._items.length)\r\n : this._items.length;\r\n this._actionCardContainer = document.createElement(\"div\");\r\n this._renderedActions = [];\r\n if (hostConfig.actions.preExpandSingleShowCardAction &&\r\n maxActions === 1 &&\r\n this._items[0] instanceof ShowCardAction &&\r\n this.isActionAllowed(this._items[0])) {\r\n this.showActionCard(this._items[0], true);\r\n this._renderedActions.push(this._items[0]);\r\n }\r\n else {\r\n var buttonStrip = document.createElement(\"div\");\r\n buttonStrip.className = hostConfig.makeCssClassName(\"ac-actionSet\");\r\n buttonStrip.style.display = \"flex\";\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n buttonStrip.style.flexDirection = \"row\";\r\n if (this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n }\r\n else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.justifyContent = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n buttonStrip.style.flexDirection = \"column\";\r\n if (this._owner.horizontalAlignment &&\r\n hostConfig.actions.actionAlignment !== Enums.ActionAlignment.Stretch) {\r\n switch (this._owner.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n }\r\n else {\r\n switch (hostConfig.actions.actionAlignment) {\r\n case Enums.ActionAlignment.Center:\r\n buttonStrip.style.alignItems = \"center\";\r\n break;\r\n case Enums.ActionAlignment.Right:\r\n buttonStrip.style.alignItems = \"flex-end\";\r\n break;\r\n case Enums.ActionAlignment.Stretch:\r\n buttonStrip.style.alignItems = \"stretch\";\r\n break;\r\n default:\r\n buttonStrip.style.alignItems = \"flex-start\";\r\n break;\r\n }\r\n }\r\n }\r\n var allowedActions = this._items.filter(this.isActionAllowed.bind(this));\r\n var primaryActions_1 = [];\r\n var secondaryActions_1 = [];\r\n if (!this._owner.isDesignMode()) {\r\n allowedActions.forEach(function (action) {\r\n return action.mode === Enums.ActionMode.Secondary\r\n ? secondaryActions_1.push(action)\r\n : primaryActions_1.push(action);\r\n });\r\n // If primaryActions.length > maxActions, extra actions are moved to overflow\r\n var overflowPrimaryActions = primaryActions_1.splice(hostConfig.actions.maxActions);\r\n if (shared_1.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu) {\r\n secondaryActions_1.push.apply(secondaryActions_1, overflowPrimaryActions);\r\n }\r\n var shouldRenderOverflowActionButton = true;\r\n if (secondaryActions_1.length > 0) {\r\n if (!this._overflowAction) {\r\n this._overflowAction = new OverflowAction(secondaryActions_1);\r\n this._overflowAction.setParent(this._owner);\r\n this._overflowAction[\"_actionCollection\"] = this;\r\n }\r\n var isRootAction = this._owner instanceof AdaptiveCard && !this._owner.parent;\r\n shouldRenderOverflowActionButton = !raiseRenderOverflowActionsEvent(this._overflowAction, isRootAction);\r\n }\r\n if (this._overflowAction && shouldRenderOverflowActionButton) {\r\n primaryActions_1.push(this._overflowAction);\r\n }\r\n }\r\n else {\r\n primaryActions_1 = allowedActions;\r\n }\r\n for (var i = 0; i < primaryActions_1.length; i++) {\r\n var action = primaryActions_1[i];\r\n action.render();\r\n if (action.renderedElement) {\r\n if (hostConfig.actions.actionsOrientation === Enums.Orientation.Horizontal &&\r\n hostConfig.actions.actionAlignment === Enums.ActionAlignment.Stretch) {\r\n action.renderedElement.style.flex = \"0 1 100%\";\r\n }\r\n else {\r\n action.renderedElement.style.flex = \"0 1 auto\";\r\n }\r\n buttonStrip.appendChild(action.renderedElement);\r\n this._renderedActions.push(action);\r\n if (i < primaryActions_1.length - 1 && hostConfig.actions.buttonSpacing > 0) {\r\n var spacer = document.createElement(\"div\");\r\n if (orientation === Enums.Orientation.Horizontal) {\r\n spacer.style.flex = \"0 0 auto\";\r\n spacer.style.width = hostConfig.actions.buttonSpacing + \"px\";\r\n }\r\n else {\r\n spacer.style.height = hostConfig.actions.buttonSpacing + \"px\";\r\n }\r\n Utils.appendChild(buttonStrip, spacer);\r\n }\r\n }\r\n }\r\n var buttonStripContainer = document.createElement(\"div\");\r\n buttonStripContainer.style.overflow = \"hidden\";\r\n buttonStripContainer.appendChild(buttonStrip);\r\n Utils.appendChild(element, buttonStripContainer);\r\n }\r\n Utils.appendChild(element, this._actionCardContainer);\r\n for (var _i = 0, _a = this._renderedActions; _i < _a.length; _i++) {\r\n var renderedAction = _a[_i];\r\n if (renderedAction.state === 1 /* Expanded */) {\r\n this.expandShowCardAction(renderedAction, false);\r\n break;\r\n }\r\n }\r\n return this._renderedActions.length > 0 ? element : undefined;\r\n };\r\n ActionCollection.prototype.addAction = function (action) {\r\n if (!action) {\r\n throw new Error(\"The action parameter cannot be null.\");\r\n }\r\n if ((!action.parent || action.parent === this._owner) && this._items.indexOf(action) < 0) {\r\n this._items.push(action);\r\n if (!action.parent) {\r\n action.setParent(this._owner);\r\n }\r\n action[\"_actionCollection\"] = this;\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.actionAlreadyParented());\r\n }\r\n };\r\n ActionCollection.prototype.removeAction = function (action) {\r\n if (this.expandedAction && this._expandedAction === action) {\r\n this.collapseExpandedAction();\r\n }\r\n var actionIndex = this._items.indexOf(action);\r\n if (actionIndex >= 0) {\r\n this._items.splice(actionIndex, 1);\r\n action.setParent(undefined);\r\n action[\"_actionCollection\"] = undefined;\r\n for (var i = 0; i < this._renderedActions.length; i++) {\r\n if (this._renderedActions[i] === action) {\r\n this._renderedActions.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n ActionCollection.prototype.clear = function () {\r\n this._items = [];\r\n this._renderedActions = [];\r\n this._expandedAction = undefined;\r\n };\r\n ActionCollection.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n var result = [];\r\n if (processActions) {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n result.push.apply(result, action.getAllInputs());\r\n }\r\n }\r\n return result;\r\n };\r\n ActionCollection.prototype.getResourceInformation = function () {\r\n var result = [];\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var action = _a[_i];\r\n result.push.apply(result, action.getResourceInformation());\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ActionCollection.prototype, \"renderedActionCount\", {\r\n get: function () {\r\n return this._renderedActions.length;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ActionCollection.prototype, \"expandedAction\", {\r\n get: function () {\r\n return this._expandedAction;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ActionCollection;\r\n}());\r\nvar ActionSet = /** @class */ (function (_super) {\r\n __extends(ActionSet, _super);\r\n function ActionSet() {\r\n var _this = _super.call(this) || this;\r\n _this._actionCollection = new ActionCollection(_this);\r\n return _this;\r\n }\r\n ActionSet.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n };\r\n ActionSet.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n };\r\n ActionSet.prototype.internalRender = function () {\r\n return this._actionCollection.render(this.orientation !== undefined\r\n ? this.orientation\r\n : this.hostConfig.actions.actionsOrientation);\r\n };\r\n ActionSet.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this._actionCollection.releaseDOMResources();\r\n };\r\n ActionSet.prototype.isBleedingAtBottom = function () {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return _super.prototype.isBleedingAtBottom.call(this);\r\n }\r\n else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction);\r\n }\r\n else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n };\r\n ActionSet.prototype.getJsonTypeName = function () {\r\n return \"ActionSet\";\r\n };\r\n ActionSet.prototype.getActionCount = function () {\r\n return this._actionCollection.getActionCount();\r\n };\r\n ActionSet.prototype.getActionAt = function (index) {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n }\r\n else {\r\n return _super.prototype.getActionAt.call(this, index);\r\n }\r\n };\r\n ActionSet.prototype.getActionById = function (id) {\r\n var result = this._actionCollection.getActionById(id);\r\n return result ? result : _super.prototype.getActionById.call(this, id);\r\n };\r\n ActionSet.prototype.getAllActions = function () {\r\n var result = _super.prototype.getAllActions.call(this);\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action) {\r\n result.push(action);\r\n }\r\n }\r\n return result;\r\n };\r\n ActionSet.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n this._actionCollection.validateProperties(context);\r\n };\r\n ActionSet.prototype.addAction = function (action) {\r\n this._actionCollection.addAction(action);\r\n };\r\n ActionSet.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n return processActions ? this._actionCollection.getAllInputs() : [];\r\n };\r\n ActionSet.prototype.getResourceInformation = function () {\r\n return this._actionCollection.getResourceInformation();\r\n };\r\n /**\r\n * @inheritdoc\r\n */\r\n ActionSet.prototype.findDOMNodeOwner = function (node) {\r\n var target = undefined;\r\n for (var i = 0; i < this.getActionCount(); i++) {\r\n var action = this.getActionAt(i);\r\n if (action) {\r\n // recur through each Action\r\n target = action.findDOMNodeOwner(node);\r\n if (target) {\r\n return target;\r\n }\r\n }\r\n }\r\n // if not found in any Action, defer to parent implementation\r\n return _super.prototype.findDOMNodeOwner.call(this, node);\r\n };\r\n ActionSet.prototype.getElementById = function (id) {\r\n var result = _super.prototype.getElementById.call(this, id);\r\n if (!result) {\r\n result = this.getElementByIdFromAction(id);\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ActionSet.prototype, \"isInteractive\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n ActionSet.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"orientation\", Enums.Orientation);\r\n __decorate([\r\n (0, serialization_1.property)(ActionSet.orientationProperty)\r\n ], ActionSet.prototype, \"orientation\", void 0);\r\n return ActionSet;\r\n}(CardElement));\r\nexports.ActionSet = ActionSet;\r\nvar ContainerStyleProperty = /** @class */ (function (_super) {\r\n __extends(ContainerStyleProperty, _super);\r\n function ContainerStyleProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, [\r\n { value: Enums.ContainerStyle.Default },\r\n { value: Enums.ContainerStyle.Emphasis },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Accent },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Good },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Attention },\r\n { targetVersion: serialization_1.Versions.v1_2, value: Enums.ContainerStyle.Warning }\r\n ], defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n return ContainerStyleProperty;\r\n}(serialization_1.ValueSetProperty));\r\nexports.ContainerStyleProperty = ContainerStyleProperty;\r\nvar StylableCardElementContainer = /** @class */ (function (_super) {\r\n __extends(StylableCardElementContainer, _super);\r\n function StylableCardElementContainer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(StylableCardElementContainer.prototype, \"style\", {\r\n get: function () {\r\n if (this.allowCustomStyle) {\r\n var style = this.getValue(StylableCardElementContainer.styleProperty);\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n }\r\n return undefined;\r\n },\r\n set: function (value) {\r\n this.setValue(StylableCardElementContainer.styleProperty, value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(StylableCardElementContainer.prototype, \"allowCustomStyle\", {\r\n //#endregion\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(StylableCardElementContainer.prototype, \"hasExplicitStyle\", {\r\n get: function () {\r\n return this.getValue(StylableCardElementContainer.styleProperty) !== undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n StylableCardElementContainer.prototype.applyBorder = function () {\r\n // No border in base implementation\r\n };\r\n StylableCardElementContainer.prototype.applyBackground = function () {\r\n if (this.renderedElement) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\r\n if (styleDefinition.backgroundColor) {\r\n var bgColor = Utils.stringToCssColor(styleDefinition.backgroundColor);\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n };\r\n StylableCardElementContainer.prototype.applyPadding = function () {\r\n _super.prototype.applyPadding.call(this);\r\n if (!this.renderedElement) {\r\n return;\r\n }\r\n var physicalPadding = new shared_1.SpacingDefinition();\r\n if (this.getEffectivePadding()) {\r\n physicalPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding());\r\n }\r\n this.renderedElement.style.paddingTop = physicalPadding.top + \"px\";\r\n this.renderedElement.style.paddingRight = physicalPadding.right + \"px\";\r\n this.renderedElement.style.paddingBottom = physicalPadding.bottom + \"px\";\r\n this.renderedElement.style.paddingLeft = physicalPadding.left + \"px\";\r\n if (this.isBleeding()) {\r\n // Bleed into the first parent that does have padding\r\n var padding = new shared_1.PaddingDefinition();\r\n this.getImmediateSurroundingPadding(padding);\r\n var surroundingPadding = this.hostConfig.paddingDefinitionToSpacingDefinition(padding);\r\n this.renderedElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n this.renderedElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n if (!this.isDesignMode()) {\r\n this.renderedElement.style.marginTop = \"-\" + surroundingPadding.top + \"px\";\r\n this.renderedElement.style.marginBottom = \"-\" + surroundingPadding.bottom + \"px\";\r\n }\r\n if (this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n this.separatorElement.style.marginLeft = \"-\" + surroundingPadding.left + \"px\";\r\n this.separatorElement.style.marginRight = \"-\" + surroundingPadding.right + \"px\";\r\n }\r\n }\r\n else {\r\n this.renderedElement.style.marginRight = \"0\";\r\n this.renderedElement.style.marginLeft = \"0\";\r\n this.renderedElement.style.marginTop = \"0\";\r\n this.renderedElement.style.marginBottom = \"0\";\r\n if (this.separatorElement &&\r\n this.separatorOrientation === Enums.Orientation.Horizontal) {\r\n this.separatorElement.style.marginRight = \"0\";\r\n this.separatorElement.style.marginLeft = \"0\";\r\n }\r\n }\r\n };\r\n StylableCardElementContainer.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n var currentElement = this.parent;\r\n while (currentElement) {\r\n var currentElementHasBackgroundImage = false;\r\n if (ignoreBackgroundImages) {\r\n currentElementHasBackgroundImage = false;\r\n }\r\n else {\r\n currentElementHasBackgroundImage =\r\n currentElement instanceof Container\r\n ? currentElement.backgroundImage.isValid()\r\n : false;\r\n }\r\n if (currentElement instanceof StylableCardElementContainer) {\r\n if (this.hasExplicitStyle &&\r\n (currentElement.getEffectiveStyle() !== this.getEffectiveStyle() ||\r\n currentElementHasBackgroundImage)) {\r\n return true;\r\n }\r\n }\r\n currentElement = currentElement.parent;\r\n }\r\n return false;\r\n };\r\n StylableCardElementContainer.prototype.getDefaultPadding = function () {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding)\r\n : _super.prototype.getDefaultPadding.call(this);\r\n };\r\n StylableCardElementContainer.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n var explicitStyle = this.getValue(StylableCardElementContainer.styleProperty);\r\n if (explicitStyle !== undefined) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(explicitStyle);\r\n if (!styleDefinition) {\r\n context.addFailure(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(explicitStyle, \"style\"));\r\n }\r\n }\r\n };\r\n StylableCardElementContainer.prototype.render = function () {\r\n var renderedElement = _super.prototype.render.call(this);\r\n if (renderedElement && this.getHasBackground()) {\r\n this.applyBackground();\r\n }\r\n this.applyBorder();\r\n return renderedElement;\r\n };\r\n StylableCardElementContainer.prototype.getEffectiveStyle = function () {\r\n var effectiveStyle = this.style;\r\n return effectiveStyle ? effectiveStyle : _super.prototype.getEffectiveStyle.call(this);\r\n };\r\n //#region Schema\r\n StylableCardElementContainer.styleProperty = new ContainerStyleProperty(serialization_1.Versions.v1_0, \"style\");\r\n __decorate([\r\n (0, serialization_1.property)(StylableCardElementContainer.styleProperty)\r\n ], StylableCardElementContainer.prototype, \"style\", null);\r\n return StylableCardElementContainer;\r\n}(CardElementContainer));\r\nexports.StylableCardElementContainer = StylableCardElementContainer;\r\nvar ContainerBase = /** @class */ (function (_super) {\r\n __extends(ContainerBase, _super);\r\n function ContainerBase() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._bleed = false;\r\n return _this;\r\n }\r\n //#endregion\r\n ContainerBase.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n _super.prototype.adjustRenderedElementSize.call(this, renderedElement);\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n };\r\n ContainerBase.prototype.getHasExpandedAction = function () {\r\n return false;\r\n };\r\n ContainerBase.prototype.getBleed = function () {\r\n return this._bleed;\r\n };\r\n ContainerBase.prototype.setBleed = function (value) {\r\n this._bleed = value;\r\n };\r\n Object.defineProperty(ContainerBase.prototype, \"renderedActionCount\", {\r\n get: function () {\r\n return 0;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ContainerBase.prototype.isBleeding = function () {\r\n return (this.getHasBackground() || this.hostConfig.alwaysAllowBleed) && this.getBleed();\r\n };\r\n ContainerBase.bleedProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_2, \"bleed\", false);\r\n ContainerBase.minHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_2, \"minHeight\");\r\n __decorate([\r\n (0, serialization_1.property)(ContainerBase.bleedProperty)\r\n ], ContainerBase.prototype, \"_bleed\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(ContainerBase.minHeightProperty)\r\n ], ContainerBase.prototype, \"minPixelHeight\", void 0);\r\n return ContainerBase;\r\n}(StylableCardElementContainer));\r\nexports.ContainerBase = ContainerBase;\r\nvar BackgroundImage = /** @class */ (function (_super) {\r\n __extends(BackgroundImage, _super);\r\n function BackgroundImage() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n BackgroundImage.prototype.getSchemaKey = function () {\r\n return \"BackgroundImage\";\r\n };\r\n BackgroundImage.prototype.internalParse = function (source, context) {\r\n if (typeof source === \"string\") {\r\n this.resetDefaultValues();\r\n this.url = source;\r\n }\r\n else {\r\n return _super.prototype.internalParse.call(this, source, context);\r\n }\r\n };\r\n BackgroundImage.prototype.apply = function (element) {\r\n if (this.url && element.renderedElement) {\r\n element.renderedElement.style.backgroundImage =\r\n \"url('\" +\r\n element.preProcessPropertyValue(BackgroundImage.urlProperty, this.url) +\r\n \"')\";\r\n switch (this.fillMode) {\r\n case Enums.FillMode.Repeat:\r\n element.renderedElement.style.backgroundRepeat = \"repeat\";\r\n break;\r\n case Enums.FillMode.RepeatHorizontally:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-x\";\r\n break;\r\n case Enums.FillMode.RepeatVertically:\r\n element.renderedElement.style.backgroundRepeat = \"repeat-y\";\r\n break;\r\n case Enums.FillMode.Cover:\r\n default:\r\n element.renderedElement.style.backgroundRepeat = \"no-repeat\";\r\n element.renderedElement.style.backgroundSize = \"cover\";\r\n break;\r\n }\r\n switch (this.horizontalAlignment) {\r\n case Enums.HorizontalAlignment.Left:\r\n break;\r\n case Enums.HorizontalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionX = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.renderedElement.style.backgroundPositionX = \"right\";\r\n break;\r\n }\r\n switch (this.verticalAlignment) {\r\n case Enums.VerticalAlignment.Top:\r\n break;\r\n case Enums.VerticalAlignment.Center:\r\n element.renderedElement.style.backgroundPositionY = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.renderedElement.style.backgroundPositionY = \"bottom\";\r\n break;\r\n }\r\n }\r\n };\r\n BackgroundImage.prototype.isValid = function () {\r\n return this.url ? true : false;\r\n };\r\n //#region Schema\r\n BackgroundImage.urlProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"url\");\r\n BackgroundImage.fillModeProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"fillMode\", Enums.FillMode, Enums.FillMode.Cover);\r\n BackgroundImage.horizontalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"horizontalAlignment\", Enums.HorizontalAlignment, Enums.HorizontalAlignment.Left);\r\n BackgroundImage.verticalAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_2, \"verticalAlignment\", Enums.VerticalAlignment, Enums.VerticalAlignment.Top);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.urlProperty)\r\n ], BackgroundImage.prototype, \"url\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.fillModeProperty)\r\n ], BackgroundImage.prototype, \"fillMode\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.horizontalAlignmentProperty)\r\n ], BackgroundImage.prototype, \"horizontalAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(BackgroundImage.verticalAlignmentProperty)\r\n ], BackgroundImage.prototype, \"verticalAlignment\", void 0);\r\n return BackgroundImage;\r\n}(serialization_1.SerializableObject));\r\nexports.BackgroundImage = BackgroundImage;\r\nvar Container = /** @class */ (function (_super) {\r\n __extends(Container, _super);\r\n function Container() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n //#endregion\r\n _this._items = [];\r\n _this._renderedItems = [];\r\n return _this;\r\n }\r\n Object.defineProperty(Container.prototype, \"backgroundImage\", {\r\n get: function () {\r\n return this.getValue(Container.backgroundImageProperty);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Container.prototype.insertItemAt = function (item, index, forceInsert) {\r\n if (!item.parent || forceInsert) {\r\n if (item.isStandalone) {\r\n if (index < 0 || index >= this._items.length) {\r\n this._items.push(item);\r\n }\r\n else {\r\n this._items.splice(index, 0, item);\r\n }\r\n item.setParent(this);\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.elementTypeNotStandalone(item.getJsonTypeName()));\r\n }\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\r\n }\r\n };\r\n Container.prototype.getItemsCollectionPropertyName = function () {\r\n return \"items\";\r\n };\r\n Container.prototype.applyBackground = function () {\r\n if (this.backgroundImage.isValid() && this.renderedElement) {\r\n this.backgroundImage.apply(this);\r\n }\r\n _super.prototype.applyBackground.call(this);\r\n };\r\n Container.prototype.applyRTL = function (element) {\r\n if (this.rtl !== undefined) {\r\n element.dir = this.rtl ? \"rtl\" : \"ltr\";\r\n }\r\n };\r\n Container.prototype.internalRender = function () {\r\n this._renderedItems = [];\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n var hostConfig = this.hostConfig;\r\n var element = document.createElement(\"div\");\r\n this.applyRTL(element);\r\n element.classList.add(hostConfig.makeCssClassName(\"ac-container\"));\r\n element.style.display = \"flex\";\r\n element.style.flexDirection = \"column\";\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // Forces the container to be at least as tall as its content.\r\n //\r\n // Fixes a quirk in Chrome where, for nested flex elements, the\r\n // inner element's height would never exceed the outer element's\r\n // height. This caused overflow truncation to break -- containers\r\n // would always be measured as not overflowing, since their heights\r\n // were constrained by their parents as opposed to truly reflecting\r\n // the height of their content.\r\n //\r\n // See the \"Browser Rendering Notes\" section of this answer:\r\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n switch (this.getEffectiveVerticalContentAlignment()) {\r\n case Enums.VerticalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n if (this._items.length > 0) {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n var renderedItem = this.isElementAllowed(item) ? item.render() : undefined;\r\n if (renderedItem) {\r\n if (this._renderedItems.length > 0 && item.separatorElement) {\r\n item.separatorElement.style.flex = \"0 0 auto\";\r\n Utils.appendChild(element, item.separatorElement);\r\n }\r\n Utils.appendChild(element, renderedItem);\r\n this._renderedItems.push(item);\r\n }\r\n }\r\n }\r\n else {\r\n if (this.isDesignMode()) {\r\n var placeholderElement = this.createPlaceholderElement();\r\n placeholderElement.style.width = \"100%\";\r\n placeholderElement.style.height = \"100%\";\r\n element.appendChild(placeholderElement);\r\n }\r\n }\r\n return element;\r\n };\r\n Container.prototype.truncateOverflow = function (maxHeight) {\r\n if (this.renderedElement) {\r\n // Add 1 to account for rounding differences between browsers\r\n var boundary_1 = this.renderedElement.offsetTop + maxHeight + 1;\r\n var handleElement_1 = function (cardElement) {\r\n var elt = cardElement.renderedElement;\r\n if (elt) {\r\n switch (Utils.getFitStatus(elt, boundary_1)) {\r\n case Enums.ContainerFitStatus.FullyInContainer:\r\n var sizeChanged = cardElement[\"resetOverflow\"]();\r\n // If the element's size changed after resetting content,\r\n // we have to check if it still fits fully in the card\r\n if (sizeChanged) {\r\n handleElement_1(cardElement);\r\n }\r\n break;\r\n case Enums.ContainerFitStatus.Overflowing:\r\n var containerMaxHeight = boundary_1 - elt.offsetTop;\r\n cardElement[\"handleOverflow\"](containerMaxHeight);\r\n break;\r\n case Enums.ContainerFitStatus.FullyOutOfContainer:\r\n cardElement[\"handleOverflow\"](0);\r\n break;\r\n }\r\n }\r\n };\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n handleElement_1(item);\r\n }\r\n return true;\r\n }\r\n return false;\r\n };\r\n Container.prototype.undoOverflowTruncation = function () {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n item[\"resetOverflow\"]();\r\n }\r\n };\r\n Container.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n var result = ignoreBackgroundImages ? false : this.backgroundImage.isValid();\r\n return result || _super.prototype.getHasBackground.call(this, ignoreBackgroundImages);\r\n };\r\n Container.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.clear();\r\n this.setShouldFallback(false);\r\n var jsonItems = source[this.getItemsCollectionPropertyName()];\r\n if (Array.isArray(jsonItems)) {\r\n for (var _i = 0, jsonItems_1 = jsonItems; _i < jsonItems_1.length; _i++) {\r\n var item = jsonItems_1[_i];\r\n var element = context.parseElement(this, item, this.forbiddenChildElements(), !this.isDesignMode());\r\n if (element) {\r\n this.insertItemAt(element, -1, true);\r\n }\r\n }\r\n }\r\n };\r\n Container.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n var collectionPropertyName = this.getItemsCollectionPropertyName();\r\n context.serializeArray(target, collectionPropertyName, this._items);\r\n };\r\n Object.defineProperty(Container.prototype, \"isSelectable\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Container.prototype.getEffectivePadding = function () {\r\n if (shared_1.GlobalSettings.removePaddingFromContainersWithBackgroundImage &&\r\n !this.getHasBackground(true)) {\r\n return new shared_1.PaddingDefinition();\r\n }\r\n return _super.prototype.getEffectivePadding.call(this);\r\n };\r\n Container.prototype.getEffectiveVerticalContentAlignment = function () {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n var parentContainer = this.getParentContainer();\r\n return parentContainer\r\n ? parentContainer.getEffectiveVerticalContentAlignment()\r\n : Enums.VerticalAlignment.Top;\r\n };\r\n Container.prototype.getItemCount = function () {\r\n return this._items.length;\r\n };\r\n Container.prototype.getItemAt = function (index) {\r\n return this._items[index];\r\n };\r\n Container.prototype.getFirstVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (var _i = 0, _a = this._renderedItems; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (item.isVisible) {\r\n return item;\r\n }\r\n }\r\n }\r\n return undefined;\r\n };\r\n Container.prototype.getLastVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedItems && this._renderedItems.length > 0) {\r\n for (var i = this._renderedItems.length - 1; i >= 0; i--) {\r\n if (this._renderedItems[i].isVisible) {\r\n return this._renderedItems[i];\r\n }\r\n }\r\n }\r\n return undefined;\r\n };\r\n Container.prototype.getJsonTypeName = function () {\r\n return \"Container\";\r\n };\r\n Container.prototype.isFirstElement = function (element) {\r\n var designMode = this.isDesignMode();\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n if (item.isVisible || designMode) {\r\n return item === element;\r\n }\r\n }\r\n return false;\r\n };\r\n Container.prototype.isLastElement = function (element) {\r\n var designMode = this.isDesignMode();\r\n for (var i = this._items.length - 1; i >= 0; i--) {\r\n if (this._items[i].isVisible || designMode) {\r\n return this._items[i] === element;\r\n }\r\n }\r\n return false;\r\n };\r\n Container.prototype.isRtl = function () {\r\n if (this.rtl !== undefined) {\r\n return this.rtl;\r\n }\r\n else {\r\n var parentContainer = this.getParentContainer();\r\n return parentContainer ? parentContainer.isRtl() : false;\r\n }\r\n };\r\n Container.prototype.isBleedingAtTop = function () {\r\n var firstRenderedItem = this.getFirstVisibleRenderedItem();\r\n return (this.isBleeding() || (firstRenderedItem ? firstRenderedItem.isBleedingAtTop() : false));\r\n };\r\n Container.prototype.isBleedingAtBottom = function () {\r\n var lastRenderedItem = this.getLastVisibleRenderedItem();\r\n return (this.isBleeding() ||\r\n (lastRenderedItem\r\n ? lastRenderedItem.isBleedingAtBottom() &&\r\n lastRenderedItem.getEffectiveStyle() === this.getEffectiveStyle()\r\n : false));\r\n };\r\n Container.prototype.indexOf = function (cardElement) {\r\n return this._items.indexOf(cardElement);\r\n };\r\n Container.prototype.addItem = function (item) {\r\n this.insertItemAt(item, -1, false);\r\n };\r\n Container.prototype.insertItemBefore = function (item, insertBefore) {\r\n this.insertItemAt(item, this._items.indexOf(insertBefore), false);\r\n };\r\n Container.prototype.insertItemAfter = function (item, insertAfter) {\r\n this.insertItemAt(item, this._items.indexOf(insertAfter) + 1, false);\r\n };\r\n Container.prototype.removeItem = function (item) {\r\n var itemIndex = this._items.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n return false;\r\n };\r\n Container.prototype.clear = function () {\r\n this._items = [];\r\n this._renderedItems = [];\r\n };\r\n Container.prototype.getResourceInformation = function () {\r\n var result = _super.prototype.getResourceInformation.call(this);\r\n if (this.backgroundImage.isValid()) {\r\n result.push({\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- validated by `isValid()`\r\n url: this.backgroundImage.url,\r\n mimeType: \"image\"\r\n });\r\n }\r\n return result;\r\n };\r\n Container.prototype.getActionById = function (id) {\r\n var result = _super.prototype.getActionById.call(this, id);\r\n if (!result) {\r\n if (this.selectAction) {\r\n result = this.selectAction.getActionById(id);\r\n }\r\n if (!result) {\r\n for (var _i = 0, _a = this._items; _i < _a.length; _i++) {\r\n var item = _a[_i];\r\n result = item.getActionById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(Container.prototype, \"padding\", {\r\n get: function () {\r\n return this.getPadding();\r\n },\r\n set: function (value) {\r\n this.setPadding(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"selectAction\", {\r\n get: function () {\r\n return this._selectAction;\r\n },\r\n set: function (value) {\r\n this._selectAction = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"bleed\", {\r\n get: function () {\r\n return this.getBleed();\r\n },\r\n set: function (value) {\r\n this.setBleed(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n Container.backgroundImageProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_0, \"backgroundImage\", BackgroundImage);\r\n Container.verticalContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_1, \"verticalContentAlignment\", Enums.VerticalAlignment);\r\n Container.rtlProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_0, \"rtl\");\r\n __decorate([\r\n (0, serialization_1.property)(Container.backgroundImageProperty)\r\n ], Container.prototype, \"backgroundImage\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Container.verticalContentAlignmentProperty)\r\n ], Container.prototype, \"verticalContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Container.rtlProperty)\r\n ], Container.prototype, \"rtl\", void 0);\r\n return Container;\r\n}(ContainerBase));\r\nexports.Container = Container;\r\nvar Column = /** @class */ (function (_super) {\r\n __extends(Column, _super);\r\n function Column(width) {\r\n if (width === void 0) { width = \"stretch\"; }\r\n var _this = _super.call(this) || this;\r\n _this.width = \"stretch\";\r\n //#endregion\r\n _this._computedWeight = 0;\r\n _this.width = width;\r\n return _this;\r\n }\r\n Column.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n var minDesignTimeColumnHeight = 20;\r\n if (this.isDesignMode()) {\r\n renderedElement.style.minWidth = \"20px\";\r\n renderedElement.style.minHeight =\r\n (!this.minPixelHeight\r\n ? minDesignTimeColumnHeight\r\n : Math.max(this.minPixelHeight, minDesignTimeColumnHeight)) + \"px\";\r\n }\r\n else {\r\n renderedElement.style.minWidth = \"0\";\r\n if (this.minPixelHeight) {\r\n renderedElement.style.minHeight = this.minPixelHeight + \"px\";\r\n }\r\n }\r\n if (this.width === \"auto\") {\r\n renderedElement.style.flex = \"0 1 auto\";\r\n }\r\n else if (this.width === \"stretch\") {\r\n renderedElement.style.flex = \"1 1 50px\";\r\n }\r\n else if (this.width instanceof shared_1.SizeAndUnit) {\r\n if (this.width.unit === Enums.SizeUnit.Pixel) {\r\n renderedElement.style.flex = \"0 0 auto\";\r\n renderedElement.style.width = this.width.physicalSize + \"px\";\r\n }\r\n else {\r\n renderedElement.style.flex =\r\n \"1 1 \" +\r\n (this._computedWeight > 0 ? this._computedWeight : this.width.physicalSize) +\r\n \"%\";\r\n }\r\n }\r\n };\r\n Column.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n Object.defineProperty(Column.prototype, \"separatorOrientation\", {\r\n get: function () {\r\n return Enums.Orientation.Vertical;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Column.prototype.getJsonTypeName = function () {\r\n return \"Column\";\r\n };\r\n Object.defineProperty(Column.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n if (this.parent && this.parent instanceof ColumnSet) {\r\n return this.separatorElement !== undefined && !this.parent.isLeftMostElement(this);\r\n }\r\n else {\r\n return false;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Column.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n Column.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"width\", function (sender, prop, source, context) {\r\n var result = prop.defaultValue;\r\n var value = source[prop.name];\r\n var invalidWidth = false;\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new shared_1.SizeAndUnit(value, Enums.SizeUnit.Weight);\r\n }\r\n else if (value === \"auto\" || value === \"stretch\") {\r\n result = value;\r\n }\r\n else if (typeof value === \"string\") {\r\n try {\r\n result = shared_1.SizeAndUnit.parse(value);\r\n if (result.unit === Enums.SizeUnit.Pixel &&\r\n prop.targetVersion.compareTo(context.targetVersion) > 0) {\r\n invalidWidth = true;\r\n }\r\n }\r\n catch (e) {\r\n invalidWidth = true;\r\n }\r\n }\r\n else {\r\n invalidWidth = true;\r\n }\r\n if (invalidWidth) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\r\n result = \"auto\";\r\n }\r\n return result;\r\n }, function (sender, property, target, value, context) {\r\n if (value instanceof shared_1.SizeAndUnit) {\r\n if (value.unit === Enums.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n }\r\n else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n }\r\n else {\r\n context.serializeValue(target, \"width\", value);\r\n }\r\n }, \"stretch\");\r\n __decorate([\r\n (0, serialization_1.property)(Column.widthProperty)\r\n ], Column.prototype, \"width\", void 0);\r\n return Column;\r\n}(Container));\r\nexports.Column = Column;\r\nvar ColumnSet = /** @class */ (function (_super) {\r\n __extends(ColumnSet, _super);\r\n function ColumnSet() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._columns = [];\r\n return _this;\r\n }\r\n ColumnSet.prototype.createColumnInstance = function (source, context) {\r\n return context.parseCardObject(this, source, [], !this.isDesignMode(), function (typeName) {\r\n return !typeName || typeName === \"Column\" ? new Column() : undefined;\r\n }, function (typeName, _errorType) {\r\n context.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n });\r\n };\r\n ColumnSet.prototype.internalRender = function () {\r\n this._renderedColumns = [];\r\n if (this._columns.length > 0) {\r\n // Cache hostConfig to avoid walking the parent hierarchy several times\r\n var hostConfig = this.hostConfig;\r\n var element = document.createElement(\"div\");\r\n element.className = hostConfig.makeCssClassName(\"ac-columnSet\");\r\n element.style.display = \"flex\";\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // See comment in Container.internalRender()\r\n element.style.minHeight = \"-webkit-min-content\";\r\n }\r\n switch (this.getEffectiveHorizontalAlignment()) {\r\n case Enums.HorizontalAlignment.Center:\r\n element.style.justifyContent = \"center\";\r\n break;\r\n case Enums.HorizontalAlignment.Right:\r\n element.style.justifyContent = \"flex-end\";\r\n break;\r\n default:\r\n element.style.justifyContent = \"flex-start\";\r\n break;\r\n }\r\n var totalWeight = 0;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.width instanceof shared_1.SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight) {\r\n totalWeight += column.width.physicalSize;\r\n }\r\n }\r\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\r\n var column = _c[_b];\r\n if (column.width instanceof shared_1.SizeAndUnit &&\r\n column.width.unit === Enums.SizeUnit.Weight &&\r\n totalWeight > 0) {\r\n var computedWeight = (100 / totalWeight) * column.width.physicalSize;\r\n // Best way to emulate \"internal\" access I know of\r\n column[\"_computedWeight\"] = computedWeight;\r\n }\r\n var renderedColumn = column.render();\r\n if (renderedColumn) {\r\n if (this._renderedColumns.length > 0 && column.separatorElement) {\r\n column.separatorElement.style.flex = \"0 0 auto\";\r\n Utils.appendChild(element, column.separatorElement);\r\n }\r\n Utils.appendChild(element, renderedColumn);\r\n this._renderedColumns.push(column);\r\n }\r\n }\r\n return this._renderedColumns.length > 0 ? element : undefined;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ColumnSet.prototype.truncateOverflow = function (maxHeight) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n column[\"handleOverflow\"](maxHeight);\r\n }\r\n return true;\r\n };\r\n ColumnSet.prototype.undoOverflowTruncation = function () {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n column[\"resetOverflow\"]();\r\n }\r\n };\r\n Object.defineProperty(ColumnSet.prototype, \"isSelectable\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ColumnSet.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._columns = [];\r\n this._renderedColumns = [];\r\n var jsonColumns = source[\"columns\"];\r\n if (Array.isArray(jsonColumns)) {\r\n for (var _i = 0, jsonColumns_1 = jsonColumns; _i < jsonColumns_1.length; _i++) {\r\n var item = jsonColumns_1[_i];\r\n var column = this.createColumnInstance(item, context);\r\n if (column) {\r\n this._columns.push(column);\r\n }\r\n }\r\n }\r\n };\r\n ColumnSet.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n context.serializeArray(target, \"columns\", this._columns);\r\n };\r\n ColumnSet.prototype.isFirstElement = function (element) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.isVisible) {\r\n return column === element;\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.isBleedingAtTop = function () {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.isBleedingAtTop()) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.isBleedingAtBottom = function () {\r\n if (this.isBleeding()) {\r\n return true;\r\n }\r\n if (this._renderedColumns && this._renderedColumns.length > 0) {\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.isBleedingAtBottom()) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.getItemCount = function () {\r\n return this._columns.length;\r\n };\r\n ColumnSet.prototype.getFirstVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[0];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ColumnSet.prototype.getLastVisibleRenderedItem = function () {\r\n if (this.renderedElement && this._renderedColumns && this._renderedColumns.length > 0) {\r\n return this._renderedColumns[this._renderedColumns.length - 1];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ColumnSet.prototype.getColumnAt = function (index) {\r\n return this._columns[index];\r\n };\r\n ColumnSet.prototype.getItemAt = function (index) {\r\n return this.getColumnAt(index);\r\n };\r\n ColumnSet.prototype.getJsonTypeName = function () {\r\n return \"ColumnSet\";\r\n };\r\n ColumnSet.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n var weightedColumns = 0;\r\n var stretchedColumns = 0;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (typeof column.width === \"number\") {\r\n weightedColumns++;\r\n }\r\n else if (column.width === \"stretch\") {\r\n stretchedColumns++;\r\n }\r\n }\r\n if (weightedColumns > 0 && stretchedColumns > 0) {\r\n context.addFailure(this, Enums.ValidationEvent.Hint, strings_1.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet());\r\n }\r\n };\r\n ColumnSet.prototype.addColumn = function (column) {\r\n if (!column.parent) {\r\n this._columns.push(column);\r\n column.setParent(this);\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.columnAlreadyBelongsToAnotherSet());\r\n }\r\n };\r\n ColumnSet.prototype.removeItem = function (item) {\r\n if (item instanceof Column) {\r\n var itemIndex = this._columns.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._columns.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n ColumnSet.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof Column ? this._columns.indexOf(cardElement) : -1;\r\n };\r\n ColumnSet.prototype.isLeftMostElement = function (element) {\r\n return this._columns.indexOf(element) === 0;\r\n };\r\n ColumnSet.prototype.isRightMostElement = function (element) {\r\n return this._columns.indexOf(element) === this._columns.length - 1;\r\n };\r\n ColumnSet.prototype.isTopElement = function (element) {\r\n return this._columns.indexOf(element) >= 0;\r\n };\r\n ColumnSet.prototype.isBottomElement = function (element) {\r\n return this._columns.indexOf(element) >= 0;\r\n };\r\n ColumnSet.prototype.getActionById = function (id) {\r\n var result = undefined;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n result = column.getActionById(id);\r\n if (result) {\r\n break;\r\n }\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ColumnSet.prototype, \"bleed\", {\r\n get: function () {\r\n return this.getBleed();\r\n },\r\n set: function (value) {\r\n this.setBleed(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColumnSet.prototype, \"padding\", {\r\n get: function () {\r\n return this.getPadding();\r\n },\r\n set: function (value) {\r\n this.setPadding(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColumnSet.prototype, \"selectAction\", {\r\n get: function () {\r\n return this._selectAction;\r\n },\r\n set: function (value) {\r\n this._selectAction = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ColumnSet;\r\n}(ContainerBase));\r\nexports.ColumnSet = ColumnSet;\r\nfunction raiseImageLoadedEvent(image) {\r\n var card = image.getRootElement();\r\n var onImageLoadedHandler = card && card.onImageLoaded ? card.onImageLoaded : AdaptiveCard.onImageLoaded;\r\n if (onImageLoadedHandler) {\r\n onImageLoadedHandler(image);\r\n }\r\n}\r\nfunction raiseAnchorClickedEvent(element, anchor, ev) {\r\n var card = element.getRootElement();\r\n var onAnchorClickedHandler = card && card.onAnchorClicked ? card.onAnchorClicked : AdaptiveCard.onAnchorClicked;\r\n return onAnchorClickedHandler !== undefined\r\n ? onAnchorClickedHandler(element, anchor, ev)\r\n : false;\r\n}\r\nfunction raiseExecuteActionEvent(action) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onExecuteActionHandler = card && card.onExecuteAction ? card.onExecuteAction : AdaptiveCard.onExecuteAction;\r\n if (action.prepareForExecution() && onExecuteActionHandler) {\r\n onExecuteActionHandler(action);\r\n }\r\n}\r\nfunction raiseInlineCardExpandedEvent(action, isExpanded) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onInlineCardExpandedHandler = card && card.onInlineCardExpanded\r\n ? card.onInlineCardExpanded\r\n : AdaptiveCard.onInlineCardExpanded;\r\n if (onInlineCardExpandedHandler) {\r\n onInlineCardExpandedHandler(action, isExpanded);\r\n }\r\n}\r\nfunction raiseInputValueChangedEvent(input) {\r\n var card = input.getRootElement();\r\n var onInputValueChangedHandler = card && card.onInputValueChanged\r\n ? card.onInputValueChanged\r\n : AdaptiveCard.onInputValueChanged;\r\n if (onInputValueChangedHandler) {\r\n onInputValueChangedHandler(input);\r\n }\r\n}\r\nfunction raiseElementVisibilityChangedEvent(element, shouldUpdateLayout) {\r\n if (shouldUpdateLayout === void 0) { shouldUpdateLayout = true; }\r\n var rootElement = element.getRootElement();\r\n if (shouldUpdateLayout) {\r\n rootElement.updateLayout();\r\n }\r\n var card = rootElement;\r\n var onElementVisibilityChangedHandler = card && card.onElementVisibilityChanged\r\n ? card.onElementVisibilityChanged\r\n : AdaptiveCard.onElementVisibilityChanged;\r\n if (onElementVisibilityChangedHandler !== undefined) {\r\n onElementVisibilityChangedHandler(element);\r\n }\r\n}\r\nfunction updateInputAdornersVisibility(input, hide) {\r\n if (!!hide) {\r\n // hides the time/date picker icon\r\n input.readOnly = true;\r\n // hides the cross button icon\r\n input.required = true;\r\n }\r\n else {\r\n // shows the time/date picker icon\r\n input.readOnly = false;\r\n // shows the cross button icon\r\n input.required = false;\r\n }\r\n}\r\n/**\r\n * @returns return false to continue with default context menu; return true to skip SDK default context menu\r\n */\r\nfunction raiseDisplayOverflowActionMenuEvent(action, target) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onDisplayOverflowActionMenuHandler = card && card.onDisplayOverflowActionMenu\r\n ? card.onDisplayOverflowActionMenu\r\n : AdaptiveCard.onDisplayOverflowActionMenu;\r\n return onDisplayOverflowActionMenuHandler !== undefined\r\n ? onDisplayOverflowActionMenuHandler(action.getActions(), target)\r\n : false;\r\n}\r\n/**\r\n * @returns return false to continue with default action button; return true to skip SDK default action button\r\n */\r\nfunction raiseRenderOverflowActionsEvent(action, isAtRootLevelActions) {\r\n var card = action.parent ? action.parent.getRootElement() : undefined;\r\n var onRenderOverflowActionsHandler = card && card.onRenderOverflowActions\r\n ? card.onRenderOverflowActions\r\n : AdaptiveCard.onRenderOverflowActions;\r\n return onRenderOverflowActionsHandler !== undefined\r\n ? onRenderOverflowActionsHandler(action.getActions(), isAtRootLevelActions)\r\n : false;\r\n}\r\nvar ContainerWithActions = /** @class */ (function (_super) {\r\n __extends(ContainerWithActions, _super);\r\n function ContainerWithActions() {\r\n var _this = _super.call(this) || this;\r\n _this._actionCollection = new ActionCollection(_this);\r\n return _this;\r\n }\r\n ContainerWithActions.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.parseActions(source, context);\r\n };\r\n ContainerWithActions.prototype.parseActions = function (source, context) {\r\n this._actionCollection.parse(source[\"actions\"], context);\r\n };\r\n ContainerWithActions.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n this._actionCollection.toJSON(target, \"actions\", context);\r\n };\r\n ContainerWithActions.prototype.internalRender = function () {\r\n var element = _super.prototype.internalRender.call(this);\r\n if (element) {\r\n var renderedActions = this._actionCollection.render(this.hostConfig.actions.actionsOrientation);\r\n if (renderedActions) {\r\n Utils.appendChild(element, renderSeparation(this.hostConfig, {\r\n spacing: this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing)\r\n }, Enums.Orientation.Horizontal));\r\n Utils.appendChild(element, renderedActions);\r\n }\r\n if (this.renderIfEmpty) {\r\n return element;\r\n }\r\n else {\r\n return element.children.length > 0 ? element : undefined;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n ContainerWithActions.prototype.getHasExpandedAction = function () {\r\n if (this.renderedActionCount === 0) {\r\n return false;\r\n }\r\n else if (this.renderedActionCount === 1) {\r\n return (this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction);\r\n }\r\n else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n };\r\n Object.defineProperty(ContainerWithActions.prototype, \"renderedActionCount\", {\r\n get: function () {\r\n return this._actionCollection.renderedActionCount;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContainerWithActions.prototype, \"renderIfEmpty\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ContainerWithActions.prototype.releaseDOMResources = function () {\r\n _super.prototype.releaseDOMResources.call(this);\r\n this._actionCollection.releaseDOMResources();\r\n };\r\n ContainerWithActions.prototype.getActionCount = function () {\r\n return this._actionCollection.getActionCount();\r\n };\r\n ContainerWithActions.prototype.getActionAt = function (index) {\r\n if (index >= 0 && index < this.getActionCount()) {\r\n return this._actionCollection.getActionAt(index);\r\n }\r\n else {\r\n return _super.prototype.getActionAt.call(this, index);\r\n }\r\n };\r\n ContainerWithActions.prototype.getActionById = function (id) {\r\n var result = this._actionCollection.getActionById(id);\r\n return result ? result : _super.prototype.getActionById.call(this, id);\r\n };\r\n ContainerWithActions.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (this._actionCollection) {\r\n this._actionCollection.validateProperties(context);\r\n }\r\n };\r\n ContainerWithActions.prototype.isLastElement = function (element) {\r\n return _super.prototype.isLastElement.call(this, element) && this._actionCollection.getActionCount() === 0;\r\n };\r\n ContainerWithActions.prototype.addAction = function (action) {\r\n this._actionCollection.addAction(action);\r\n };\r\n ContainerWithActions.prototype.clear = function () {\r\n _super.prototype.clear.call(this);\r\n this._actionCollection.clear();\r\n };\r\n ContainerWithActions.prototype.getAllInputs = function (processActions) {\r\n if (processActions === void 0) { processActions = true; }\r\n var result = _super.prototype.getAllInputs.call(this, processActions);\r\n if (processActions) {\r\n result.push.apply(result, this._actionCollection.getAllInputs(processActions));\r\n }\r\n return result;\r\n };\r\n ContainerWithActions.prototype.getResourceInformation = function () {\r\n var result = _super.prototype.getResourceInformation.call(this);\r\n result.push.apply(result, this._actionCollection.getResourceInformation());\r\n return result;\r\n };\r\n ContainerWithActions.prototype.isBleedingAtBottom = function () {\r\n if (this._actionCollection.renderedActionCount === 0) {\r\n return _super.prototype.isBleedingAtBottom.call(this);\r\n }\r\n else {\r\n if (this._actionCollection.getActionCount() === 1) {\r\n return (this._actionCollection.expandedAction !== undefined &&\r\n !this.hostConfig.actions.preExpandSingleShowCardAction);\r\n }\r\n else {\r\n return this._actionCollection.expandedAction !== undefined;\r\n }\r\n }\r\n };\r\n ContainerWithActions.prototype.getForbiddenActionNames = function () {\r\n return [];\r\n };\r\n ContainerWithActions.prototype.getElementById = function (id) {\r\n var result = _super.prototype.getElementById.call(this, id);\r\n if (!result) {\r\n result = this.getElementByIdFromAction(id);\r\n }\r\n return result;\r\n };\r\n Object.defineProperty(ContainerWithActions.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ContainerWithActions;\r\n}(Container));\r\nexports.ContainerWithActions = ContainerWithActions;\r\nvar RefreshActionProperty = /** @class */ (function (_super) {\r\n __extends(RefreshActionProperty, _super);\r\n function RefreshActionProperty(targetVersion, name) {\r\n var _this = _super.call(this, targetVersion, name, undefined) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n return _this;\r\n }\r\n RefreshActionProperty.prototype.parse = function (sender, source, context) {\r\n var action = context.parseAction(sender.parent, source[this.name], [], false);\r\n if (action !== undefined) {\r\n if (action instanceof ExecuteAction) {\r\n return action;\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(action.getJsonTypeName()));\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"action\"));\r\n return undefined;\r\n };\r\n RefreshActionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value ? value.toJSON(context) : undefined, undefined, true);\r\n };\r\n return RefreshActionProperty;\r\n}(serialization_1.PropertyDefinition));\r\nexports.RefreshActionProperty = RefreshActionProperty;\r\nvar RefreshDefinition = /** @class */ (function (_super) {\r\n __extends(RefreshDefinition, _super);\r\n function RefreshDefinition() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(RefreshDefinition.prototype, \"action\", {\r\n get: function () {\r\n return this.getValue(RefreshDefinition.actionProperty);\r\n },\r\n set: function (value) {\r\n this.setValue(RefreshDefinition.actionProperty, value);\r\n if (value) {\r\n value.setParent(this.parent);\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n RefreshDefinition.prototype.getSchemaKey = function () {\r\n return \"RefreshDefinition\";\r\n };\r\n //#region Schema\r\n RefreshDefinition.actionProperty = new RefreshActionProperty(serialization_1.Versions.v1_4, \"action\");\r\n RefreshDefinition.userIdsProperty = new serialization_1.StringArrayProperty(serialization_1.Versions.v1_4, \"userIds\");\r\n __decorate([\r\n (0, serialization_1.property)(RefreshDefinition.actionProperty)\r\n ], RefreshDefinition.prototype, \"action\", null);\r\n __decorate([\r\n (0, serialization_1.property)(RefreshDefinition.userIdsProperty)\r\n ], RefreshDefinition.prototype, \"userIds\", void 0);\r\n return RefreshDefinition;\r\n}(serialization_1.SerializableObject));\r\nexports.RefreshDefinition = RefreshDefinition;\r\nvar AuthCardButton = /** @class */ (function (_super) {\r\n __extends(AuthCardButton, _super);\r\n function AuthCardButton() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n AuthCardButton.prototype.getSchemaKey = function () {\r\n return \"AuthCardButton\";\r\n };\r\n //#region Schema\r\n AuthCardButton.typeProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"type\");\r\n AuthCardButton.titleProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"title\");\r\n AuthCardButton.imageProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"image\");\r\n AuthCardButton.valueProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"value\");\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.typeProperty)\r\n ], AuthCardButton.prototype, \"type\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.titleProperty)\r\n ], AuthCardButton.prototype, \"title\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.imageProperty)\r\n ], AuthCardButton.prototype, \"image\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AuthCardButton.valueProperty)\r\n ], AuthCardButton.prototype, \"value\", void 0);\r\n return AuthCardButton;\r\n}(serialization_1.SerializableObject));\r\nexports.AuthCardButton = AuthCardButton;\r\nvar TokenExchangeResource = /** @class */ (function (_super) {\r\n __extends(TokenExchangeResource, _super);\r\n function TokenExchangeResource() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TokenExchangeResource.prototype.getSchemaKey = function () {\r\n return \"TokenExchangeResource\";\r\n };\r\n //#region Schema\r\n TokenExchangeResource.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"id\");\r\n TokenExchangeResource.uriProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"uri\");\r\n TokenExchangeResource.providerIdProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"providerId\");\r\n __decorate([\r\n (0, serialization_1.property)(TokenExchangeResource.idProperty)\r\n ], TokenExchangeResource.prototype, \"id\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TokenExchangeResource.uriProperty)\r\n ], TokenExchangeResource.prototype, \"uri\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TokenExchangeResource.providerIdProperty)\r\n ], TokenExchangeResource.prototype, \"providerId\", void 0);\r\n return TokenExchangeResource;\r\n}(serialization_1.SerializableObject));\r\nexports.TokenExchangeResource = TokenExchangeResource;\r\nvar Authentication = /** @class */ (function (_super) {\r\n __extends(Authentication, _super);\r\n function Authentication() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Authentication.prototype.getSchemaKey = function () {\r\n return \"Authentication\";\r\n };\r\n //#region Schema\r\n Authentication.textProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"text\");\r\n Authentication.connectionNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_4, \"connectionName\");\r\n Authentication.buttonsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_4, \"buttons\", AuthCardButton);\r\n Authentication.tokenExchangeResourceProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"tokenExchangeResource\", TokenExchangeResource, true);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.textProperty)\r\n ], Authentication.prototype, \"text\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.connectionNameProperty)\r\n ], Authentication.prototype, \"connectionName\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.buttonsProperty)\r\n ], Authentication.prototype, \"buttons\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Authentication.tokenExchangeResourceProperty)\r\n ], Authentication.prototype, \"tokenExchangeResource\", void 0);\r\n return Authentication;\r\n}(serialization_1.SerializableObject));\r\nexports.Authentication = Authentication;\r\n// @dynamic\r\nvar AdaptiveCard = /** @class */ (function (_super) {\r\n __extends(AdaptiveCard, _super);\r\n function AdaptiveCard() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.designMode = false;\r\n return _this;\r\n }\r\n Object.defineProperty(AdaptiveCard.prototype, \"refresh\", {\r\n get: function () {\r\n return this.getValue(AdaptiveCard.refreshProperty);\r\n },\r\n set: function (value) {\r\n this.setValue(AdaptiveCard.refreshProperty, value);\r\n if (value) {\r\n value.parent = this;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard, \"processMarkdown\", {\r\n get: function () {\r\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\r\n },\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n set: function (_value) {\r\n throw new Error(strings_1.Strings.errors.processMarkdownEventRemoved());\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveCard.applyMarkdown = function (text) {\r\n var result = {\r\n didProcess: false\r\n };\r\n if (AdaptiveCard.onProcessMarkdown) {\r\n AdaptiveCard.onProcessMarkdown(text, result);\r\n }\r\n else if (window.markdownit) {\r\n // Check for markdownit\r\n var markdownIt = window.markdownit;\r\n result.outputHtml = markdownIt().render(text);\r\n result.didProcess = true;\r\n }\r\n else if (!AdaptiveCard._haveWarnedAboutNoMarkdownProcessing) {\r\n // eslint-disable-next-line no-console\r\n console.warn(strings_1.Strings.errors.markdownProcessingNotEnabled);\r\n AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = true;\r\n }\r\n return result;\r\n };\r\n AdaptiveCard.prototype.isVersionSupported = function () {\r\n if (this.bypassVersionCheck) {\r\n return true;\r\n }\r\n else {\r\n var unsupportedVersion = !this.version ||\r\n !this.version.isValid ||\r\n this.maxVersion.major < this.version.major ||\r\n (this.maxVersion.major === this.version.major &&\r\n this.maxVersion.minor < this.version.minor);\r\n return !unsupportedVersion;\r\n }\r\n };\r\n AdaptiveCard.prototype.getDefaultSerializationContext = function () {\r\n return new SerializationContext(this.version);\r\n };\r\n AdaptiveCard.prototype.getItemsCollectionPropertyName = function () {\r\n return \"body\";\r\n };\r\n AdaptiveCard.prototype.internalParse = function (source, context) {\r\n this._fallbackCard = undefined;\r\n var fallbackElement = context.parseElement(undefined, source[\"fallback\"], this.forbiddenChildElements(), !this.isDesignMode());\r\n if (fallbackElement) {\r\n this._fallbackCard = new AdaptiveCard();\r\n this._fallbackCard.addItem(fallbackElement);\r\n }\r\n _super.prototype.internalParse.call(this, source, context);\r\n };\r\n AdaptiveCard.prototype.internalToJSON = function (target, context) {\r\n this.setValue(AdaptiveCard.versionProperty, context.targetVersion);\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n };\r\n AdaptiveCard.prototype.internalRender = function () {\r\n var renderedElement = _super.prototype.internalRender.call(this);\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && renderedElement) {\r\n // Unlike containers, the root card element should be allowed to\r\n // be shorter than its content (otherwise the overflow truncation\r\n // logic would never get triggered)\r\n renderedElement.style.removeProperty(\"minHeight\");\r\n }\r\n return renderedElement;\r\n };\r\n AdaptiveCard.prototype.getHasBackground = function (ignoreBackgroundImages) {\r\n if (ignoreBackgroundImages === void 0) { ignoreBackgroundImages = false; }\r\n return true;\r\n };\r\n AdaptiveCard.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition(Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding, Enums.Spacing.Padding);\r\n };\r\n AdaptiveCard.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n Object.defineProperty(AdaptiveCard.prototype, \"renderIfEmpty\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard.prototype, \"bypassVersionCheck\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard.prototype, \"allowCustomStyle\", {\r\n get: function () {\r\n return this.hostConfig.adaptiveCard && this.hostConfig.adaptiveCard.allowCustomStyle;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AdaptiveCard.prototype, \"hasBackground\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveCard.prototype.getJsonTypeName = function () {\r\n return \"AdaptiveCard\";\r\n };\r\n AdaptiveCard.prototype.internalValidateProperties = function (context) {\r\n _super.prototype.internalValidateProperties.call(this, context);\r\n if (this.getValue(CardElement.typeNameProperty) !== \"AdaptiveCard\") {\r\n context.addFailure(this, Enums.ValidationEvent.MissingCardType, strings_1.Strings.errors.invalidCardType());\r\n }\r\n if (!this.bypassVersionCheck && !this.version) {\r\n context.addFailure(this, Enums.ValidationEvent.PropertyCantBeNull, strings_1.Strings.errors.propertyMustBeSet(\"version\"));\r\n }\r\n else if (!this.isVersionSupported()) {\r\n context.addFailure(this, Enums.ValidationEvent.UnsupportedCardVersion, strings_1.Strings.errors.unsupportedCardVersion(this.version.toString(), this.maxVersion.toString()));\r\n }\r\n };\r\n AdaptiveCard.prototype.render = function (target) {\r\n var _this = this;\r\n var renderedCard;\r\n if (this.shouldFallback() && this._fallbackCard) {\r\n this._fallbackCard.hostConfig = this.hostConfig;\r\n renderedCard = this._fallbackCard.render();\r\n }\r\n else {\r\n renderedCard = _super.prototype.render.call(this);\r\n if (renderedCard) {\r\n renderedCard.classList.add(this.hostConfig.makeCssClassName(\"ac-adaptiveCard\"));\r\n // Having a tabIndex on the root container for a card can mess up accessibility in some scenarios.\r\n // However, we've shipped this behavior before, and so can't just turn it off in a point release. For\r\n // now, to unblock accessibility scenarios for our customers, we've got an option to turn it off. In a\r\n // future release, we should strongly consider flipping the default such that we *don't* emit a tabIndex\r\n // by default.\r\n if (shared_1.GlobalSettings.setTabIndexAtCardRoot) {\r\n renderedCard.tabIndex = 0;\r\n }\r\n if (this.speak) {\r\n renderedCard.setAttribute(\"aria-label\", this.speak);\r\n }\r\n renderedCard.onmouseenter = function (ev) {\r\n _this.updateInputsVisualState(true /* hover */);\r\n };\r\n renderedCard.onmouseleave = function (ev) {\r\n _this.updateInputsVisualState(false /* hover */);\r\n };\r\n this.getRootElement().updateActionsEnabledState();\r\n }\r\n }\r\n if (target) {\r\n Utils.appendChild(target, renderedCard);\r\n this.updateLayout();\r\n }\r\n var inputElements = this.getAllInputs();\r\n document.onclick = function (event) {\r\n inputElements.forEach(function (input) {\r\n var _a, _b;\r\n if (input instanceof ChoiceSetInput &&\r\n !((_a = input.renderedElement) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {\r\n (_b = input\r\n .getDropdownElement()) === null || _b === void 0 ? void 0 : _b.classList.remove(_this.hostConfig.makeCssClassName(\"ac-choiceSetInput-filtered-dropdown-open\"));\r\n }\r\n });\r\n };\r\n return renderedCard;\r\n };\r\n AdaptiveCard.prototype.updateLayout = function (processChildren) {\r\n if (processChildren === void 0) { processChildren = true; }\r\n _super.prototype.updateLayout.call(this, processChildren);\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation && this.isDisplayed()) {\r\n var padding = this.hostConfig.getEffectiveSpacing(Enums.Spacing.Default);\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\r\n this[\"handleOverflow\"](this.renderedElement.offsetHeight - padding);\r\n }\r\n };\r\n AdaptiveCard.prototype.shouldFallback = function () {\r\n return _super.prototype.shouldFallback.call(this) || !this.isVersionSupported();\r\n };\r\n Object.defineProperty(AdaptiveCard.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n AdaptiveCard.schemaUrl = \"http://adaptivecards.io/schemas/adaptive-card.json\";\r\n //#region Schema\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n AdaptiveCard.$schemaProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"$schema\", function (sender, property, source, context) {\r\n return AdaptiveCard.schemaUrl;\r\n }, function (sender, prop, target, value, context) {\r\n context.serializeValue(target, prop.name, AdaptiveCard.schemaUrl);\r\n });\r\n AdaptiveCard.versionProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_0, \"version\", function (sender, prop, source, context) {\r\n var version = serialization_1.Version.parse(source[prop.name], context);\r\n if (version === undefined) {\r\n version = serialization_1.Versions.latest;\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidCardVersion(version.toString()));\r\n }\r\n return version;\r\n }, function (sender, prop, target, value, context) {\r\n if (value !== undefined) {\r\n context.serializeValue(target, prop.name, value.toString());\r\n }\r\n }, serialization_1.Versions.v1_0);\r\n AdaptiveCard.fallbackTextProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"fallbackText\");\r\n AdaptiveCard.speakProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"speak\");\r\n AdaptiveCard.refreshProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"refresh\", RefreshDefinition, true);\r\n AdaptiveCard.authenticationProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_4, \"authentication\", Authentication, true);\r\n //#endregion\r\n AdaptiveCard._haveWarnedAboutNoMarkdownProcessing = false;\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.versionProperty)\r\n ], AdaptiveCard.prototype, \"version\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.fallbackTextProperty)\r\n ], AdaptiveCard.prototype, \"fallbackText\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.speakProperty)\r\n ], AdaptiveCard.prototype, \"speak\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.refreshProperty)\r\n ], AdaptiveCard.prototype, \"refresh\", null);\r\n __decorate([\r\n (0, serialization_1.property)(AdaptiveCard.authenticationProperty)\r\n ], AdaptiveCard.prototype, \"authentication\", void 0);\r\n return AdaptiveCard;\r\n}(ContainerWithActions));\r\nexports.AdaptiveCard = AdaptiveCard;\r\nvar InlineAdaptiveCard = /** @class */ (function (_super) {\r\n __extends(InlineAdaptiveCard, _super);\r\n function InlineAdaptiveCard() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.suppressStyle = false;\r\n return _this;\r\n }\r\n InlineAdaptiveCard.prototype.getSchemaKey = function () {\r\n return \"InlineAdaptiveCard\";\r\n };\r\n InlineAdaptiveCard.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n schema.remove(AdaptiveCard.$schemaProperty, AdaptiveCard.versionProperty);\r\n };\r\n //#endregion\r\n InlineAdaptiveCard.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition(this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding, this.suppressStyle ? Enums.Spacing.None : Enums.Spacing.Padding, Enums.Spacing.Padding);\r\n };\r\n Object.defineProperty(InlineAdaptiveCard.prototype, \"bypassVersionCheck\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(InlineAdaptiveCard.prototype, \"defaultStyle\", {\r\n get: function () {\r\n if (this.suppressStyle) {\r\n return Enums.ContainerStyle.Default;\r\n }\r\n else {\r\n return this.hostConfig.actions.showCard.style\r\n ? this.hostConfig.actions.showCard.style\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n InlineAdaptiveCard.prototype.render = function (target) {\r\n var renderedCard = _super.prototype.render.call(this, target);\r\n if (renderedCard) {\r\n renderedCard.setAttribute(\"aria-live\", \"polite\");\r\n renderedCard.removeAttribute(\"tabindex\");\r\n }\r\n return renderedCard;\r\n };\r\n return InlineAdaptiveCard;\r\n}(AdaptiveCard));\r\nvar SerializationContext = /** @class */ (function (_super) {\r\n __extends(SerializationContext, _super);\r\n function SerializationContext() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._forbiddenTypes = new Set();\r\n return _this;\r\n }\r\n SerializationContext.prototype.internalParseCardObject = function (parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent) {\r\n var _this = this;\r\n var result = undefined;\r\n if (source && typeof source === \"object\") {\r\n var oldForbiddenTypes_1 = new Set();\r\n this._forbiddenTypes.forEach(function (type) {\r\n oldForbiddenTypes_1.add(type);\r\n });\r\n forbiddenTypes.forEach(function (type) {\r\n _this._forbiddenTypes.add(type);\r\n });\r\n var typeName = Utils.parseString(source[\"type\"]);\r\n if (typeName && this._forbiddenTypes.has(typeName)) {\r\n logParseEvent(typeName, Enums.TypeErrorType.ForbiddenType);\r\n }\r\n else {\r\n var tryToFallback = false;\r\n result = createInstanceCallback(typeName);\r\n if (!result) {\r\n tryToFallback = shared_1.GlobalSettings.enableFallback && allowFallback;\r\n logParseEvent(typeName, Enums.TypeErrorType.UnknownType);\r\n }\r\n else {\r\n result.setParent(parent);\r\n result.parse(source, this);\r\n tryToFallback =\r\n shared_1.GlobalSettings.enableFallback && allowFallback && result.shouldFallback();\r\n }\r\n if (tryToFallback) {\r\n var fallback = source[\"fallback\"];\r\n if (!fallback && parent) {\r\n parent.setShouldFallback(true);\r\n }\r\n if (typeof fallback === \"string\" && fallback.toLowerCase() === \"drop\") {\r\n result = undefined;\r\n }\r\n else if (typeof fallback === \"object\") {\r\n result = this.internalParseCardObject(parent, fallback, forbiddenTypes, true, createInstanceCallback, logParseEvent);\r\n }\r\n }\r\n }\r\n this._forbiddenTypes = oldForbiddenTypes_1;\r\n }\r\n return result;\r\n };\r\n SerializationContext.prototype.cardObjectParsed = function (o, source) {\r\n if (o instanceof Action && this.onParseAction) {\r\n this.onParseAction(o, source, this);\r\n }\r\n else if (o instanceof CardElement && this.onParseElement) {\r\n this.onParseElement(o, source, this);\r\n }\r\n };\r\n SerializationContext.prototype.shouldSerialize = function (o) {\r\n if (o instanceof Action) {\r\n return this.actionRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n }\r\n else if (o instanceof CardElement) {\r\n return this.elementRegistry.findByName(o.getJsonTypeName()) !== undefined;\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n SerializationContext.prototype.parseCardObject = function (parent, source, forbiddenTypeNames, allowFallback, createInstanceCallback, logParseEvent) {\r\n var forbiddenTypes = new Set(forbiddenTypeNames);\r\n var result = this.internalParseCardObject(parent, source, forbiddenTypes, allowFallback, createInstanceCallback, logParseEvent);\r\n if (result !== undefined) {\r\n this.cardObjectParsed(result, source);\r\n }\r\n return result;\r\n };\r\n SerializationContext.prototype.parseElement = function (parent, source, forbiddenTypes, allowFallback) {\r\n var _this = this;\r\n return this.parseCardObject(parent, source, forbiddenTypes, allowFallback, function (typeName) {\r\n return _this.elementRegistry.createInstance(typeName, _this.targetVersion);\r\n }, function (typeName, errorType) {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownElementType, strings_1.Strings.errors.unknownElementType(typeName));\r\n }\r\n else {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n }\r\n });\r\n };\r\n SerializationContext.prototype.parseAction = function (parent, source, forbiddenActionTypes, allowFallback) {\r\n var _this = this;\r\n return this.parseCardObject(parent, source, forbiddenActionTypes, allowFallback, function (typeName) {\r\n return _this.actionRegistry.createInstance(typeName, _this.targetVersion);\r\n }, function (typeName, errorType) {\r\n if (errorType === Enums.TypeErrorType.UnknownType) {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.UnknownActionType, strings_1.Strings.errors.unknownActionType(typeName));\r\n }\r\n else {\r\n _this.logParseEvent(undefined, Enums.ValidationEvent.ActionTypeNotAllowed, strings_1.Strings.errors.actionTypeNotAllowed(typeName));\r\n }\r\n });\r\n };\r\n Object.defineProperty(SerializationContext.prototype, \"elementRegistry\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._elementRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.elements;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n SerializationContext.prototype.setElementRegistry = function (value) {\r\n this._elementRegistry = value;\r\n };\r\n Object.defineProperty(SerializationContext.prototype, \"actionRegistry\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._actionRegistry) !== null && _a !== void 0 ? _a : registry_1.GlobalRegistry.actions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Not using a property setter here because the setter should accept \"undefined\"\r\n // whereas the getter should never return undefined.\r\n SerializationContext.prototype.setActionRegistry = function (value) {\r\n this._actionRegistry = value;\r\n };\r\n return SerializationContext;\r\n}(serialization_1.BaseSerializationContext));\r\nexports.SerializationContext = SerializationContext;\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Container\", Container);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"TextBlock\", TextBlock);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"RichTextBlock\", RichTextBlock, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"TextRun\", TextRun, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Image\", Image);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"ImageSet\", ImageSet);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Media\", Media, serialization_1.Versions.v1_1);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"FactSet\", FactSet);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"ColumnSet\", ColumnSet);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"ActionSet\", ActionSet, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Text\", TextInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Date\", DateInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Time\", TimeInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Number\", NumberInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.ChoiceSet\", ChoiceSetInput);\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Input.Toggle\", ToggleInput);\r\nregistry_1.GlobalRegistry.defaultActions.register(OpenUrlAction.JsonTypeName, OpenUrlAction);\r\nregistry_1.GlobalRegistry.defaultActions.register(SubmitAction.JsonTypeName, SubmitAction);\r\nregistry_1.GlobalRegistry.defaultActions.register(ShowCardAction.JsonTypeName, ShowCardAction);\r\nregistry_1.GlobalRegistry.defaultActions.register(ToggleVisibilityAction.JsonTypeName, ToggleVisibilityAction, serialization_1.Versions.v1_2);\r\nregistry_1.GlobalRegistry.defaultActions.register(ExecuteAction.JsonTypeName, ExecuteAction, serialization_1.Versions.v1_4);\r\n//# sourceMappingURL=card-elements.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CardObject = exports.ValidationResults = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar strings_1 = require(\"./strings\");\r\nvar shared_1 = require(\"./shared\");\r\nvar host_capabilities_1 = require(\"./host-capabilities\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar ValidationResults = /** @class */ (function () {\r\n function ValidationResults() {\r\n this.allIds = {};\r\n this.validationEvents = [];\r\n }\r\n ValidationResults.prototype.addFailure = function (cardObject, event, message) {\r\n this.validationEvents.push({\r\n phase: Enums.ValidationPhase.Validation,\r\n source: cardObject,\r\n event: event,\r\n message: message\r\n });\r\n };\r\n return ValidationResults;\r\n}());\r\nexports.ValidationResults = ValidationResults;\r\nvar CardObject = /** @class */ (function (_super) {\r\n __extends(CardObject, _super);\r\n function CardObject() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n //#endregion\r\n _this._shouldFallback = false;\r\n return _this;\r\n }\r\n CardObject.prototype.getSchemaKey = function () {\r\n return this.getJsonTypeName();\r\n };\r\n Object.defineProperty(CardObject.prototype, \"requires\", {\r\n get: function () {\r\n return this.getValue(CardObject.requiresProperty);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if this CardObject contains the given DOM Node.\r\n * @param node The DOM Node to look for.\r\n * @returns `true` if the DOM Node was found, `false` otherwise.\r\n */\r\n CardObject.prototype.contains = function (node) {\r\n if (this._renderedElement) {\r\n return this._renderedElement.contains(node);\r\n }\r\n return false;\r\n };\r\n CardObject.prototype.preProcessPropertyValue = function (prop, propertyValue) {\r\n var value = propertyValue === undefined ? this.getValue(prop) : propertyValue;\r\n if (shared_1.GlobalSettings.allowPreProcessingPropertyValues) {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n var currentObject = this;\r\n while (currentObject && !currentObject.onPreProcessPropertyValue) {\r\n currentObject = currentObject.parent;\r\n }\r\n if (currentObject && currentObject.onPreProcessPropertyValue) {\r\n return currentObject.onPreProcessPropertyValue(this, prop, value);\r\n }\r\n }\r\n return value;\r\n };\r\n CardObject.prototype.setParent = function (value) {\r\n this._parent = value;\r\n };\r\n CardObject.prototype.setShouldFallback = function (value) {\r\n this._shouldFallback = value;\r\n };\r\n CardObject.prototype.shouldFallback = function () {\r\n return this._shouldFallback || !this.requires.areAllMet(this.hostConfig.hostCapabilities);\r\n };\r\n CardObject.prototype.getRootObject = function () {\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n var currentObject = this;\r\n while (currentObject.parent) {\r\n currentObject = currentObject.parent;\r\n }\r\n return currentObject;\r\n };\r\n CardObject.prototype.internalValidateProperties = function (context) {\r\n if (this.id) {\r\n if (context.allIds.hasOwnProperty(this.id)) {\r\n if (context.allIds[this.id] === 1) {\r\n context.addFailure(this, Enums.ValidationEvent.DuplicateId, strings_1.Strings.errors.duplicateId(this.id));\r\n }\r\n context.allIds[this.id] += 1;\r\n }\r\n else {\r\n context.allIds[this.id] = 1;\r\n }\r\n }\r\n };\r\n CardObject.prototype.validateProperties = function () {\r\n var result = new ValidationResults();\r\n this.internalValidateProperties(result);\r\n return result;\r\n };\r\n /**\r\n * Recursively searches this CardObject and any children to find the\r\n * innermost CardObject that owns the given DOM Node.\r\n *\r\n * @param node The DOM Node to look for.\r\n *\r\n * @returns The owner of the given DOM Node, or `undefined` if no owner was found.\r\n */\r\n CardObject.prototype.findDOMNodeOwner = function (node) {\r\n // default implementation for CardObjects with no associated children\r\n return this.contains(node) ? this : undefined;\r\n };\r\n CardObject.prototype.releaseDOMResources = function () {\r\n // Do nothing in base implementation\r\n };\r\n Object.defineProperty(CardObject.prototype, \"parent\", {\r\n get: function () {\r\n return this._parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CardObject.prototype, \"renderedElement\", {\r\n get: function () {\r\n return this._renderedElement;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CardObject.typeNameProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"type\", undefined, undefined, undefined, function (sender) {\r\n return sender.getJsonTypeName();\r\n });\r\n CardObject.idProperty = new serialization_1.StringProperty(serialization_1.Versions.v1_0, \"id\");\r\n CardObject.requiresProperty = new serialization_1.SerializableObjectProperty(serialization_1.Versions.v1_2, \"requires\", host_capabilities_1.HostCapabilities, false, new host_capabilities_1.HostCapabilities());\r\n __decorate([\r\n (0, serialization_1.property)(CardObject.idProperty)\r\n ], CardObject.prototype, \"id\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(CardObject.requiresProperty)\r\n ], CardObject.prototype, \"requires\", null);\r\n return CardObject;\r\n}(serialization_1.SerializableObject));\r\nexports.CardObject = CardObject;\r\n//# sourceMappingURL=card-object.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CarouselEvent = exports.Carousel = exports.CarouselPage = void 0;\r\n// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar card_elements_1 = require(\"./card-elements\");\r\nvar Enums = require(\"./enums\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar registry_1 = require(\"./registry\");\r\nvar enums_1 = require(\"./enums\");\r\nvar strings_1 = require(\"./strings\");\r\nvar swiper_1 = require(\"swiper\");\r\nvar Utils = require(\"./utils\");\r\nvar shared_1 = require(\"./shared\");\r\n// Note: to function correctly, consumers need to have CSS from swiper/css, swiper/css/pagination, and\r\n// swiper/css/navigation\r\nvar CarouselPage = /** @class */ (function (_super) {\r\n __extends(CarouselPage, _super);\r\n function CarouselPage() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#region Schema\r\n CarouselPage.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n // `style`, `bleed`, `isVisible` are not supported in CarouselPage\r\n schema.remove(card_elements_1.Container.styleProperty);\r\n schema.remove(card_elements_1.Container.bleedProperty);\r\n schema.remove(card_elements_1.Container.isVisibleProperty);\r\n };\r\n //#endregion\r\n CarouselPage.prototype.internalRender = function () {\r\n var carouselSlide = document.createElement(\"div\");\r\n carouselSlide.className = this.hostConfig.makeCssClassName(\"swiper-slide\");\r\n // `isRtl()` will set the correct value of rtl by reading the value from the parents\r\n this.rtl = this.isRtl();\r\n var renderedElement = _super.prototype.internalRender.call(this);\r\n Utils.appendChild(carouselSlide, renderedElement);\r\n return carouselSlide;\r\n };\r\n CarouselPage.prototype.getForbiddenActionTypes = function () {\r\n return [card_elements_1.ShowCardAction, card_elements_1.ToggleVisibilityAction];\r\n };\r\n CarouselPage.prototype.getForbiddenChildElements = function () {\r\n return this.forbiddenChildElements();\r\n };\r\n CarouselPage.prototype.forbiddenChildElements = function () {\r\n return __spreadArray([\r\n card_elements_1.ToggleVisibilityAction.JsonTypeName,\r\n card_elements_1.ShowCardAction.JsonTypeName,\r\n \"Media\",\r\n \"ActionSet\",\r\n \"Input.Text\",\r\n \"Input.Date\",\r\n \"Input.Time\",\r\n \"Input.Number\",\r\n \"Input.ChoiceSet\",\r\n \"Input.Toggle\",\r\n \"Carousel\"\r\n ], _super.prototype.forbiddenChildElements.call(this), true);\r\n };\r\n CarouselPage.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.setShouldFallback(false);\r\n };\r\n CarouselPage.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n CarouselPage.prototype.getJsonTypeName = function () {\r\n return \"CarouselPage\";\r\n };\r\n Object.defineProperty(CarouselPage.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CarouselPage.prototype, \"hasVisibleSeparator\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return CarouselPage;\r\n}(card_elements_1.Container));\r\nexports.CarouselPage = CarouselPage;\r\nvar Carousel = /** @class */ (function (_super) {\r\n __extends(Carousel, _super);\r\n function Carousel() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.carouselLoop = true;\r\n _this.carouselOrientation = Enums.Orientation.Horizontal;\r\n _this._pages = [];\r\n _this._currentIndex = 0;\r\n _this._previousEventType = Enums.CarouselInteractionEvent.Pagination;\r\n return _this;\r\n }\r\n //#region Schema\r\n Carousel.prototype.populateSchema = function (schema) {\r\n _super.prototype.populateSchema.call(this, schema);\r\n // `style`, `bleed`, `isVisible` are not supported in Carousel\r\n schema.remove(card_elements_1.Container.styleProperty);\r\n schema.remove(card_elements_1.Container.bleedProperty);\r\n schema.remove(card_elements_1.Container.isVisibleProperty);\r\n };\r\n Object.defineProperty(Carousel.prototype, \"timer\", {\r\n get: function () {\r\n var timer = this.getValue(Carousel.timerProperty);\r\n if (timer && timer < this.hostConfig.carousel.minAutoplayDelay) {\r\n console.warn(strings_1.Strings.errors.tooLittleTimeDelay);\r\n timer = this.hostConfig.carousel.minAutoplayDelay;\r\n }\r\n return timer;\r\n },\r\n set: function (value) {\r\n if (value && value < this.hostConfig.carousel.minAutoplayDelay) {\r\n console.warn(strings_1.Strings.errors.tooLittleTimeDelay);\r\n this.setValue(Carousel.timerProperty, this.hostConfig.carousel.minAutoplayDelay);\r\n }\r\n else {\r\n this.setValue(Carousel.timerProperty, value);\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Carousel.prototype, \"initialPageIndex\", {\r\n get: function () {\r\n return this.getValue(Carousel.initialPageProperty);\r\n },\r\n set: function (value) {\r\n if (this.isValidParsedPageIndex(value)) {\r\n this.setValue(Carousel.initialPageProperty, value);\r\n }\r\n else {\r\n console.warn(strings_1.Strings.errors.invalidInitialPageIndex(value));\r\n this.setValue(Carousel.initialPageProperty, 0);\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Carousel.prototype.isValidParsedPageIndex = function (index) {\r\n return this._pages ? this.isValidPageIndex(index, this._pages.length) : false;\r\n };\r\n Carousel.prototype.isValidRenderedPageIndex = function (index) {\r\n return this._renderedPages ? this.isValidPageIndex(index, this._renderedPages.length) : false;\r\n };\r\n Carousel.prototype.isValidPageIndex = function (index, collectionSize) {\r\n return (collectionSize > 0 && 0 <= index && index < collectionSize);\r\n };\r\n Object.defineProperty(Carousel.prototype, \"previousEventType\", {\r\n //#endregion\r\n get: function () {\r\n return this._previousEventType;\r\n },\r\n set: function (eventType) {\r\n this._previousEventType = eventType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Question: Why do we place this on the Carousel instead of the CarouselPage?\r\n Carousel.prototype.forbiddenChildElements = function () {\r\n return __spreadArray([\r\n card_elements_1.ToggleVisibilityAction.JsonTypeName,\r\n card_elements_1.ShowCardAction.JsonTypeName,\r\n \"Media\",\r\n \"ActionSet\",\r\n \"Input.Text\",\r\n \"Input.Date\",\r\n \"Input.Time\",\r\n \"Input.Number\",\r\n \"Input.ChoiceSet\",\r\n \"Input.Toggle\"\r\n ], _super.prototype.forbiddenChildElements.call(this), true);\r\n };\r\n Carousel.prototype.adjustRenderedElementSize = function (renderedElement) {\r\n _super.prototype.adjustRenderedElementSize.call(this, renderedElement);\r\n if (this.height == \"stretch\" && this._containerForAdorners !== undefined) {\r\n this._containerForAdorners.style.height = \"100%\";\r\n }\r\n // Assign the explicit height to carouselPageContainer if given\r\n if (this.carouselHeight) {\r\n this._carouselPageContainer.style.height = this.carouselHeight + \"px\";\r\n }\r\n };\r\n Carousel.prototype.getJsonTypeName = function () {\r\n return \"Carousel\";\r\n };\r\n Carousel.prototype.getItemCount = function () {\r\n return this._pages.length;\r\n };\r\n Carousel.prototype.getItemAt = function (index) {\r\n return this._pages[index];\r\n };\r\n Carousel.prototype.addPage = function (page) {\r\n this._pages.push(page);\r\n page.setParent(this);\r\n };\r\n Carousel.prototype.removeItem = function (item) {\r\n if (item instanceof CarouselPage) {\r\n var itemIndex = this._pages.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._pages.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Carousel.prototype.getFirstVisibleRenderedItem = function () {\r\n var _a;\r\n if (this.renderedElement && ((_a = this._renderedPages) === null || _a === void 0 ? void 0 : _a.length) > 0) {\r\n return this._renderedPages[0];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n Carousel.prototype.getLastVisibleRenderedItem = function () {\r\n var _a;\r\n if (this.renderedElement && ((_a = this._renderedPages) === null || _a === void 0 ? void 0 : _a.length) > 0) {\r\n return this._renderedPages[this._renderedPages.length - 1];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n Object.defineProperty(Carousel.prototype, \"currentPageId\", {\r\n get: function () {\r\n var _a, _b;\r\n if ((_b = (_a = this._carousel) === null || _a === void 0 ? void 0 : _a.slides) === null || _b === void 0 ? void 0 : _b.length) {\r\n var activeSlide = this._carousel.slides[this._carousel.activeIndex];\r\n return activeSlide.id;\r\n }\r\n return undefined;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Carousel.prototype, \"currentPageIndex\", {\r\n get: function () {\r\n var _a;\r\n return (_a = this._carousel) === null || _a === void 0 ? void 0 : _a.realIndex;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Carousel.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._pages = [];\r\n var jsonPages = source[\"pages\"];\r\n if (Array.isArray(jsonPages)) {\r\n for (var _i = 0, jsonPages_1 = jsonPages; _i < jsonPages_1.length; _i++) {\r\n var item = jsonPages_1[_i];\r\n var page = this.createCarouselPageInstance(item, context);\r\n if (page) {\r\n this._pages.push(page);\r\n }\r\n }\r\n }\r\n // everything is parsed do validate on initial page index\r\n this.validateParsing(context);\r\n };\r\n Carousel.prototype.validateParsing = function (context) {\r\n if (!this.isValidParsedPageIndex(this.initialPageIndex)) {\r\n context.logParseEvent(this, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidInitialPageIndex(this.initialPageIndex));\r\n }\r\n };\r\n Carousel.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n context.serializeArray(target, \"pages\", this._pages);\r\n };\r\n Carousel.prototype.internalRender = function () {\r\n var _a;\r\n this._renderedPages = [];\r\n if (this._pages.length <= 0) {\r\n return undefined;\r\n }\r\n this.validateOrientationProperties();\r\n var cardLevelContainer = document.createElement(\"div\");\r\n cardLevelContainer.className = this.hostConfig.makeCssClassName(\"ac-carousel-card-level-container\");\r\n var carouselContainer = document.createElement(\"div\");\r\n carouselContainer.className = this.hostConfig.makeCssClassName(\"swiper\", \"ac-carousel\");\r\n this._carouselPageContainer = carouselContainer;\r\n var containerForAdorners = document.createElement(\"div\");\r\n containerForAdorners.className = this.hostConfig.makeCssClassName(\"ac-carousel-container\");\r\n this._containerForAdorners = containerForAdorners;\r\n cardLevelContainer.appendChild(containerForAdorners);\r\n var carouselWrapper = document.createElement(\"div\");\r\n carouselWrapper.className = this.hostConfig.makeCssClassName(\"swiper-wrapper\", \"ac-carousel-card-container\");\r\n carouselWrapper.style.display = \"flex\";\r\n switch (this.getEffectiveVerticalContentAlignment()) {\r\n case Enums.VerticalAlignment.Top:\r\n carouselWrapper.style.alignItems = \"flex-start\";\r\n break;\r\n case Enums.VerticalAlignment.Bottom:\r\n carouselWrapper.style.alignItems = \"flex-end\";\r\n break;\r\n default:\r\n carouselWrapper.style.alignItems = \"center\";\r\n break;\r\n }\r\n if (shared_1.GlobalSettings.useAdvancedCardBottomTruncation) {\r\n // Forces the container to be at least as tall as its content.\r\n //\r\n // Fixes a quirk in Chrome where, for nested flex elements, the\r\n // inner element's height would never exceed the outer element's\r\n // height. This caused overflow truncation to break -- containers\r\n // would always be measured as not overflowing, since their heights\r\n // were constrained by their parents as opposed to truly reflecting\r\n // the height of their content.\r\n //\r\n // See the \"Browser Rendering Notes\" section of this answer:\r\n // https://stackoverflow.com/questions/36247140/why-doesnt-flex-item-shrink-past-content-size\r\n carouselWrapper.style.minHeight = \"-webkit-min-content\";\r\n }\r\n var navigationContainer = document.createElement(\"div\");\r\n navigationContainer.className = this.hostConfig.makeCssClassName(\"ac-carousel-navigation\");\r\n var prevElementDiv = document.createElement(\"div\");\r\n prevElementDiv.className = this.hostConfig.makeCssClassName(\"swiper-button-prev\");\r\n var nextElementDiv = document.createElement(\"div\");\r\n nextElementDiv.className = this.hostConfig.makeCssClassName(\"swiper-button-next\");\r\n if (this.carouselOrientation === Enums.Orientation.Horizontal) {\r\n this.updateCssForHorizontalCarousel(prevElementDiv, nextElementDiv);\r\n }\r\n else {\r\n this.updateCssForVerticalCarousel(navigationContainer, prevElementDiv, nextElementDiv);\r\n }\r\n var pagination = document.createElement(\"div\");\r\n pagination.className = this.hostConfig.makeCssClassName(\"swiper-pagination\", \"ac-carousel-pagination\");\r\n navigationContainer.appendChild(prevElementDiv);\r\n Utils.addCancelSelectActionEventHandler(prevElementDiv);\r\n navigationContainer.appendChild(pagination);\r\n Utils.addCancelSelectActionEventHandler(pagination);\r\n navigationContainer.appendChild(nextElementDiv);\r\n Utils.addCancelSelectActionEventHandler(nextElementDiv);\r\n if (this.isDesignMode()) {\r\n // If we are in design mode, we need to ensure these elements are in front of the peers\r\n prevElementDiv.style.zIndex = \"20\";\r\n nextElementDiv.style.zIndex = \"20\";\r\n pagination.style.zIndex = \"20\";\r\n }\r\n var requestedNumberOfPages = Math.min(this._pages.length, this.hostConfig.carousel.maxCarouselPages);\r\n if (this._pages.length > this.hostConfig.carousel.maxCarouselPages) {\r\n console.warn(strings_1.Strings.errors.tooManyCarouselPages);\r\n }\r\n if (this._pages.length > 0) {\r\n for (var i = 0; i < requestedNumberOfPages; i++) {\r\n var page = this._pages[i];\r\n var renderedItem = this.isElementAllowed(page) ? page.render() : undefined;\r\n renderedItem === null || renderedItem === void 0 ? void 0 : renderedItem.classList.add(\"ac-carousel-page\");\r\n (_a = renderedItem === null || renderedItem === void 0 ? void 0 : renderedItem.children[0]) === null || _a === void 0 ? void 0 : _a.classList.add(\"ac-carousel-page-container\");\r\n if (renderedItem) {\r\n Utils.appendChild(carouselWrapper, renderedItem);\r\n this._renderedPages.push(page);\r\n }\r\n }\r\n }\r\n carouselContainer.appendChild(carouselWrapper);\r\n carouselContainer.tabIndex = this.isDesignMode() ? -1 : 0;\r\n containerForAdorners.appendChild(carouselContainer);\r\n containerForAdorners.appendChild(navigationContainer);\r\n // `isRtl()` will set the correct value of rtl by reading the value from the parents\r\n this.rtl = this.isRtl();\r\n this.applyRTL(pagination);\r\n if (!this.isDesignMode()) {\r\n if (this.isValidRenderedPageIndex(this.initialPageIndex)) {\r\n this._currentIndex = this.initialPageIndex;\r\n }\r\n else {\r\n console.warn(strings_1.Strings.errors.invalidInitialPageIndex(this.initialPageIndex));\r\n this._currentIndex = 0;\r\n }\r\n }\r\n this.initializeCarouselControl(carouselContainer, nextElementDiv, prevElementDiv, pagination, this.rtl);\r\n return this._renderedPages.length > 0 ? cardLevelContainer : undefined;\r\n };\r\n Carousel.prototype.applyRTL = function (pagination) {\r\n _super.prototype.applyRTL.call(this, this._carouselPageContainer);\r\n if (this.rtl) {\r\n pagination.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-pagination-rtl\"));\r\n }\r\n };\r\n Carousel.prototype.validateOrientationProperties = function () {\r\n if (!this.carouselHeight) {\r\n this.carouselOrientation = Enums.Orientation.Horizontal;\r\n }\r\n };\r\n Carousel.prototype.updateCssForHorizontalCarousel = function (prevElementDiv, nextElementDiv) {\r\n prevElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-left\"));\r\n nextElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-right\"));\r\n };\r\n Carousel.prototype.updateCssForVerticalCarousel = function (navigationContainer, prevElementDiv, nextElementDiv) {\r\n this._containerForAdorners.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-container-vertical\"));\r\n navigationContainer.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-navigation-vertical\"));\r\n prevElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-up\"));\r\n nextElementDiv.classList.add(this.hostConfig.makeCssClassName(\"ac-carousel-down\"));\r\n };\r\n Carousel.prototype.initializeCarouselControl = function (carouselContainer, nextElement, prevElement, paginationElement, rtl) {\r\n var _this = this;\r\n var _a, _b, _c;\r\n var nextElementAdjustedForRtl = (rtl === undefined || !rtl ? nextElement : prevElement);\r\n var prevElementAdjustedForRtl = (rtl === undefined || !rtl ? prevElement : nextElement);\r\n var prevElementAdjustedForOrientation = (Enums.Orientation.Horizontal === this.carouselOrientation) ? prevElementAdjustedForRtl : prevElement;\r\n var nextElementAdjustedForOrientation = (Enums.Orientation.Horizontal === this.carouselOrientation) ? nextElementAdjustedForRtl : nextElement;\r\n var swiperOptions = {\r\n loop: !this.isDesignMode() && this.carouselLoop,\r\n modules: [swiper_1.Navigation, swiper_1.Pagination, swiper_1.Scrollbar, swiper_1.A11y, swiper_1.History, swiper_1.Keyboard],\r\n pagination: {\r\n el: paginationElement,\r\n clickable: true\r\n },\r\n navigation: {\r\n prevEl: prevElementAdjustedForOrientation,\r\n nextEl: nextElementAdjustedForOrientation\r\n },\r\n a11y: {\r\n enabled: true\r\n },\r\n keyboard: {\r\n enabled: false,\r\n onlyInViewport: true\r\n },\r\n direction: this.carouselOrientation === Enums.Orientation.Horizontal ? \"horizontal\" : \"vertical\",\r\n resizeObserver: false,\r\n initialSlide: this._currentIndex\r\n };\r\n if (this.timer && !this.isDesignMode()) {\r\n (_a = swiperOptions.modules) === null || _a === void 0 ? void 0 : _a.push(swiper_1.Autoplay);\r\n swiperOptions.autoplay = { delay: this.timer, pauseOnMouseEnter: true };\r\n }\r\n var carousel = new swiper_1.Swiper(carouselContainer, swiperOptions);\r\n // While the 'pauseOnMouseEnter' option should resume autoplay on\r\n // mouse exit it doesn't do it, so adding custom events to handle it\r\n carouselContainer.addEventListener(\"mouseenter\", function (_event) {\r\n var _a;\r\n (_a = carousel.autoplay) === null || _a === void 0 ? void 0 : _a.stop();\r\n });\r\n carouselContainer.addEventListener(\"mouseleave\", function (_event) {\r\n var _a;\r\n (_a = carousel.autoplay) === null || _a === void 0 ? void 0 : _a.start();\r\n });\r\n carousel.on('navigationNext', function (swiper) {\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.NavigationNext);\r\n });\r\n carousel.on('navigationPrev', function (swiper) {\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.NavigationPrevious);\r\n });\r\n carousel.on('slideChangeTransitionEnd', function (swiper) {\r\n _this.currentIndex = swiper.realIndex;\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.Pagination);\r\n });\r\n carousel.on('autoplay', function () {\r\n _this.raiseCarouselEvent(Enums.CarouselInteractionEvent.Autoplay);\r\n });\r\n carousel.on('paginationRender', function (swiper, paginationEl) {\r\n swiper.pagination.bullets.forEach(function (bullet, index) {\r\n bullet.addEventListener(\"keypress\", function (event) {\r\n if (event.key == \"Enter\") {\r\n event.preventDefault();\r\n swiper.slideTo(index + 1);\r\n }\r\n });\r\n });\r\n });\r\n carousel.on('destroy', function () {\r\n _this.destroyResizeObserver();\r\n });\r\n prevElement.title = (_b = prevElement.ariaLabel) !== null && _b !== void 0 ? _b : strings_1.Strings.defaults.carouselNavigationPreviousTooltip();\r\n nextElement.title = (_c = nextElement.ariaLabel) !== null && _c !== void 0 ? _c : strings_1.Strings.defaults.carouselNavigationNextTooltip();\r\n this._carousel = carousel;\r\n this.createResizeObserver();\r\n };\r\n Carousel.prototype.createCarouselPageInstance = function (source, context) {\r\n return context.parseCardObject(this, source, this.forbiddenChildElements(), !this.isDesignMode(), function (typeName) {\r\n return !typeName || typeName === \"CarouselPage\" ? new CarouselPage() : undefined;\r\n }, function (typeName, _errorType) {\r\n context.logParseEvent(undefined, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n });\r\n };\r\n Carousel.prototype.slideTo = function (index) {\r\n var _a;\r\n (_a = this._carousel) === null || _a === void 0 ? void 0 : _a.slideTo(index);\r\n };\r\n Object.defineProperty(Carousel.prototype, \"carouselPageContainer\", {\r\n get: function () {\r\n return this._carouselPageContainer;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Carousel.prototype, \"currentIndex\", {\r\n get: function () {\r\n return this._currentIndex;\r\n },\r\n set: function (currentIndex) {\r\n this._currentIndex = currentIndex;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Carousel.prototype.createCarouselEvent = function (type) {\r\n var currentPageId;\r\n if (this.currentPageIndex != undefined) {\r\n currentPageId = this.getItemAt(this.currentPageIndex).id;\r\n }\r\n return new CarouselEvent(type, this.id, currentPageId, this.currentPageIndex);\r\n };\r\n Carousel.prototype.raiseCarouselEvent = function (eventType) {\r\n var card = this.parent ? this.parent.getRootElement() : undefined;\r\n var onCarouselEventHandler = card && card.onCarouselEvent\r\n ? card.onCarouselEvent\r\n : card_elements_1.AdaptiveCard.onCarouselEvent;\r\n // pagination event is triggered on slide transition end event \r\n if (onCarouselEventHandler && eventType == Enums.CarouselInteractionEvent.Pagination) {\r\n // returns the event type that causes slide transition\r\n onCarouselEventHandler(this.createCarouselEvent(this.previousEventType));\r\n }\r\n this.previousEventType = eventType;\r\n };\r\n /// Swiper version 8 added requestAnimationFrame() call in its resize observer code\r\n /// The new call causes flickering issue,\r\n /// We've copied resize observer code from Swiper version 7 with some modifications\r\n Carousel.prototype.createResizeObserver = function () {\r\n var _this = this;\r\n var _a;\r\n if (!this.checkIfCarouselInValidStateForResizeEvent()) {\r\n return;\r\n }\r\n this._observer = new ResizeObserver(function (entries) {\r\n var _a, _b, _c, _d;\r\n var width = (_a = _this._carousel) === null || _a === void 0 ? void 0 : _a.width;\r\n var height = (_b = _this._carousel) === null || _b === void 0 ? void 0 : _b.height;\r\n var newWidth = width;\r\n var newHeight = height;\r\n entries.forEach(function (_a) {\r\n var _b;\r\n var contentBoxSize = _a.contentBoxSize, contentRect = _a.contentRect, target = _a.target;\r\n if (target && target !== ((_b = _this._carousel) === null || _b === void 0 ? void 0 : _b.el)) {\r\n return;\r\n }\r\n newWidth = contentRect\r\n ? contentRect.width\r\n : (contentBoxSize[0] || contentBoxSize).inlineSize;\r\n newHeight = contentRect\r\n ? contentRect.height\r\n : (contentBoxSize[0] || contentBoxSize).blockSize;\r\n });\r\n if (newWidth !== width || newHeight !== height) {\r\n if (_this.checkIfCarouselInValidStateForResizeEvent()) {\r\n (_c = _this._carousel) === null || _c === void 0 ? void 0 : _c.emit('beforeResize');\r\n (_d = _this._carousel) === null || _d === void 0 ? void 0 : _d.emit('resize');\r\n }\r\n }\r\n });\r\n this._observer.observe((_a = this._carousel) === null || _a === void 0 ? void 0 : _a.el);\r\n };\r\n Carousel.prototype.destroyResizeObserver = function () {\r\n var _a;\r\n if (this._observer && this._observer.unobserve && ((_a = this._carousel) === null || _a === void 0 ? void 0 : _a.el)) {\r\n this._observer.unobserve(this._carousel.el);\r\n this._observer = null;\r\n }\r\n };\r\n ;\r\n Carousel.prototype.checkIfCarouselInValidStateForResizeEvent = function () {\r\n return this._carousel && !this._carousel.destroyed;\r\n };\r\n Carousel.timerProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"timer\", undefined);\r\n Carousel.initialPageProperty = new serialization_1.NumProperty(serialization_1.Versions.v1_6, \"initialPage\", 0);\r\n Carousel.loopProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_6, \"loop\", true);\r\n Carousel.orientationProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_6, \"orientation\", Enums.Orientation, Enums.Orientation.Horizontal);\r\n Carousel.carouselHeightProperty = new serialization_1.PixelSizeProperty(serialization_1.Versions.v1_6, \"heightInPixels\");\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.timerProperty)\r\n ], Carousel.prototype, \"timer\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.initialPageProperty)\r\n ], Carousel.prototype, \"initialPageIndex\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.loopProperty)\r\n ], Carousel.prototype, \"carouselLoop\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.orientationProperty)\r\n ], Carousel.prototype, \"carouselOrientation\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Carousel.carouselHeightProperty)\r\n ], Carousel.prototype, \"carouselHeight\", void 0);\r\n return Carousel;\r\n}(card_elements_1.Container));\r\nexports.Carousel = Carousel;\r\nvar CarouselEvent = /** @class */ (function () {\r\n function CarouselEvent(type, carouselId, activeCarouselPageId, activeCarouselPageIndex) {\r\n this.type = type;\r\n this.carouselId = carouselId;\r\n this.activeCarouselPageId = activeCarouselPageId;\r\n this.activeCarouselPageIndex = activeCarouselPageIndex;\r\n }\r\n return CarouselEvent;\r\n}());\r\nexports.CarouselEvent = CarouselEvent;\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Carousel\", Carousel, serialization_1.Versions.v1_6);\r\n//# sourceMappingURL=carousel.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ChannelAdapter = void 0;\r\nvar ChannelAdapter = /** @class */ (function () {\r\n function ChannelAdapter() {\r\n }\r\n return ChannelAdapter;\r\n}());\r\nexports.ChannelAdapter = ChannelAdapter;\r\n//# sourceMappingURL=channel-adapter.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Collection = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Collection = /** @class */ (function () {\r\n function Collection() {\r\n this._items = [];\r\n }\r\n Collection.prototype.get = function (index) {\r\n return this._items[index];\r\n };\r\n Collection.prototype.add = function (item) {\r\n this._items.push(item);\r\n if (this.onItemAdded) {\r\n this.onItemAdded(item);\r\n }\r\n };\r\n Collection.prototype.remove = function (item) {\r\n var i = this._items.indexOf(item);\r\n if (i >= 0) {\r\n this._items = this._items.splice(i, 1);\r\n if (this.onItemRemoved) {\r\n this.onItemRemoved(item);\r\n }\r\n }\r\n };\r\n Collection.prototype.indexOf = function (item) {\r\n return this._items.indexOf(item);\r\n };\r\n Object.defineProperty(Collection.prototype, \"length\", {\r\n get: function () {\r\n return this._items.length;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return Collection;\r\n}());\r\nexports.Collection = Collection;\r\n//# sourceMappingURL=collection.js.map","\"use strict\";\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Constants = void 0;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar Constants = /** @class */ (function () {\r\n function Constants() {\r\n }\r\n Constants.keys = {\r\n tab: \"Tab\",\r\n enter: \"Enter\",\r\n escape: \"Escape\",\r\n space: \" \",\r\n up: \"ArrowUp\",\r\n down: \"ArrowDown\",\r\n delete: \"Delete\"\r\n };\r\n return Constants;\r\n}());\r\nexports.Constants = Constants;\r\n//# sourceMappingURL=constants.js.map","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// Copyright (C) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n__exportStar(require(\"./menu-item\"), exports);\r\n__exportStar(require(\"./popup-menu\"), exports);\r\n//# sourceMappingURL=index.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.MenuItem = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar host_config_1 = require(\"../host-config\");\r\nvar constants_1 = require(\"./constants\");\r\nvar MenuItem = /** @class */ (function () {\r\n function MenuItem(key, value) {\r\n this._isEnabled = true;\r\n this.key = key;\r\n this._value = value;\r\n }\r\n MenuItem.prototype.click = function () {\r\n if (this.isEnabled && this.onClick) {\r\n this.onClick(this);\r\n }\r\n };\r\n MenuItem.prototype.updateCssClasses = function () {\r\n if (this._element) {\r\n var effectiveHostConfig = this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\r\n this._element.className = effectiveHostConfig.makeCssClassName(\"ac-ctrl\");\r\n this._element.classList.add(effectiveHostConfig.makeCssClassName(this.isEnabled ? \"ac-ctrl-dropdown-item\" : \"ac-ctrl-dropdown-item-disabled\"));\r\n if (!this.isEnabled) {\r\n this._element.classList.add(effectiveHostConfig.makeCssClassName(\"ac-disabled\"));\r\n }\r\n }\r\n };\r\n MenuItem.prototype.toString = function () {\r\n return this.value;\r\n };\r\n MenuItem.prototype.render = function (hostConfig) {\r\n var _this = this;\r\n this._hostConfig = hostConfig;\r\n if (!this._element) {\r\n this._element = document.createElement(\"span\");\r\n this._element.innerText = this.value;\r\n this._element.setAttribute(\"role\", \"menuitem\");\r\n if (!this.isEnabled) {\r\n this._element.setAttribute(\"aria-disabled\", \"true\");\r\n }\r\n this._element.setAttribute(\"aria-current\", \"false\");\r\n this._element.onmouseup = function (_e) {\r\n _this.click();\r\n };\r\n this._element.onkeydown = function (e) {\r\n if (e.key === constants_1.Constants.keys.enter) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n _this.click();\r\n }\r\n };\r\n this.updateCssClasses();\r\n }\r\n return this._element;\r\n };\r\n Object.defineProperty(MenuItem.prototype, \"value\", {\r\n get: function () {\r\n return this._value;\r\n },\r\n set: function (newValue) {\r\n this._value = newValue;\r\n if (this._element) {\r\n this._element.innerText = newValue;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(MenuItem.prototype, \"isEnabled\", {\r\n get: function () {\r\n return this._isEnabled;\r\n },\r\n set: function (value) {\r\n if (this._isEnabled !== value) {\r\n this._isEnabled = value;\r\n this.updateCssClasses();\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return MenuItem;\r\n}());\r\nexports.MenuItem = MenuItem;\r\n//# sourceMappingURL=menu-item.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PopupControl = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar constants_1 = require(\"./constants\");\r\nvar Utils = require(\"../utils\");\r\nvar host_config_1 = require(\"../host-config\");\r\nvar PopupControl = /** @class */ (function () {\r\n function PopupControl() {\r\n this._isOpen = false;\r\n }\r\n PopupControl.prototype.keyDown = function (e) {\r\n switch (e.key) {\r\n case constants_1.Constants.keys.escape:\r\n this.closePopup(true);\r\n break;\r\n }\r\n };\r\n PopupControl.prototype.render = function (_rootElementBounds) {\r\n var _this = this;\r\n var element = document.createElement(\"div\");\r\n element.tabIndex = 0;\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl\", \"ac-ctrl-popup-container\");\r\n element.setAttribute(\"role\", \"dialog\");\r\n element.setAttribute(\"aria-modal\", \"true\");\r\n element.onkeydown = function (e) {\r\n _this.keyDown(e);\r\n return !e.cancelBubble;\r\n };\r\n element.appendChild(this.renderContent());\r\n return element;\r\n };\r\n PopupControl.prototype.focus = function () {\r\n if (this._popupElement) {\r\n this._popupElement.firstElementChild.focus();\r\n }\r\n };\r\n PopupControl.prototype.popup = function (rootElement) {\r\n var _a, _b, _c, _d, _f;\r\n var _this = this;\r\n if (!this._isOpen) {\r\n this._overlayElement = document.createElement(\"div\");\r\n this._overlayElement.className = this.hostConfig.makeCssClassName(\"ac-ctrl-overlay\");\r\n this._overlayElement.tabIndex = 0;\r\n this._overlayElement.style.width = document.documentElement.scrollWidth + \"px\";\r\n this._overlayElement.style.height = document.documentElement.scrollHeight + \"px\";\r\n this._overlayElement.onfocus = function (_e) {\r\n _this.closePopup(true);\r\n };\r\n document.body.appendChild(this._overlayElement);\r\n var rootElementBounds = rootElement.getBoundingClientRect();\r\n this._popupElement = this.render(rootElementBounds);\r\n (_a = this._popupElement.classList).remove.apply(_a, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\", \"ac-ctrl-slideRightToLeft\", \"ac-ctrl-slideTopToBottom\", \"ac-ctrl-slideRightToLeft\"));\r\n window.addEventListener(\"resize\", function (_e) {\r\n _this.closePopup(true);\r\n });\r\n var rootElementLabel = rootElement.getAttribute(\"aria-label\");\r\n if (rootElementLabel) {\r\n this._popupElement.setAttribute(\"aria-label\", rootElementLabel);\r\n }\r\n this._overlayElement.appendChild(this._popupElement);\r\n var popupElementBounds = this._popupElement.getBoundingClientRect();\r\n var availableSpaceBelow = window.innerHeight - rootElementBounds.bottom;\r\n var availableSpaceAbove = rootElementBounds.top;\r\n var availableSpaceRight = window.innerWidth - rootElementBounds.right;\r\n var availableSpaceLeft = rootElementBounds.left;\r\n var left = rootElementBounds.left + Utils.getScrollX();\r\n var top_1;\r\n if (availableSpaceAbove < popupElementBounds.height &&\r\n availableSpaceBelow < popupElementBounds.height) {\r\n // Not enough space above or below root element\r\n var actualPopupHeight = Math.min(popupElementBounds.height, window.innerHeight);\r\n this._popupElement.style.maxHeight = actualPopupHeight + \"px\";\r\n if (actualPopupHeight < popupElementBounds.height) {\r\n top_1 = Utils.getScrollY();\r\n }\r\n else {\r\n top_1 =\r\n Utils.getScrollY() +\r\n rootElementBounds.top +\r\n (rootElementBounds.height - actualPopupHeight) / 2;\r\n }\r\n if (availableSpaceLeft < popupElementBounds.width &&\r\n availableSpaceRight < popupElementBounds.width) {\r\n // Not enough space left or right of root element\r\n var actualPopupWidth = Math.min(popupElementBounds.width, window.innerWidth);\r\n this._popupElement.style.maxWidth = actualPopupWidth + \"px\";\r\n if (actualPopupWidth < popupElementBounds.width) {\r\n left = Utils.getScrollX();\r\n }\r\n else {\r\n left =\r\n Utils.getScrollX() +\r\n rootElementBounds.left +\r\n (rootElementBounds.width - actualPopupWidth) / 2;\r\n }\r\n }\r\n else {\r\n // Enough space on the left or right of the root element\r\n if (availableSpaceRight >= popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right;\r\n (_b = this._popupElement.classList).add.apply(_b, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideLeftToRight\"));\r\n }\r\n else {\r\n left =\r\n Utils.getScrollX() + rootElementBounds.left - popupElementBounds.width;\r\n (_c = this._popupElement.classList).add.apply(_c, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideRightToLeft\"));\r\n }\r\n }\r\n }\r\n else {\r\n // Enough space above or below root element\r\n if (availableSpaceBelow >= popupElementBounds.height) {\r\n top_1 = Utils.getScrollY() + rootElementBounds.bottom;\r\n (_d = this._popupElement.classList).add.apply(_d, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideTopToBottom\"));\r\n }\r\n else {\r\n top_1 = Utils.getScrollY() + rootElementBounds.top - popupElementBounds.height;\r\n (_f = this._popupElement.classList).add.apply(_f, this.hostConfig.makeCssClassNames(\"ac-ctrl-slide\", \"ac-ctrl-slideBottomToTop\"));\r\n }\r\n if (availableSpaceRight < popupElementBounds.width) {\r\n left = Utils.getScrollX() + rootElementBounds.right - popupElementBounds.width;\r\n }\r\n }\r\n this._popupElement.style.left = left + \"px\";\r\n this._popupElement.style.top = top_1 + \"px\";\r\n this._popupElement.focus();\r\n this._isOpen = true;\r\n }\r\n };\r\n PopupControl.prototype.closePopup = function (wasCancelled) {\r\n if (this._isOpen) {\r\n document.body.removeChild(this._overlayElement);\r\n this._isOpen = false;\r\n if (this.onClose) {\r\n this.onClose(this, wasCancelled);\r\n }\r\n }\r\n };\r\n Object.defineProperty(PopupControl.prototype, \"hostConfig\", {\r\n get: function () {\r\n return this._hostConfig ? this._hostConfig : host_config_1.defaultHostConfig;\r\n },\r\n set: function (value) {\r\n this._hostConfig = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(PopupControl.prototype, \"isOpen\", {\r\n get: function () {\r\n return this._isOpen;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return PopupControl;\r\n}());\r\nexports.PopupControl = PopupControl;\r\n//# sourceMappingURL=popup-control.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PopupMenu = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar constants_1 = require(\"./constants\");\r\nvar collection_1 = require(\"./collection\");\r\nvar popup_control_1 = require(\"./popup-control\");\r\nvar PopupMenu = /** @class */ (function (_super) {\r\n __extends(PopupMenu, _super);\r\n function PopupMenu() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._items = new collection_1.Collection();\r\n _this._renderedItems = [];\r\n _this._selectedIndex = -1;\r\n return _this;\r\n }\r\n PopupMenu.prototype.renderContent = function () {\r\n var element = document.createElement(\"div\");\r\n element.className = this.hostConfig.makeCssClassName(\"ac-ctrl ac-popup\");\r\n element.setAttribute(\"role\", \"listbox\");\r\n for (var i = 0; i < this._items.length; i++) {\r\n var renderedItem = this._items.get(i).render(this.hostConfig);\r\n renderedItem.tabIndex = 0;\r\n element.appendChild(renderedItem);\r\n if (i == 0) {\r\n renderedItem.setAttribute(\"aria-expanded\", \"true\");\r\n }\r\n if (i === this.selectedIndex) {\r\n renderedItem.focus();\r\n }\r\n this._renderedItems.push(renderedItem);\r\n }\r\n return element;\r\n };\r\n PopupMenu.prototype.keyDown = function (e) {\r\n _super.prototype.keyDown.call(this, e);\r\n var selectedItemIndex = this._selectedIndex;\r\n switch (e.key) {\r\n case constants_1.Constants.keys.tab:\r\n this.closePopup(true);\r\n break;\r\n /*\r\n case Constants.keys.enter:\r\n if (this.selectedIndex >= 0) {\r\n this.selectedIndex = this.selectedIndex;\r\n\r\n this.close();\r\n }\r\n\r\n break;\r\n */\r\n case constants_1.Constants.keys.up:\r\n if (selectedItemIndex <= 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n }\r\n else {\r\n selectedItemIndex--;\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = this._renderedItems.length - 1;\r\n }\r\n }\r\n this.selectedIndex = selectedItemIndex;\r\n this.removeAriaExpanded(selectedItemIndex);\r\n e.cancelBubble = true;\r\n break;\r\n case constants_1.Constants.keys.down:\r\n if (selectedItemIndex < 0) {\r\n selectedItemIndex = 0;\r\n }\r\n else {\r\n selectedItemIndex++;\r\n if (selectedItemIndex >= this._renderedItems.length) {\r\n selectedItemIndex = 0;\r\n }\r\n this.removeAriaExpanded(selectedItemIndex);\r\n }\r\n this.selectedIndex = selectedItemIndex;\r\n e.cancelBubble = true;\r\n break;\r\n }\r\n };\r\n Object.defineProperty(PopupMenu.prototype, \"items\", {\r\n get: function () {\r\n return this._items;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(PopupMenu.prototype, \"selectedIndex\", {\r\n get: function () {\r\n return this._selectedIndex;\r\n },\r\n set: function (index) {\r\n if (index >= 0 && index < this._renderedItems.length) {\r\n this._renderedItems[index].focus();\r\n this._selectedIndex = index;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // remove aria-expanded attribute from menu item\r\n PopupMenu.prototype.removeAriaExpanded = function (index) {\r\n if (this._renderedItems[index].getAttribute(\"aria-expanded\") === \"true\") {\r\n this._renderedItems[index].removeAttribute(\"aria-expanded\");\r\n }\r\n };\r\n return PopupMenu;\r\n}(popup_control_1.PopupControl));\r\nexports.PopupMenu = PopupMenu;\r\n//# sourceMappingURL=popup-menu.js.map","\"use strict\";\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ActionRole = exports.CarouselInteractionEvent = exports.LogLevel = exports.RefreshMode = exports.TypeErrorType = exports.ContainerFitStatus = exports.ValidationEvent = exports.ValidationPhase = exports.InputLabelPosition = exports.InputTextStyle = exports.ActionIconPlacement = exports.FillMode = exports.Orientation = exports.ShowCardActionMode = exports.ImageStyle = exports.ActionAlignment = exports.VerticalAlignment = exports.HorizontalAlignment = exports.TextColor = exports.Spacing = exports.FontType = exports.TextWeight = exports.InputStyle = exports.TextSize = exports.SizeUnit = exports.ImageSetPresentationStyle = exports.ImageSize = exports.Size = exports.ActionMode = exports.ActionStyle = exports.ContainerStyle = void 0;\r\n/*\r\n This should really be a string enum, e.g.\r\n\r\n export enum ContainerStyle {\r\n Default = \"default\",\r\n Emphasis = \"emphasis\"\r\n }\r\n\r\n However, some hosts do not use a version of TypeScript\r\n recent enough to understand string enums. This is\r\n a compatible construct that does not require using\r\n a more recent version of TypeScript.\r\n\r\n Also note the \"weird\" way these readonly fields are declared is to work around\r\n a breaking change introduced in TS 3.1 wrt d.ts generation. DO NOT CHANGE\r\n and adopt this syntax for all other static readonly fields.\r\n*/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\nvar ContainerStyle = /** @class */ (function () {\r\n function ContainerStyle() {\r\n }\r\n ContainerStyle.Default = \"default\";\r\n ContainerStyle.Emphasis = \"emphasis\";\r\n ContainerStyle.Accent = \"accent\";\r\n ContainerStyle.Good = \"good\";\r\n ContainerStyle.Attention = \"attention\";\r\n ContainerStyle.Warning = \"warning\";\r\n return ContainerStyle;\r\n}());\r\nexports.ContainerStyle = ContainerStyle;\r\nvar ActionStyle = /** @class */ (function () {\r\n function ActionStyle() {\r\n }\r\n ActionStyle.Default = \"default\";\r\n ActionStyle.Positive = \"positive\";\r\n ActionStyle.Destructive = \"destructive\";\r\n return ActionStyle;\r\n}());\r\nexports.ActionStyle = ActionStyle;\r\nvar ActionMode = /** @class */ (function () {\r\n function ActionMode() {\r\n }\r\n ActionMode.Primary = \"primary\";\r\n ActionMode.Secondary = \"secondary\";\r\n return ActionMode;\r\n}());\r\nexports.ActionMode = ActionMode;\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention */\r\nvar Size;\r\n(function (Size) {\r\n Size[Size[\"Auto\"] = 0] = \"Auto\";\r\n Size[Size[\"Stretch\"] = 1] = \"Stretch\";\r\n Size[Size[\"Small\"] = 2] = \"Small\";\r\n Size[Size[\"Medium\"] = 3] = \"Medium\";\r\n Size[Size[\"Large\"] = 4] = \"Large\";\r\n})(Size = exports.Size || (exports.Size = {}));\r\nvar ImageSize;\r\n(function (ImageSize) {\r\n ImageSize[ImageSize[\"Small\"] = 0] = \"Small\";\r\n ImageSize[ImageSize[\"Medium\"] = 1] = \"Medium\";\r\n ImageSize[ImageSize[\"Large\"] = 2] = \"Large\";\r\n})(ImageSize = exports.ImageSize || (exports.ImageSize = {}));\r\nvar ImageSetPresentationStyle;\r\n(function (ImageSetPresentationStyle) {\r\n ImageSetPresentationStyle[ImageSetPresentationStyle[\"Default\"] = 0] = \"Default\";\r\n ImageSetPresentationStyle[ImageSetPresentationStyle[\"Stacked\"] = 1] = \"Stacked\";\r\n})(ImageSetPresentationStyle = exports.ImageSetPresentationStyle || (exports.ImageSetPresentationStyle = {}));\r\nvar SizeUnit;\r\n(function (SizeUnit) {\r\n SizeUnit[SizeUnit[\"Weight\"] = 0] = \"Weight\";\r\n SizeUnit[SizeUnit[\"Pixel\"] = 1] = \"Pixel\";\r\n})(SizeUnit = exports.SizeUnit || (exports.SizeUnit = {}));\r\nvar TextSize;\r\n(function (TextSize) {\r\n TextSize[TextSize[\"Small\"] = 0] = \"Small\";\r\n TextSize[TextSize[\"Default\"] = 1] = \"Default\";\r\n TextSize[TextSize[\"Medium\"] = 2] = \"Medium\";\r\n TextSize[TextSize[\"Large\"] = 3] = \"Large\";\r\n TextSize[TextSize[\"ExtraLarge\"] = 4] = \"ExtraLarge\";\r\n})(TextSize = exports.TextSize || (exports.TextSize = {}));\r\nvar InputStyle;\r\n(function (InputStyle) {\r\n InputStyle[InputStyle[\"RevealOnHover\"] = 0] = \"RevealOnHover\";\r\n InputStyle[InputStyle[\"Default\"] = 1] = \"Default\";\r\n})(InputStyle = exports.InputStyle || (exports.InputStyle = {}));\r\nvar TextWeight;\r\n(function (TextWeight) {\r\n TextWeight[TextWeight[\"Lighter\"] = 0] = \"Lighter\";\r\n TextWeight[TextWeight[\"Default\"] = 1] = \"Default\";\r\n TextWeight[TextWeight[\"Bolder\"] = 2] = \"Bolder\";\r\n})(TextWeight = exports.TextWeight || (exports.TextWeight = {}));\r\nvar FontType;\r\n(function (FontType) {\r\n FontType[FontType[\"Default\"] = 0] = \"Default\";\r\n FontType[FontType[\"Monospace\"] = 1] = \"Monospace\";\r\n})(FontType = exports.FontType || (exports.FontType = {}));\r\nvar Spacing;\r\n(function (Spacing) {\r\n Spacing[Spacing[\"None\"] = 0] = \"None\";\r\n Spacing[Spacing[\"Small\"] = 1] = \"Small\";\r\n Spacing[Spacing[\"Default\"] = 2] = \"Default\";\r\n Spacing[Spacing[\"Medium\"] = 3] = \"Medium\";\r\n Spacing[Spacing[\"Large\"] = 4] = \"Large\";\r\n Spacing[Spacing[\"ExtraLarge\"] = 5] = \"ExtraLarge\";\r\n Spacing[Spacing[\"Padding\"] = 6] = \"Padding\";\r\n})(Spacing = exports.Spacing || (exports.Spacing = {}));\r\nvar TextColor;\r\n(function (TextColor) {\r\n TextColor[TextColor[\"Default\"] = 0] = \"Default\";\r\n TextColor[TextColor[\"Dark\"] = 1] = \"Dark\";\r\n TextColor[TextColor[\"Light\"] = 2] = \"Light\";\r\n TextColor[TextColor[\"Accent\"] = 3] = \"Accent\";\r\n TextColor[TextColor[\"Good\"] = 4] = \"Good\";\r\n TextColor[TextColor[\"Warning\"] = 5] = \"Warning\";\r\n TextColor[TextColor[\"Attention\"] = 6] = \"Attention\";\r\n})(TextColor = exports.TextColor || (exports.TextColor = {}));\r\nvar HorizontalAlignment;\r\n(function (HorizontalAlignment) {\r\n HorizontalAlignment[HorizontalAlignment[\"Left\"] = 0] = \"Left\";\r\n HorizontalAlignment[HorizontalAlignment[\"Center\"] = 1] = \"Center\";\r\n HorizontalAlignment[HorizontalAlignment[\"Right\"] = 2] = \"Right\";\r\n})(HorizontalAlignment = exports.HorizontalAlignment || (exports.HorizontalAlignment = {}));\r\nvar VerticalAlignment;\r\n(function (VerticalAlignment) {\r\n VerticalAlignment[VerticalAlignment[\"Top\"] = 0] = \"Top\";\r\n VerticalAlignment[VerticalAlignment[\"Center\"] = 1] = \"Center\";\r\n VerticalAlignment[VerticalAlignment[\"Bottom\"] = 2] = \"Bottom\";\r\n})(VerticalAlignment = exports.VerticalAlignment || (exports.VerticalAlignment = {}));\r\nvar ActionAlignment;\r\n(function (ActionAlignment) {\r\n ActionAlignment[ActionAlignment[\"Left\"] = 0] = \"Left\";\r\n ActionAlignment[ActionAlignment[\"Center\"] = 1] = \"Center\";\r\n ActionAlignment[ActionAlignment[\"Right\"] = 2] = \"Right\";\r\n ActionAlignment[ActionAlignment[\"Stretch\"] = 3] = \"Stretch\";\r\n})(ActionAlignment = exports.ActionAlignment || (exports.ActionAlignment = {}));\r\nvar ImageStyle;\r\n(function (ImageStyle) {\r\n ImageStyle[ImageStyle[\"Default\"] = 0] = \"Default\";\r\n ImageStyle[ImageStyle[\"Person\"] = 1] = \"Person\";\r\n})(ImageStyle = exports.ImageStyle || (exports.ImageStyle = {}));\r\nvar ShowCardActionMode;\r\n(function (ShowCardActionMode) {\r\n ShowCardActionMode[ShowCardActionMode[\"Inline\"] = 0] = \"Inline\";\r\n ShowCardActionMode[ShowCardActionMode[\"Popup\"] = 1] = \"Popup\";\r\n})(ShowCardActionMode = exports.ShowCardActionMode || (exports.ShowCardActionMode = {}));\r\nvar Orientation;\r\n(function (Orientation) {\r\n Orientation[Orientation[\"Horizontal\"] = 0] = \"Horizontal\";\r\n Orientation[Orientation[\"Vertical\"] = 1] = \"Vertical\";\r\n})(Orientation = exports.Orientation || (exports.Orientation = {}));\r\nvar FillMode;\r\n(function (FillMode) {\r\n FillMode[FillMode[\"Cover\"] = 0] = \"Cover\";\r\n FillMode[FillMode[\"RepeatHorizontally\"] = 1] = \"RepeatHorizontally\";\r\n FillMode[FillMode[\"RepeatVertically\"] = 2] = \"RepeatVertically\";\r\n FillMode[FillMode[\"Repeat\"] = 3] = \"Repeat\";\r\n})(FillMode = exports.FillMode || (exports.FillMode = {}));\r\nvar ActionIconPlacement;\r\n(function (ActionIconPlacement) {\r\n ActionIconPlacement[ActionIconPlacement[\"LeftOfTitle\"] = 0] = \"LeftOfTitle\";\r\n ActionIconPlacement[ActionIconPlacement[\"AboveTitle\"] = 1] = \"AboveTitle\";\r\n})(ActionIconPlacement = exports.ActionIconPlacement || (exports.ActionIconPlacement = {}));\r\nvar InputTextStyle;\r\n(function (InputTextStyle) {\r\n InputTextStyle[InputTextStyle[\"Text\"] = 0] = \"Text\";\r\n InputTextStyle[InputTextStyle[\"Tel\"] = 1] = \"Tel\";\r\n InputTextStyle[InputTextStyle[\"Url\"] = 2] = \"Url\";\r\n InputTextStyle[InputTextStyle[\"Email\"] = 3] = \"Email\";\r\n InputTextStyle[InputTextStyle[\"Password\"] = 4] = \"Password\";\r\n})(InputTextStyle = exports.InputTextStyle || (exports.InputTextStyle = {}));\r\nvar InputLabelPosition;\r\n(function (InputLabelPosition) {\r\n InputLabelPosition[InputLabelPosition[\"Inline\"] = 0] = \"Inline\";\r\n InputLabelPosition[InputLabelPosition[\"Above\"] = 1] = \"Above\";\r\n})(InputLabelPosition = exports.InputLabelPosition || (exports.InputLabelPosition = {}));\r\nvar ValidationPhase;\r\n(function (ValidationPhase) {\r\n ValidationPhase[ValidationPhase[\"Parse\"] = 0] = \"Parse\";\r\n ValidationPhase[ValidationPhase[\"ToJSON\"] = 1] = \"ToJSON\";\r\n ValidationPhase[ValidationPhase[\"Validation\"] = 2] = \"Validation\";\r\n})(ValidationPhase = exports.ValidationPhase || (exports.ValidationPhase = {}));\r\nvar ValidationEvent;\r\n(function (ValidationEvent) {\r\n ValidationEvent[ValidationEvent[\"Hint\"] = 0] = \"Hint\";\r\n ValidationEvent[ValidationEvent[\"ActionTypeNotAllowed\"] = 1] = \"ActionTypeNotAllowed\";\r\n ValidationEvent[ValidationEvent[\"CollectionCantBeEmpty\"] = 2] = \"CollectionCantBeEmpty\";\r\n ValidationEvent[ValidationEvent[\"Deprecated\"] = 3] = \"Deprecated\";\r\n ValidationEvent[ValidationEvent[\"ElementTypeNotAllowed\"] = 4] = \"ElementTypeNotAllowed\";\r\n ValidationEvent[ValidationEvent[\"InteractivityNotAllowed\"] = 5] = \"InteractivityNotAllowed\";\r\n ValidationEvent[ValidationEvent[\"InvalidPropertyValue\"] = 6] = \"InvalidPropertyValue\";\r\n ValidationEvent[ValidationEvent[\"MissingCardType\"] = 7] = \"MissingCardType\";\r\n ValidationEvent[ValidationEvent[\"PropertyCantBeNull\"] = 8] = \"PropertyCantBeNull\";\r\n ValidationEvent[ValidationEvent[\"TooManyActions\"] = 9] = \"TooManyActions\";\r\n ValidationEvent[ValidationEvent[\"UnknownActionType\"] = 10] = \"UnknownActionType\";\r\n ValidationEvent[ValidationEvent[\"UnknownElementType\"] = 11] = \"UnknownElementType\";\r\n ValidationEvent[ValidationEvent[\"UnsupportedCardVersion\"] = 12] = \"UnsupportedCardVersion\";\r\n ValidationEvent[ValidationEvent[\"DuplicateId\"] = 13] = \"DuplicateId\";\r\n ValidationEvent[ValidationEvent[\"UnsupportedProperty\"] = 14] = \"UnsupportedProperty\";\r\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveLabel\"] = 15] = \"RequiredInputsShouldHaveLabel\";\r\n ValidationEvent[ValidationEvent[\"RequiredInputsShouldHaveErrorMessage\"] = 16] = \"RequiredInputsShouldHaveErrorMessage\";\r\n ValidationEvent[ValidationEvent[\"Other\"] = 17] = \"Other\";\r\n})(ValidationEvent = exports.ValidationEvent || (exports.ValidationEvent = {}));\r\nvar ContainerFitStatus;\r\n(function (ContainerFitStatus) {\r\n ContainerFitStatus[ContainerFitStatus[\"FullyInContainer\"] = 0] = \"FullyInContainer\";\r\n ContainerFitStatus[ContainerFitStatus[\"Overflowing\"] = 1] = \"Overflowing\";\r\n ContainerFitStatus[ContainerFitStatus[\"FullyOutOfContainer\"] = 2] = \"FullyOutOfContainer\";\r\n})(ContainerFitStatus = exports.ContainerFitStatus || (exports.ContainerFitStatus = {}));\r\nvar TypeErrorType;\r\n(function (TypeErrorType) {\r\n TypeErrorType[TypeErrorType[\"UnknownType\"] = 0] = \"UnknownType\";\r\n TypeErrorType[TypeErrorType[\"ForbiddenType\"] = 1] = \"ForbiddenType\";\r\n})(TypeErrorType = exports.TypeErrorType || (exports.TypeErrorType = {}));\r\nvar RefreshMode;\r\n(function (RefreshMode) {\r\n RefreshMode[RefreshMode[\"Disabled\"] = 0] = \"Disabled\";\r\n RefreshMode[RefreshMode[\"Manual\"] = 1] = \"Manual\";\r\n RefreshMode[RefreshMode[\"Automatic\"] = 2] = \"Automatic\";\r\n})(RefreshMode = exports.RefreshMode || (exports.RefreshMode = {}));\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Info\"] = 0] = \"Info\";\r\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\r\n LogLevel[LogLevel[\"Error\"] = 2] = \"Error\";\r\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\r\nvar CarouselInteractionEvent;\r\n(function (CarouselInteractionEvent) {\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"NavigationNext\"] = 0] = \"NavigationNext\";\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"NavigationPrevious\"] = 1] = \"NavigationPrevious\";\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"Pagination\"] = 2] = \"Pagination\";\r\n CarouselInteractionEvent[CarouselInteractionEvent[\"Autoplay\"] = 3] = \"Autoplay\";\r\n})(CarouselInteractionEvent = exports.CarouselInteractionEvent || (exports.CarouselInteractionEvent = {}));\r\nvar ActionRole;\r\n(function (ActionRole) {\r\n ActionRole[ActionRole[\"Button\"] = 0] = \"Button\";\r\n ActionRole[ActionRole[\"Link\"] = 1] = \"Link\";\r\n ActionRole[ActionRole[\"Tab\"] = 2] = \"Tab\";\r\n ActionRole[ActionRole[\"Menu\"] = 3] = \"Menu\";\r\n ActionRole[ActionRole[\"MenuItem\"] = 4] = \"MenuItem\";\r\n})(ActionRole = exports.ActionRole || (exports.ActionRole = {}));\r\n//# sourceMappingURL=enums.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.HostCapabilities = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar serialization_1 = require(\"./serialization\");\r\nvar HostCapabilities = /** @class */ (function (_super) {\r\n __extends(HostCapabilities, _super);\r\n function HostCapabilities() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._capabilities = {};\r\n return _this;\r\n }\r\n HostCapabilities.prototype.getSchemaKey = function () {\r\n return \"HostCapabilities\";\r\n };\r\n HostCapabilities.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n if (source) {\r\n // eslint-disable-next-line guard-for-in\r\n for (var name_1 in source) {\r\n var jsonVersion = source[name_1];\r\n if (typeof jsonVersion === \"string\") {\r\n if (jsonVersion === \"*\") {\r\n this.addCapability(name_1, \"*\");\r\n }\r\n else {\r\n var version = serialization_1.Version.parse(jsonVersion, context);\r\n if (version === null || version === void 0 ? void 0 : version.isValid) {\r\n this.addCapability(name_1, version);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n HostCapabilities.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n // eslint-disable-next-line guard-for-in\r\n for (var key in this._capabilities) {\r\n target[key] = this._capabilities[key];\r\n }\r\n };\r\n HostCapabilities.prototype.addCapability = function (name, version) {\r\n this._capabilities[name] = version;\r\n };\r\n HostCapabilities.prototype.removeCapability = function (name) {\r\n delete this._capabilities[name];\r\n };\r\n HostCapabilities.prototype.clear = function () {\r\n this._capabilities = {};\r\n };\r\n HostCapabilities.prototype.hasCapability = function (name, version) {\r\n if (this._capabilities.hasOwnProperty(name)) {\r\n if (version === \"*\" || this._capabilities[name] === \"*\") {\r\n return true;\r\n }\r\n return version.compareTo(this._capabilities[name]) <= 0;\r\n }\r\n return false;\r\n };\r\n HostCapabilities.prototype.areAllMet = function (hostCapabilities) {\r\n for (var capabilityName in this._capabilities) {\r\n if (!hostCapabilities.hasCapability(capabilityName, this._capabilities[capabilityName])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n return HostCapabilities;\r\n}(serialization_1.SerializableObject));\r\nexports.HostCapabilities = HostCapabilities;\r\n//# sourceMappingURL=host-capabilities.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.defaultHostConfig = exports.HostConfig = exports.CarouselConfig = exports.FontTypeSet = exports.FontTypeDefinition = exports.ContainerStyleSet = exports.ContainerStyleDefinition = exports.ColorSetDefinition = exports.ActionsConfig = exports.ShowCardActionConfig = exports.FactSetConfig = exports.FactTitleDefinition = exports.FactTextDefinition = exports.InputConfig = exports.InputLabelConfig = exports.RequiredInputLabelTextDefinition = exports.TextBlockConfig = exports.TextStyleSet = exports.TextStyleDefinition = exports.BaseTextDefinition = exports.TableConfig = exports.MediaConfig = exports.ImageSetConfig = exports.AdaptiveCardConfig = exports.TextColorDefinition = exports.ColorDefinition = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar Utils = require(\"./utils\");\r\nvar Shared = require(\"./shared\");\r\nvar host_capabilities_1 = require(\"./host-capabilities\");\r\nfunction parseHostConfigEnum(targetEnum, value, defaultValue) {\r\n if (typeof value === \"string\") {\r\n var parsedValue = Utils.parseEnum(targetEnum, value, defaultValue);\r\n return parsedValue !== undefined ? parsedValue : defaultValue;\r\n }\r\n else if (typeof value === \"number\") {\r\n return value;\r\n }\r\n else {\r\n return defaultValue;\r\n }\r\n}\r\nvar ColorDefinition = /** @class */ (function () {\r\n function ColorDefinition(defaultColor, subtleColor) {\r\n this.default = \"#000000\";\r\n this.subtle = \"#666666\";\r\n if (defaultColor) {\r\n this.default = defaultColor;\r\n }\r\n if (subtleColor) {\r\n this.subtle = subtleColor;\r\n }\r\n }\r\n ColorDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.default = obj[\"default\"] || this.default;\r\n this.subtle = obj[\"subtle\"] || this.subtle;\r\n }\r\n };\r\n return ColorDefinition;\r\n}());\r\nexports.ColorDefinition = ColorDefinition;\r\nvar TextColorDefinition = /** @class */ (function (_super) {\r\n __extends(TextColorDefinition, _super);\r\n function TextColorDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.highlightColors = new ColorDefinition(\"#22000000\", \"#11000000\");\r\n return _this;\r\n }\r\n TextColorDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.highlightColors.parse(obj[\"highlightColors\"]);\r\n }\r\n };\r\n return TextColorDefinition;\r\n}(ColorDefinition));\r\nexports.TextColorDefinition = TextColorDefinition;\r\nvar AdaptiveCardConfig = /** @class */ (function () {\r\n function AdaptiveCardConfig(obj) {\r\n this.allowCustomStyle = false;\r\n if (obj) {\r\n this.allowCustomStyle = obj[\"allowCustomStyle\"] || this.allowCustomStyle;\r\n }\r\n }\r\n return AdaptiveCardConfig;\r\n}());\r\nexports.AdaptiveCardConfig = AdaptiveCardConfig;\r\nvar ImageSetConfig = /** @class */ (function () {\r\n function ImageSetConfig(obj) {\r\n this.imageSize = Enums.Size.Medium;\r\n this.maxImageHeight = 100;\r\n if (obj) {\r\n this.imageSize = obj[\"imageSize\"] != null ? obj[\"imageSize\"] : this.imageSize;\r\n this.maxImageHeight = Utils.parseNumber(obj[\"maxImageHeight\"], 100);\r\n }\r\n }\r\n ImageSetConfig.prototype.toJSON = function () {\r\n return {\r\n imageSize: Enums.Size[this.imageSize],\r\n maxImageHeight: this.maxImageHeight\r\n };\r\n };\r\n return ImageSetConfig;\r\n}());\r\nexports.ImageSetConfig = ImageSetConfig;\r\nvar MediaConfig = /** @class */ (function () {\r\n function MediaConfig(obj) {\r\n this.allowInlinePlayback = true;\r\n if (obj) {\r\n this.defaultPoster = obj[\"defaultPoster\"];\r\n this.allowInlinePlayback = obj[\"allowInlinePlayback\"] || this.allowInlinePlayback;\r\n }\r\n }\r\n MediaConfig.prototype.toJSON = function () {\r\n return {\r\n defaultPoster: this.defaultPoster,\r\n allowInlinePlayback: this.allowInlinePlayback\r\n };\r\n };\r\n return MediaConfig;\r\n}());\r\nexports.MediaConfig = MediaConfig;\r\nvar TableConfig = /** @class */ (function () {\r\n function TableConfig(obj) {\r\n this.cellSpacing = 8;\r\n if (obj) {\r\n this.cellSpacing =\r\n obj.cellSpacing && typeof obj.cellSpacing === \"number\"\r\n ? obj.cellSpacing\r\n : this.cellSpacing;\r\n }\r\n }\r\n TableConfig.prototype.toJSON = function () {\r\n return {\r\n cellSpacing: this.cellSpacing\r\n };\r\n };\r\n return TableConfig;\r\n}());\r\nexports.TableConfig = TableConfig;\r\nvar BaseTextDefinition = /** @class */ (function () {\r\n function BaseTextDefinition(obj) {\r\n this.size = Enums.TextSize.Default;\r\n this.color = Enums.TextColor.Default;\r\n this.isSubtle = false;\r\n this.weight = Enums.TextWeight.Default;\r\n this.parse(obj);\r\n }\r\n BaseTextDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.size = parseHostConfigEnum(Enums.TextSize, obj[\"size\"], this.size);\r\n this.color = parseHostConfigEnum(Enums.TextColor, obj[\"color\"], this.color);\r\n this.isSubtle =\r\n obj.isSubtle !== undefined && typeof obj.isSubtle === \"boolean\"\r\n ? obj.isSubtle\r\n : this.isSubtle;\r\n this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], this.getDefaultWeight());\r\n }\r\n };\r\n BaseTextDefinition.prototype.getDefaultWeight = function () {\r\n return Enums.TextWeight.Default;\r\n };\r\n BaseTextDefinition.prototype.toJSON = function () {\r\n return {\r\n size: Enums.TextSize[this.size],\r\n color: Enums.TextColor[this.color],\r\n isSubtle: this.isSubtle,\r\n weight: Enums.TextWeight[this.weight]\r\n };\r\n };\r\n return BaseTextDefinition;\r\n}());\r\nexports.BaseTextDefinition = BaseTextDefinition;\r\nvar TextStyleDefinition = /** @class */ (function (_super) {\r\n __extends(TextStyleDefinition, _super);\r\n function TextStyleDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.fontType = Enums.FontType.Default;\r\n return _this;\r\n }\r\n TextStyleDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.fontType = parseHostConfigEnum(Enums.FontType, obj.fontType, this.fontType);\r\n }\r\n };\r\n return TextStyleDefinition;\r\n}(BaseTextDefinition));\r\nexports.TextStyleDefinition = TextStyleDefinition;\r\nvar TextStyleSet = /** @class */ (function () {\r\n function TextStyleSet(obj) {\r\n this.default = new TextStyleDefinition();\r\n this.heading = new TextStyleDefinition({\r\n size: \"Large\",\r\n weight: \"Bolder\"\r\n });\r\n this.columnHeader = new TextStyleDefinition({\r\n weight: \"Bolder\"\r\n });\r\n if (obj) {\r\n this.heading.parse(obj.heading);\r\n this.columnHeader.parse(obj.columnHeader);\r\n }\r\n }\r\n TextStyleSet.prototype.getStyleByName = function (name) {\r\n switch (name.toLowerCase()) {\r\n case \"heading\":\r\n return this.heading;\r\n case \"columnHeader\":\r\n return this.columnHeader;\r\n default:\r\n return this.default;\r\n }\r\n };\r\n return TextStyleSet;\r\n}());\r\nexports.TextStyleSet = TextStyleSet;\r\nvar TextBlockConfig = /** @class */ (function () {\r\n function TextBlockConfig(obj) {\r\n if (obj) {\r\n this.headingLevel = Utils.parseNumber(obj.headingLevel);\r\n }\r\n }\r\n return TextBlockConfig;\r\n}());\r\nexports.TextBlockConfig = TextBlockConfig;\r\nvar RequiredInputLabelTextDefinition = /** @class */ (function (_super) {\r\n __extends(RequiredInputLabelTextDefinition, _super);\r\n function RequiredInputLabelTextDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.suffix = \" *\";\r\n _this.suffixColor = Enums.TextColor.Attention;\r\n return _this;\r\n }\r\n RequiredInputLabelTextDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.suffix = obj[\"suffix\"] || this.suffix;\r\n this.suffixColor = parseHostConfigEnum(Enums.TextColor, obj[\"suffixColor\"], this.suffixColor);\r\n }\r\n };\r\n RequiredInputLabelTextDefinition.prototype.toJSON = function () {\r\n var result = _super.prototype.toJSON.call(this);\r\n result[\"suffix\"] = this.suffix;\r\n result[\"suffixColor\"] = Enums.TextColor[this.suffixColor];\r\n return result;\r\n };\r\n return RequiredInputLabelTextDefinition;\r\n}(BaseTextDefinition));\r\nexports.RequiredInputLabelTextDefinition = RequiredInputLabelTextDefinition;\r\nvar InputLabelConfig = /** @class */ (function () {\r\n function InputLabelConfig(obj) {\r\n this.inputSpacing = Enums.Spacing.Small;\r\n this.width = 30;\r\n this.requiredInputs = new RequiredInputLabelTextDefinition();\r\n this.optionalInputs = new BaseTextDefinition();\r\n if (obj) {\r\n this.inputSpacing = parseHostConfigEnum(Enums.Spacing, obj[\"inputSpacing\"], this.inputSpacing);\r\n this.requiredInputs = new RequiredInputLabelTextDefinition(obj[\"requiredInputs\"]);\r\n this.optionalInputs = new BaseTextDefinition(obj[\"optionalInputs\"]);\r\n this.width =\r\n obj[\"width\"] != null ? obj[\"width\"] : this.width;\r\n }\r\n }\r\n return InputLabelConfig;\r\n}());\r\nexports.InputLabelConfig = InputLabelConfig;\r\nvar InputConfig = /** @class */ (function () {\r\n function InputConfig(obj) {\r\n this.label = new InputLabelConfig();\r\n this.errorMessage = new BaseTextDefinition({\r\n color: Enums.TextColor.Attention\r\n });\r\n this.debounceTimeInMilliSeconds = 0;\r\n this.allowDynamicallyFilteredChoiceSet = true;\r\n this.allowRevealOnHoverStyle = false;\r\n if (obj) {\r\n this.label = new InputLabelConfig(obj[\"label\"]);\r\n this.errorMessage = new BaseTextDefinition(obj[\"errorMessage\"]);\r\n this.allowRevealOnHoverStyle =\r\n obj[\"allowRevealOnHoverStyle\"] || this.allowRevealOnHoverStyle;\r\n this.allowDynamicallyFilteredChoiceSet =\r\n obj[\"allowDynamicallyFilteredChoiceSet\"] || this.allowDynamicallyFilteredChoiceSet;\r\n this.debounceTimeInMilliSeconds =\r\n obj[\"debounceTimeInMilliSeconds\"] || this.debounceTimeInMilliSeconds;\r\n }\r\n }\r\n return InputConfig;\r\n}());\r\nexports.InputConfig = InputConfig;\r\nvar FactTextDefinition = /** @class */ (function (_super) {\r\n __extends(FactTextDefinition, _super);\r\n function FactTextDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.wrap = true;\r\n return _this;\r\n }\r\n FactTextDefinition.prototype.parse = function (obj) {\r\n _super.prototype.parse.call(this, obj);\r\n if (obj) {\r\n this.wrap = obj[\"wrap\"] != null ? obj[\"wrap\"] : this.wrap;\r\n }\r\n };\r\n FactTextDefinition.prototype.toJSON = function () {\r\n var result = _super.prototype.toJSON.call(this);\r\n result[\"wrap\"] = this.wrap;\r\n return result;\r\n };\r\n return FactTextDefinition;\r\n}(BaseTextDefinition));\r\nexports.FactTextDefinition = FactTextDefinition;\r\nvar FactTitleDefinition = /** @class */ (function (_super) {\r\n __extends(FactTitleDefinition, _super);\r\n function FactTitleDefinition(obj) {\r\n var _this = _super.call(this, obj) || this;\r\n _this.maxWidth = 150;\r\n _this.weight = Enums.TextWeight.Bolder;\r\n if (obj) {\r\n _this.maxWidth = obj[\"maxWidth\"] != null ? obj[\"maxWidth\"] : _this.maxWidth;\r\n _this.weight = parseHostConfigEnum(Enums.TextWeight, obj[\"weight\"], Enums.TextWeight.Bolder);\r\n }\r\n return _this;\r\n }\r\n FactTitleDefinition.prototype.getDefaultWeight = function () {\r\n return Enums.TextWeight.Bolder;\r\n };\r\n return FactTitleDefinition;\r\n}(FactTextDefinition));\r\nexports.FactTitleDefinition = FactTitleDefinition;\r\nvar FactSetConfig = /** @class */ (function () {\r\n function FactSetConfig(obj) {\r\n this.title = new FactTitleDefinition();\r\n this.value = new FactTextDefinition();\r\n this.spacing = 10;\r\n if (obj) {\r\n this.title = new FactTitleDefinition(obj[\"title\"]);\r\n this.value = new FactTextDefinition(obj[\"value\"]);\r\n this.spacing =\r\n obj.spacing && obj.spacing != null ? obj.spacing && obj.spacing : this.spacing;\r\n }\r\n }\r\n return FactSetConfig;\r\n}());\r\nexports.FactSetConfig = FactSetConfig;\r\nvar ShowCardActionConfig = /** @class */ (function () {\r\n function ShowCardActionConfig(obj) {\r\n this.actionMode = Enums.ShowCardActionMode.Inline;\r\n this.inlineTopMargin = 16;\r\n this.style = Enums.ContainerStyle.Emphasis;\r\n if (obj) {\r\n this.actionMode = parseHostConfigEnum(Enums.ShowCardActionMode, obj[\"actionMode\"], Enums.ShowCardActionMode.Inline);\r\n this.inlineTopMargin =\r\n obj[\"inlineTopMargin\"] != null ? obj[\"inlineTopMargin\"] : this.inlineTopMargin;\r\n this.style =\r\n obj[\"style\"] && typeof obj[\"style\"] === \"string\"\r\n ? obj[\"style\"]\r\n : Enums.ContainerStyle.Emphasis;\r\n }\r\n }\r\n ShowCardActionConfig.prototype.toJSON = function () {\r\n return {\r\n actionMode: Enums.ShowCardActionMode[this.actionMode],\r\n inlineTopMargin: this.inlineTopMargin,\r\n style: this.style\r\n };\r\n };\r\n return ShowCardActionConfig;\r\n}());\r\nexports.ShowCardActionConfig = ShowCardActionConfig;\r\nvar ActionsConfig = /** @class */ (function () {\r\n function ActionsConfig(obj) {\r\n this.maxActions = 5;\r\n this.spacing = Enums.Spacing.Default;\r\n this.buttonSpacing = 20;\r\n this.showCard = new ShowCardActionConfig();\r\n this.preExpandSingleShowCardAction = false;\r\n this.actionsOrientation = Enums.Orientation.Horizontal;\r\n this.actionAlignment = Enums.ActionAlignment.Left;\r\n this.iconPlacement = Enums.ActionIconPlacement.LeftOfTitle;\r\n this.allowTitleToWrap = false;\r\n this.iconSize = 16;\r\n if (obj) {\r\n this.maxActions = obj[\"maxActions\"] != null ? obj[\"maxActions\"] : this.maxActions;\r\n this.spacing = parseHostConfigEnum(Enums.Spacing, obj.spacing && obj.spacing, Enums.Spacing.Default);\r\n this.buttonSpacing =\r\n obj[\"buttonSpacing\"] != null ? obj[\"buttonSpacing\"] : this.buttonSpacing;\r\n this.showCard = new ShowCardActionConfig(obj[\"showCard\"]);\r\n this.preExpandSingleShowCardAction = Utils.parseBool(obj[\"preExpandSingleShowCardAction\"], false);\r\n this.actionsOrientation = parseHostConfigEnum(Enums.Orientation, obj[\"actionsOrientation\"], Enums.Orientation.Horizontal);\r\n this.actionAlignment = parseHostConfigEnum(Enums.ActionAlignment, obj[\"actionAlignment\"], Enums.ActionAlignment.Left);\r\n this.iconPlacement = parseHostConfigEnum(Enums.ActionIconPlacement, obj[\"iconPlacement\"], Enums.ActionIconPlacement.LeftOfTitle);\r\n this.allowTitleToWrap =\r\n obj[\"allowTitleToWrap\"] != null ? obj[\"allowTitleToWrap\"] : this.allowTitleToWrap;\r\n try {\r\n var sizeAndUnit = Shared.SizeAndUnit.parse(obj[\"iconSize\"]);\r\n if (sizeAndUnit.unit === Enums.SizeUnit.Pixel) {\r\n this.iconSize = sizeAndUnit.physicalSize;\r\n }\r\n }\r\n catch (e) {\r\n // Swallow this, keep default icon size\r\n }\r\n }\r\n }\r\n ActionsConfig.prototype.toJSON = function () {\r\n return {\r\n maxActions: this.maxActions,\r\n spacing: Enums.Spacing[this.spacing],\r\n buttonSpacing: this.buttonSpacing,\r\n showCard: this.showCard,\r\n preExpandSingleShowCardAction: this.preExpandSingleShowCardAction,\r\n actionsOrientation: Enums.Orientation[this.actionsOrientation],\r\n actionAlignment: Enums.ActionAlignment[this.actionAlignment]\r\n };\r\n };\r\n return ActionsConfig;\r\n}());\r\nexports.ActionsConfig = ActionsConfig;\r\nvar ColorSetDefinition = /** @class */ (function () {\r\n function ColorSetDefinition(obj) {\r\n this.default = new TextColorDefinition();\r\n this.dark = new TextColorDefinition();\r\n this.light = new TextColorDefinition();\r\n this.accent = new TextColorDefinition();\r\n this.good = new TextColorDefinition();\r\n this.warning = new TextColorDefinition();\r\n this.attention = new TextColorDefinition();\r\n this.parse(obj);\r\n }\r\n ColorSetDefinition.prototype.parseSingleColor = function (obj, propertyName) {\r\n if (obj) {\r\n this[propertyName].parse(obj[propertyName]);\r\n }\r\n };\r\n ColorSetDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.parseSingleColor(obj, \"default\");\r\n this.parseSingleColor(obj, \"dark\");\r\n this.parseSingleColor(obj, \"light\");\r\n this.parseSingleColor(obj, \"accent\");\r\n this.parseSingleColor(obj, \"good\");\r\n this.parseSingleColor(obj, \"warning\");\r\n this.parseSingleColor(obj, \"attention\");\r\n }\r\n };\r\n return ColorSetDefinition;\r\n}());\r\nexports.ColorSetDefinition = ColorSetDefinition;\r\nvar ContainerStyleDefinition = /** @class */ (function () {\r\n function ContainerStyleDefinition(obj) {\r\n this.foregroundColors = new ColorSetDefinition({\r\n \"default\": { default: \"#333333\", subtle: \"#EE333333\" },\r\n \"dark\": { default: \"#000000\", subtle: \"#66000000\" },\r\n \"light\": { default: \"#FFFFFF\", subtle: \"#33000000\" },\r\n \"accent\": { default: \"#2E89FC\", subtle: \"#882E89FC\" },\r\n \"good\": { default: \"#028A02\", subtle: \"#DD027502\" },\r\n \"warning\": { default: \"#E69500\", subtle: \"#DDE69500\" },\r\n \"attention\": { default: \"#CC3300\", subtle: \"#DDCC3300\" }\r\n });\r\n this.parse(obj);\r\n }\r\n ContainerStyleDefinition.prototype.parse = function (obj) {\r\n if (obj) {\r\n this.backgroundColor = obj[\"backgroundColor\"];\r\n this.foregroundColors.parse(obj[\"foregroundColors\"]);\r\n this.highlightBackgroundColor = obj[\"highlightBackgroundColor\"];\r\n this.highlightForegroundColor = obj[\"highlightForegroundColor\"];\r\n this.borderColor = obj[\"borderColor\"];\r\n }\r\n };\r\n Object.defineProperty(ContainerStyleDefinition.prototype, \"isBuiltIn\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ContainerStyleDefinition;\r\n}());\r\nexports.ContainerStyleDefinition = ContainerStyleDefinition;\r\nvar BuiltInContainerStyleDefinition = /** @class */ (function (_super) {\r\n __extends(BuiltInContainerStyleDefinition, _super);\r\n function BuiltInContainerStyleDefinition() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(BuiltInContainerStyleDefinition.prototype, \"isBuiltIn\", {\r\n get: function () {\r\n return true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return BuiltInContainerStyleDefinition;\r\n}(ContainerStyleDefinition));\r\nvar ContainerStyleSet = /** @class */ (function () {\r\n function ContainerStyleSet(obj) {\r\n this._allStyles = {};\r\n this._allStyles[Enums.ContainerStyle.Default] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Emphasis] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Accent] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Good] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Attention] = new BuiltInContainerStyleDefinition();\r\n this._allStyles[Enums.ContainerStyle.Warning] = new BuiltInContainerStyleDefinition();\r\n if (obj) {\r\n this._allStyles[Enums.ContainerStyle.Default].parse(obj[Enums.ContainerStyle.Default]);\r\n this._allStyles[Enums.ContainerStyle.Emphasis].parse(obj[Enums.ContainerStyle.Emphasis]);\r\n this._allStyles[Enums.ContainerStyle.Accent].parse(obj[Enums.ContainerStyle.Accent]);\r\n this._allStyles[Enums.ContainerStyle.Good].parse(obj[Enums.ContainerStyle.Good]);\r\n this._allStyles[Enums.ContainerStyle.Attention].parse(obj[Enums.ContainerStyle.Attention]);\r\n this._allStyles[Enums.ContainerStyle.Warning].parse(obj[Enums.ContainerStyle.Warning]);\r\n var customStyleArray = obj[\"customStyles\"];\r\n if (customStyleArray && Array.isArray(customStyleArray)) {\r\n for (var _i = 0, customStyleArray_1 = customStyleArray; _i < customStyleArray_1.length; _i++) {\r\n var customStyle = customStyleArray_1[_i];\r\n if (customStyle) {\r\n var styleName = customStyle[\"name\"];\r\n if (styleName && typeof styleName === \"string\") {\r\n if (this._allStyles.hasOwnProperty(styleName)) {\r\n this._allStyles[styleName].parse(customStyle[\"style\"]);\r\n }\r\n else {\r\n this._allStyles[styleName] = new ContainerStyleDefinition(customStyle[\"style\"]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ContainerStyleSet.prototype.toJSON = function () {\r\n var _this = this;\r\n var customStyleArray = [];\r\n Object.keys(this._allStyles).forEach(function (key) {\r\n if (!_this._allStyles[key].isBuiltIn) {\r\n customStyleArray.push({\r\n name: key,\r\n style: _this._allStyles[key]\r\n });\r\n }\r\n });\r\n var result = {\r\n default: this.default,\r\n emphasis: this.emphasis\r\n };\r\n if (customStyleArray.length > 0) {\r\n result.customStyles = customStyleArray;\r\n }\r\n return result;\r\n };\r\n ContainerStyleSet.prototype.getStyleByName = function (name, defaultValue) {\r\n if (name && this._allStyles.hasOwnProperty(name)) {\r\n return this._allStyles[name];\r\n }\r\n else {\r\n return defaultValue ? defaultValue : this._allStyles[Enums.ContainerStyle.Default];\r\n }\r\n };\r\n Object.defineProperty(ContainerStyleSet.prototype, \"default\", {\r\n get: function () {\r\n return this._allStyles[Enums.ContainerStyle.Default];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContainerStyleSet.prototype, \"emphasis\", {\r\n get: function () {\r\n return this._allStyles[Enums.ContainerStyle.Emphasis];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return ContainerStyleSet;\r\n}());\r\nexports.ContainerStyleSet = ContainerStyleSet;\r\nvar FontTypeDefinition = /** @class */ (function () {\r\n function FontTypeDefinition(fontFamily) {\r\n this.fontFamily = \"Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif\";\r\n this.fontSizes = {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n };\r\n this.fontWeights = {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n };\r\n if (fontFamily) {\r\n this.fontFamily = fontFamily;\r\n }\r\n }\r\n FontTypeDefinition.prototype.parse = function (obj) {\r\n this.fontFamily = obj[\"fontFamily\"] || this.fontFamily;\r\n this.fontSizes = {\r\n small: (obj.fontSizes && obj.fontSizes[\"small\"]) || this.fontSizes.small,\r\n default: (obj.fontSizes && obj.fontSizes[\"default\"]) || this.fontSizes.default,\r\n medium: (obj.fontSizes && obj.fontSizes[\"medium\"]) || this.fontSizes.medium,\r\n large: (obj.fontSizes && obj.fontSizes[\"large\"]) || this.fontSizes.large,\r\n extraLarge: (obj.fontSizes && obj.fontSizes[\"extraLarge\"]) || this.fontSizes.extraLarge\r\n };\r\n this.fontWeights = {\r\n lighter: (obj.fontWeights && obj.fontWeights[\"lighter\"]) || this.fontWeights.lighter,\r\n default: (obj.fontWeights && obj.fontWeights[\"default\"]) || this.fontWeights.default,\r\n bolder: (obj.fontWeights && obj.fontWeights[\"bolder\"]) || this.fontWeights.bolder\r\n };\r\n };\r\n FontTypeDefinition.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n return FontTypeDefinition;\r\n}());\r\nexports.FontTypeDefinition = FontTypeDefinition;\r\nvar FontTypeSet = /** @class */ (function () {\r\n function FontTypeSet(obj) {\r\n this.default = new FontTypeDefinition();\r\n this.monospace = new FontTypeDefinition(\"'Courier New', Courier, monospace\");\r\n if (obj) {\r\n this.default.parse(obj[\"default\"]);\r\n this.monospace.parse(obj[\"monospace\"]);\r\n }\r\n }\r\n FontTypeSet.prototype.getStyleDefinition = function (style) {\r\n switch (style) {\r\n case Enums.FontType.Monospace:\r\n return this.monospace;\r\n case Enums.FontType.Default:\r\n default:\r\n return this.default;\r\n }\r\n };\r\n return FontTypeSet;\r\n}());\r\nexports.FontTypeSet = FontTypeSet;\r\nvar CarouselConfig = /** @class */ (function () {\r\n function CarouselConfig(obj) {\r\n this.maxCarouselPages = 10;\r\n this.minAutoplayDelay = 5000.0;\r\n if (obj) {\r\n this.maxCarouselPages =\r\n obj[\"maxCarouselPages\"] != null ? obj[\"maxCarouselPages\"] : this.maxCarouselPages;\r\n this.minAutoplayDelay =\r\n obj[\"minAutoplayDelay\"] != null ? obj[\"minAutoplayDelay\"] : this.minAutoplayDelay;\r\n }\r\n }\r\n CarouselConfig.prototype.toJSON = function () {\r\n return {\r\n maxCarouselPages: this.maxCarouselPages,\r\n minAutoplayDelay: this.minAutoplayDelay\r\n };\r\n };\r\n return CarouselConfig;\r\n}());\r\nexports.CarouselConfig = CarouselConfig;\r\nvar HostConfig = /** @class */ (function () {\r\n function HostConfig(obj) {\r\n this.hostCapabilities = new host_capabilities_1.HostCapabilities();\r\n this.choiceSetInputValueSeparator = \",\";\r\n this.supportsInteractivity = true;\r\n this.spacing = {\r\n small: 3,\r\n default: 8,\r\n medium: 20,\r\n large: 30,\r\n extraLarge: 40,\r\n padding: 15\r\n };\r\n this.separator = {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n };\r\n this.imageSizes = {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n };\r\n this.containerStyles = new ContainerStyleSet();\r\n this.inputs = new InputConfig();\r\n this.actions = new ActionsConfig();\r\n this.adaptiveCard = new AdaptiveCardConfig();\r\n this.imageSet = new ImageSetConfig();\r\n this.media = new MediaConfig();\r\n this.factSet = new FactSetConfig();\r\n this.table = new TableConfig();\r\n this.textStyles = new TextStyleSet();\r\n this.textBlock = new TextBlockConfig();\r\n this.carousel = new CarouselConfig();\r\n this.alwaysAllowBleed = false;\r\n if (obj) {\r\n if (typeof obj === \"string\" || obj instanceof String) {\r\n obj = JSON.parse(obj);\r\n }\r\n this.choiceSetInputValueSeparator =\r\n obj && typeof obj[\"choiceSetInputValueSeparator\"] === \"string\"\r\n ? obj[\"choiceSetInputValueSeparator\"]\r\n : this.choiceSetInputValueSeparator;\r\n this.supportsInteractivity =\r\n obj && typeof obj[\"supportsInteractivity\"] === \"boolean\"\r\n ? obj[\"supportsInteractivity\"]\r\n : this.supportsInteractivity;\r\n this._legacyFontType = new FontTypeDefinition();\r\n this._legacyFontType.parse(obj);\r\n if (obj.fontTypes) {\r\n this.fontTypes = new FontTypeSet(obj.fontTypes);\r\n }\r\n if (obj.lineHeights) {\r\n this.lineHeights = {\r\n small: obj.lineHeights[\"small\"],\r\n default: obj.lineHeights[\"default\"],\r\n medium: obj.lineHeights[\"medium\"],\r\n large: obj.lineHeights[\"large\"],\r\n extraLarge: obj.lineHeights[\"extraLarge\"]\r\n };\r\n }\r\n this.imageSizes = {\r\n small: (obj.imageSizes && obj.imageSizes[\"small\"]) || this.imageSizes.small,\r\n medium: (obj.imageSizes && obj.imageSizes[\"medium\"]) || this.imageSizes.medium,\r\n large: (obj.imageSizes && obj.imageSizes[\"large\"]) || this.imageSizes.large\r\n };\r\n this.containerStyles = new ContainerStyleSet(obj[\"containerStyles\"]);\r\n this.spacing = {\r\n small: (obj.spacing && obj.spacing[\"small\"]) || this.spacing.small,\r\n default: (obj.spacing && obj.spacing[\"default\"]) || this.spacing.default,\r\n medium: (obj.spacing && obj.spacing[\"medium\"]) || this.spacing.medium,\r\n large: (obj.spacing && obj.spacing[\"large\"]) || this.spacing.large,\r\n extraLarge: (obj.spacing && obj.spacing[\"extraLarge\"]) || this.spacing.extraLarge,\r\n padding: (obj.spacing && obj.spacing[\"padding\"]) || this.spacing.padding\r\n };\r\n this.separator = {\r\n lineThickness: (obj.separator && obj.separator[\"lineThickness\"]) ||\r\n this.separator.lineThickness,\r\n lineColor: (obj.separator && obj.separator[\"lineColor\"]) || this.separator.lineColor\r\n };\r\n this.inputs = new InputConfig(obj.inputs || this.inputs);\r\n this.actions = new ActionsConfig(obj.actions || this.actions);\r\n this.adaptiveCard = new AdaptiveCardConfig(obj.adaptiveCard || this.adaptiveCard);\r\n this.imageSet = new ImageSetConfig(obj[\"imageSet\"]);\r\n this.factSet = new FactSetConfig(obj[\"factSet\"]);\r\n this.textStyles = new TextStyleSet(obj[\"textStyles\"]);\r\n this.textBlock = new TextBlockConfig(obj[\"textBlock\"]);\r\n this.carousel = new CarouselConfig(obj[\"carousel\"]);\r\n }\r\n }\r\n HostConfig.prototype.getFontTypeDefinition = function (style) {\r\n if (this.fontTypes) {\r\n return this.fontTypes.getStyleDefinition(style);\r\n }\r\n else {\r\n return style === Enums.FontType.Monospace\r\n ? FontTypeDefinition.monospace\r\n : this._legacyFontType;\r\n }\r\n };\r\n HostConfig.prototype.getEffectiveSpacing = function (spacing) {\r\n switch (spacing) {\r\n case Enums.Spacing.Small:\r\n return this.spacing.small;\r\n case Enums.Spacing.Default:\r\n return this.spacing.default;\r\n case Enums.Spacing.Medium:\r\n return this.spacing.medium;\r\n case Enums.Spacing.Large:\r\n return this.spacing.large;\r\n case Enums.Spacing.ExtraLarge:\r\n return this.spacing.extraLarge;\r\n case Enums.Spacing.Padding:\r\n return this.spacing.padding;\r\n default:\r\n return 0;\r\n }\r\n };\r\n HostConfig.prototype.paddingDefinitionToSpacingDefinition = function (paddingDefinition) {\r\n return new Shared.SpacingDefinition(this.getEffectiveSpacing(paddingDefinition.top), this.getEffectiveSpacing(paddingDefinition.right), this.getEffectiveSpacing(paddingDefinition.bottom), this.getEffectiveSpacing(paddingDefinition.left));\r\n };\r\n HostConfig.prototype.makeCssClassNames = function () {\r\n var classNames = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n classNames[_i] = arguments[_i];\r\n }\r\n var result = [];\r\n for (var _a = 0, classNames_1 = classNames; _a < classNames_1.length; _a++) {\r\n var className = classNames_1[_a];\r\n result.push((this.cssClassNamePrefix ? this.cssClassNamePrefix + \"-\" : \"\") + className);\r\n }\r\n return result;\r\n };\r\n HostConfig.prototype.makeCssClassName = function () {\r\n var classNames = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n classNames[_i] = arguments[_i];\r\n }\r\n var result = this.makeCssClassNames.apply(this, classNames).join(\" \");\r\n return result ? result : \"\";\r\n };\r\n Object.defineProperty(HostConfig.prototype, \"fontFamily\", {\r\n get: function () {\r\n return this._legacyFontType.fontFamily;\r\n },\r\n set: function (value) {\r\n this._legacyFontType.fontFamily = value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HostConfig.prototype, \"fontSizes\", {\r\n get: function () {\r\n return this._legacyFontType.fontSizes;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(HostConfig.prototype, \"fontWeights\", {\r\n get: function () {\r\n return this._legacyFontType.fontWeights;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return HostConfig;\r\n}());\r\nexports.HostConfig = HostConfig;\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexports.defaultHostConfig = new HostConfig({\r\n supportsInteractivity: true,\r\n spacing: {\r\n small: 10,\r\n default: 20,\r\n medium: 30,\r\n large: 40,\r\n extraLarge: 50,\r\n padding: 20\r\n },\r\n separator: {\r\n lineThickness: 1,\r\n lineColor: \"#EEEEEE\"\r\n },\r\n fontTypes: {\r\n default: {\r\n fontFamily: \"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n },\r\n monospace: {\r\n fontFamily: \"'Courier New', Courier, monospace\",\r\n fontSizes: {\r\n small: 12,\r\n default: 14,\r\n medium: 17,\r\n large: 21,\r\n extraLarge: 26\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n }\r\n },\r\n imageSizes: {\r\n small: 40,\r\n medium: 80,\r\n large: 160\r\n },\r\n containerStyles: {\r\n default: {\r\n backgroundColor: \"#FFFFFF\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n emphasis: {\r\n backgroundColor: \"#08000000\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n accent: {\r\n backgroundColor: \"#C7DEF9\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n good: {\r\n backgroundColor: \"#CCFFCC\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n attention: {\r\n backgroundColor: \"#FFC5B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n },\r\n warning: {\r\n backgroundColor: \"#FFE2B2\",\r\n foregroundColors: {\r\n default: {\r\n default: \"#333333\",\r\n subtle: \"#EE333333\"\r\n },\r\n dark: {\r\n default: \"#000000\",\r\n subtle: \"#66000000\"\r\n },\r\n light: {\r\n default: \"#FFFFFF\",\r\n subtle: \"#33000000\"\r\n },\r\n accent: {\r\n default: \"#2E89FC\",\r\n subtle: \"#882E89FC\"\r\n },\r\n attention: {\r\n default: \"#cc3300\",\r\n subtle: \"#DDcc3300\"\r\n },\r\n good: {\r\n default: \"#028A02\",\r\n subtle: \"#DD027502\"\r\n },\r\n warning: {\r\n default: \"#e69500\",\r\n subtle: \"#DDe69500\"\r\n }\r\n }\r\n }\r\n },\r\n inputs: {\r\n label: {\r\n requiredInputs: {\r\n weight: Enums.TextWeight.Bolder,\r\n suffix: \" *\",\r\n suffixColor: Enums.TextColor.Attention\r\n },\r\n optionalInputs: {\r\n weight: Enums.TextWeight.Bolder\r\n }\r\n },\r\n errorMessage: {\r\n color: Enums.TextColor.Attention,\r\n weight: Enums.TextWeight.Bolder\r\n },\r\n debounceTimeInMilliSeconds: 250\r\n },\r\n actions: {\r\n maxActions: 5,\r\n spacing: Enums.Spacing.Default,\r\n buttonSpacing: 10,\r\n showCard: {\r\n actionMode: Enums.ShowCardActionMode.Inline,\r\n inlineTopMargin: 16\r\n },\r\n actionsOrientation: Enums.Orientation.Horizontal,\r\n actionAlignment: Enums.ActionAlignment.Left\r\n },\r\n adaptiveCard: {\r\n allowCustomStyle: false\r\n },\r\n imageSet: {\r\n imageSize: Enums.Size.Medium,\r\n maxImageHeight: 100\r\n },\r\n factSet: {\r\n title: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Bolder,\r\n wrap: true,\r\n maxWidth: 150\r\n },\r\n value: {\r\n color: Enums.TextColor.Default,\r\n size: Enums.TextSize.Default,\r\n isSubtle: false,\r\n weight: Enums.TextWeight.Default,\r\n wrap: true\r\n },\r\n spacing: 10\r\n },\r\n carousel: {\r\n maxCarouselPages: 10,\r\n minAutoplayDuration: 5000\r\n },\r\n textBlock: {\r\n headingLevel: 2\r\n }\r\n});\r\n//# sourceMappingURL=host-config.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.GlobalRegistry = exports.CardObjectRegistry = void 0;\r\nvar serialization_1 = require(\"./serialization\");\r\nvar CardObjectRegistry = /** @class */ (function () {\r\n function CardObjectRegistry() {\r\n this._items = {};\r\n }\r\n CardObjectRegistry.prototype.findByName = function (typeName) {\r\n return this._items.hasOwnProperty(typeName) ? this._items[typeName] : undefined;\r\n };\r\n CardObjectRegistry.prototype.clear = function () {\r\n this._items = {};\r\n };\r\n CardObjectRegistry.prototype.copyTo = function (target) {\r\n var keys = Object.keys(this._items);\r\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\r\n var key = keys_1[_i];\r\n var typeRegistration = this._items[key];\r\n target.register(typeRegistration.typeName, typeRegistration.objectType, typeRegistration.schemaVersion);\r\n }\r\n };\r\n CardObjectRegistry.prototype.register = function (typeName, objectType, schemaVersion) {\r\n if (schemaVersion === void 0) { schemaVersion = serialization_1.Versions.v1_0; }\r\n var registrationInfo = this.findByName(typeName);\r\n if (registrationInfo !== undefined) {\r\n registrationInfo.objectType = objectType;\r\n }\r\n else {\r\n registrationInfo = {\r\n typeName: typeName,\r\n objectType: objectType,\r\n schemaVersion: schemaVersion\r\n };\r\n }\r\n this._items[typeName] = registrationInfo;\r\n };\r\n CardObjectRegistry.prototype.unregister = function (typeName) {\r\n delete this._items[typeName];\r\n };\r\n CardObjectRegistry.prototype.createInstance = function (typeName, targetVersion) {\r\n var registrationInfo = this.findByName(typeName);\r\n return registrationInfo && registrationInfo.schemaVersion.compareTo(targetVersion) <= 0\r\n ? new registrationInfo.objectType()\r\n : undefined;\r\n };\r\n CardObjectRegistry.prototype.getItemCount = function () {\r\n return Object.keys(this._items).length;\r\n };\r\n CardObjectRegistry.prototype.getItemAt = function (index) {\r\n var _this = this;\r\n return Object.keys(this._items).map(function (e) { return _this._items[e]; })[index];\r\n };\r\n return CardObjectRegistry;\r\n}());\r\nexports.CardObjectRegistry = CardObjectRegistry;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar GlobalRegistry = /** @class */ (function () {\r\n function GlobalRegistry() {\r\n }\r\n GlobalRegistry.populateWithDefaultElements = function (registry) {\r\n registry.clear();\r\n GlobalRegistry.defaultElements.copyTo(registry);\r\n };\r\n GlobalRegistry.populateWithDefaultActions = function (registry) {\r\n registry.clear();\r\n GlobalRegistry.defaultActions.copyTo(registry);\r\n };\r\n Object.defineProperty(GlobalRegistry, \"elements\", {\r\n get: function () {\r\n if (!GlobalRegistry._elements) {\r\n GlobalRegistry._elements = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultElements(GlobalRegistry._elements);\r\n }\r\n return GlobalRegistry._elements;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(GlobalRegistry, \"actions\", {\r\n get: function () {\r\n if (!GlobalRegistry._actions) {\r\n GlobalRegistry._actions = new CardObjectRegistry();\r\n GlobalRegistry.populateWithDefaultActions(GlobalRegistry._actions);\r\n }\r\n return GlobalRegistry._actions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n GlobalRegistry.reset = function () {\r\n GlobalRegistry._elements = undefined;\r\n GlobalRegistry._actions = undefined;\r\n };\r\n GlobalRegistry.defaultElements = new CardObjectRegistry();\r\n GlobalRegistry.defaultActions = new CardObjectRegistry();\r\n return GlobalRegistry;\r\n}());\r\nexports.GlobalRegistry = GlobalRegistry;\r\n//# sourceMappingURL=registry.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SerializableObject = exports.property = exports.SerializableObjectSchema = exports.CustomProperty = exports.SerializableObjectCollectionProperty = exports.SerializableObjectProperty = exports.EnumProperty = exports.ValueSetProperty = exports.StringArrayProperty = exports.PixelSizeProperty = exports.NumProperty = exports.BoolProperty = exports.StringProperty = exports.PropertyDefinition = exports.BaseSerializationContext = exports.isVersionLessOrEqual = exports.Versions = exports.Version = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar shared_1 = require(\"./shared\");\r\nvar Utils = require(\"./utils\");\r\nvar Enums = require(\"./enums\");\r\nvar strings_1 = require(\"./strings\");\r\nvar Version = /** @class */ (function () {\r\n function Version(major, minor, label) {\r\n if (major === void 0) { major = 1; }\r\n if (minor === void 0) { minor = 1; }\r\n this._isValid = true;\r\n this._major = major;\r\n this._minor = minor;\r\n this._label = label;\r\n }\r\n Version.parse = function (versionString, context) {\r\n if (!versionString) {\r\n return undefined;\r\n }\r\n var result = new Version();\r\n result._versionString = versionString;\r\n var regEx = /(\\d+).(\\d+)/gi;\r\n var matches = regEx.exec(versionString);\r\n if (matches != null && matches.length === 3) {\r\n result._major = parseInt(matches[1]);\r\n result._minor = parseInt(matches[2]);\r\n }\r\n else {\r\n result._isValid = false;\r\n }\r\n if (!result._isValid) {\r\n context.logParseEvent(undefined, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidVersionString(result._versionString));\r\n }\r\n return result;\r\n };\r\n Version.prototype.toString = function () {\r\n return !this._isValid ? this._versionString : this._major + \".\" + this._minor;\r\n };\r\n Version.prototype.toJSON = function () {\r\n return this.toString();\r\n };\r\n Version.prototype.compareTo = function (otherVersion) {\r\n if (!this.isValid || !otherVersion.isValid) {\r\n throw new Error(\"Cannot compare invalid version.\");\r\n }\r\n if (this.major > otherVersion.major) {\r\n return 1;\r\n }\r\n else if (this.major < otherVersion.major) {\r\n return -1;\r\n }\r\n else if (this.minor > otherVersion.minor) {\r\n return 1;\r\n }\r\n else if (this.minor < otherVersion.minor) {\r\n return -1;\r\n }\r\n return 0;\r\n };\r\n Object.defineProperty(Version.prototype, \"label\", {\r\n get: function () {\r\n return this._label ? this._label : this.toString();\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Version.prototype, \"major\", {\r\n get: function () {\r\n return this._major;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Version.prototype, \"minor\", {\r\n get: function () {\r\n return this._minor;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Version.prototype, \"isValid\", {\r\n get: function () {\r\n return this._isValid;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return Version;\r\n}());\r\nexports.Version = Version;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar Versions = /** @class */ (function () {\r\n function Versions() {\r\n }\r\n // If preview tag is added/removed from any version,\r\n // don't forget to update .ac-schema-version-1-?::after too in adaptivecards-site\\themes\\adaptivecards\\source\\css\\style.css\r\n /* eslint-enable @typescript-eslint/naming-convention */\r\n Versions.getAllDeclaredVersions = function () {\r\n var ctor = Versions;\r\n var properties = [];\r\n for (var propertyName in ctor) {\r\n if (propertyName.match(/^v[0-9_]*$/)) {\r\n // filter latest\r\n try {\r\n var propertyValue = ctor[propertyName];\r\n if (propertyValue instanceof Version) {\r\n properties.push(propertyValue);\r\n }\r\n }\r\n catch (_a) {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n }\r\n return properties.sort(function (v1, v2) { return v1.compareTo(v2); });\r\n };\r\n /* eslint-disable @typescript-eslint/naming-convention */\r\n Versions.v1_0 = new Version(1, 0);\r\n Versions.v1_1 = new Version(1, 1);\r\n Versions.v1_2 = new Version(1, 2);\r\n Versions.v1_3 = new Version(1, 3);\r\n Versions.v1_4 = new Version(1, 4);\r\n Versions.v1_5 = new Version(1, 5);\r\n Versions.v1_6 = new Version(1, 6);\r\n Versions.latest = Versions.v1_6;\r\n return Versions;\r\n}());\r\nexports.Versions = Versions;\r\nfunction isVersionLessOrEqual(version, targetVersion) {\r\n if (version instanceof Version) {\r\n if (targetVersion instanceof Version) {\r\n return targetVersion.compareTo(version) >= 0;\r\n }\r\n else {\r\n // Target version is *\r\n return true;\r\n }\r\n }\r\n else {\r\n // Version is *\r\n return true;\r\n }\r\n}\r\nexports.isVersionLessOrEqual = isVersionLessOrEqual;\r\nvar BaseSerializationContext = /** @class */ (function () {\r\n function BaseSerializationContext(targetVersion) {\r\n if (targetVersion === void 0) { targetVersion = Versions.latest; }\r\n this._validationEvents = [];\r\n this.targetVersion = targetVersion;\r\n }\r\n BaseSerializationContext.prototype.isTemplateString = function (value) {\r\n if (typeof value === \"string\") {\r\n return value.startsWith(\"${\");\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n BaseSerializationContext.prototype.tryDeleteValue = function (target, propertyName) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip) {\r\n delete target[propertyName];\r\n }\r\n };\r\n BaseSerializationContext.prototype.tryDeleteDefaultValue = function (target, propertyName) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || !this.isTemplateString(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeValue = function (target, propertyName, propertyValue, defaultValue, forceDeleteIfNullOrDefault) {\r\n if (defaultValue === void 0) { defaultValue = undefined; }\r\n if (forceDeleteIfNullOrDefault === void 0) { forceDeleteIfNullOrDefault = false; }\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault) {\r\n delete target[propertyName];\r\n }\r\n }\r\n else if (propertyValue === defaultValue) {\r\n if (!shared_1.GlobalSettings.enableFullJsonRoundTrip || forceDeleteIfNullOrDefault || !this.isTemplateString(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeString = function (target, propertyName, propertyValue, defaultValue) {\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeBool = function (target, propertyName, propertyValue, defaultValue) {\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeNumber = function (target, propertyName, propertyValue, defaultValue) {\r\n if (propertyValue === null ||\r\n propertyValue === undefined ||\r\n isNaN(propertyValue)) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = propertyValue;\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeEnum = function (enumType, target, propertyName, propertyValue, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = undefined; }\r\n if (propertyValue === null ||\r\n propertyValue === undefined) {\r\n this.tryDeleteValue(target, propertyName);\r\n }\r\n else if (propertyValue === defaultValue) {\r\n this.tryDeleteDefaultValue(target, propertyName);\r\n }\r\n else {\r\n target[propertyName] = enumType[propertyValue];\r\n }\r\n };\r\n BaseSerializationContext.prototype.serializeArray = function (target, propertyName, propertyValue) {\r\n var items = [];\r\n if (propertyValue) {\r\n for (var _i = 0, propertyValue_1 = propertyValue; _i < propertyValue_1.length; _i++) {\r\n var item = propertyValue_1[_i];\r\n var serializedItem = undefined;\r\n if (item instanceof SerializableObject) {\r\n serializedItem = item.toJSON(this);\r\n }\r\n else if (item.toJSON) {\r\n serializedItem = item.toJSON();\r\n }\r\n else {\r\n serializedItem = item;\r\n }\r\n if (serializedItem !== undefined) {\r\n items.push(serializedItem);\r\n }\r\n }\r\n }\r\n if (items.length === 0) {\r\n if (target.hasOwnProperty(propertyName) && Array.isArray(target[propertyName])) {\r\n delete target[propertyName];\r\n }\r\n }\r\n else {\r\n this.serializeValue(target, propertyName, items);\r\n }\r\n };\r\n BaseSerializationContext.prototype.clearEvents = function () {\r\n this._validationEvents = [];\r\n };\r\n BaseSerializationContext.prototype.logEvent = function (source, phase, event, message) {\r\n this._validationEvents.push({\r\n source: source,\r\n phase: phase,\r\n event: event,\r\n message: message\r\n });\r\n };\r\n BaseSerializationContext.prototype.logParseEvent = function (source, event, message) {\r\n this.logEvent(source, Enums.ValidationPhase.Parse, event, message);\r\n };\r\n BaseSerializationContext.prototype.getEventAt = function (index) {\r\n return this._validationEvents[index];\r\n };\r\n Object.defineProperty(BaseSerializationContext.prototype, \"eventCount\", {\r\n get: function () {\r\n return this._validationEvents.length;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return BaseSerializationContext;\r\n}());\r\nexports.BaseSerializationContext = BaseSerializationContext;\r\nvar SimpleSerializationContext = /** @class */ (function (_super) {\r\n __extends(SimpleSerializationContext, _super);\r\n function SimpleSerializationContext() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return SimpleSerializationContext;\r\n}(BaseSerializationContext));\r\nvar PropertyDefinition = /** @class */ (function () {\r\n function PropertyDefinition(targetVersion, name, defaultValue, onGetInitialValue) {\r\n this.targetVersion = targetVersion;\r\n this.name = name;\r\n this.defaultValue = defaultValue;\r\n this.onGetInitialValue = onGetInitialValue;\r\n this.isSerializationEnabled = true;\r\n this.sequentialNumber = PropertyDefinition._sequentialNumber;\r\n PropertyDefinition._sequentialNumber++;\r\n }\r\n PropertyDefinition.prototype.getInternalName = function () {\r\n return this.name;\r\n };\r\n PropertyDefinition.prototype.parse = function (sender, source, context) {\r\n return source[this.name];\r\n };\r\n PropertyDefinition.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, value, this.defaultValue);\r\n };\r\n PropertyDefinition._sequentialNumber = 0;\r\n return PropertyDefinition;\r\n}());\r\nexports.PropertyDefinition = PropertyDefinition;\r\nvar StringProperty = /** @class */ (function (_super) {\r\n __extends(StringProperty, _super);\r\n function StringProperty(targetVersion, name, treatEmptyAsUndefined, regEx, defaultValue, onGetInitialValue) {\r\n if (treatEmptyAsUndefined === void 0) { treatEmptyAsUndefined = true; }\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.treatEmptyAsUndefined = treatEmptyAsUndefined;\r\n _this.regEx = regEx;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n StringProperty.prototype.parse = function (sender, source, context) {\r\n var parsedValue = Utils.parseString(source[this.name], this.defaultValue);\r\n var isUndefined = parsedValue === undefined || (parsedValue === \"\" && this.treatEmptyAsUndefined);\r\n if (!isUndefined && this.regEx !== undefined) {\r\n var matches = this.regEx.exec(parsedValue);\r\n if (!matches) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(parsedValue, this.name));\r\n return undefined;\r\n }\r\n }\r\n return parsedValue;\r\n };\r\n StringProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeString(target, this.name, value === \"\" && this.treatEmptyAsUndefined ? undefined : value, this.defaultValue);\r\n };\r\n return StringProperty;\r\n}(PropertyDefinition));\r\nexports.StringProperty = StringProperty;\r\nvar BoolProperty = /** @class */ (function (_super) {\r\n __extends(BoolProperty, _super);\r\n function BoolProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n BoolProperty.prototype.parse = function (sender, source, context) {\r\n return Utils.parseBool(source[this.name], this.defaultValue);\r\n };\r\n BoolProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeBool(target, this.name, value, this.defaultValue);\r\n };\r\n return BoolProperty;\r\n}(PropertyDefinition));\r\nexports.BoolProperty = BoolProperty;\r\nvar NumProperty = /** @class */ (function (_super) {\r\n __extends(NumProperty, _super);\r\n function NumProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n NumProperty.prototype.parse = function (sender, source, context) {\r\n return Utils.parseNumber(source[this.name], this.defaultValue);\r\n };\r\n NumProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeNumber(target, this.name, value, this.defaultValue);\r\n };\r\n return NumProperty;\r\n}(PropertyDefinition));\r\nexports.NumProperty = NumProperty;\r\nvar PixelSizeProperty = /** @class */ (function (_super) {\r\n __extends(PixelSizeProperty, _super);\r\n function PixelSizeProperty() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n PixelSizeProperty.prototype.parse = function (sender, source, context) {\r\n var result = undefined;\r\n var value = source[this.name];\r\n if (typeof value === \"string\") {\r\n var isValid = false;\r\n try {\r\n var size = shared_1.SizeAndUnit.parse(value, true);\r\n if (size.unit === Enums.SizeUnit.Pixel) {\r\n result = size.physicalSize;\r\n isValid = true;\r\n }\r\n }\r\n catch (_a) {\r\n // Do nothing. A parse error is emitted below\r\n }\r\n if (!isValid) {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(source[this.name], this.name));\r\n }\r\n }\r\n return result;\r\n };\r\n PixelSizeProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeValue(target, this.name, typeof value === \"number\" && !isNaN(value) ? value + \"px\" : undefined);\r\n };\r\n return PixelSizeProperty;\r\n}(PropertyDefinition));\r\nexports.PixelSizeProperty = PixelSizeProperty;\r\nvar StringArrayProperty = /** @class */ (function (_super) {\r\n __extends(StringArrayProperty, _super);\r\n function StringArrayProperty(targetVersion, name, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n StringArrayProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined || !Array.isArray(sourceValue)) {\r\n return this.defaultValue;\r\n }\r\n var result = [];\r\n for (var _i = 0, sourceValue_1 = sourceValue; _i < sourceValue_1.length; _i++) {\r\n var value = sourceValue_1[_i];\r\n if (typeof value === \"string\") {\r\n result.push(value);\r\n }\r\n else {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, \"Invalid array value \\\"\".concat(JSON.stringify(value), \"\\\" of type \\\"\").concat(typeof value, \"\\\" ignored for \\\"\").concat(this.name, \"\\\".\"));\r\n }\r\n }\r\n return result;\r\n };\r\n StringArrayProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeArray(target, this.name, value);\r\n };\r\n return StringArrayProperty;\r\n}(PropertyDefinition));\r\nexports.StringArrayProperty = StringArrayProperty;\r\nvar ValueSetProperty = /** @class */ (function (_super) {\r\n __extends(ValueSetProperty, _super);\r\n function ValueSetProperty(targetVersion, name, values, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.values = values;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n return _this;\r\n }\r\n ValueSetProperty.prototype.isValidValue = function (value, context) {\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (value.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n return targetVersion.compareTo(context.targetVersion) <= 0;\r\n }\r\n }\r\n return false;\r\n };\r\n ValueSetProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined) {\r\n return this.defaultValue;\r\n }\r\n if (typeof sourceValue === \"string\") {\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (sourceValue.toLowerCase() === versionedValue.value.toLowerCase()) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return versionedValue.value;\r\n }\r\n else {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\r\n return this.defaultValue;\r\n };\r\n ValueSetProperty.prototype.toJSON = function (sender, target, value, context) {\r\n var invalidValue = false;\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (versionedValue.value === value) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n break;\r\n }\r\n else {\r\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(value, this.name, targetVersion.toString(), context.targetVersion.toString()));\r\n }\r\n }\r\n }\r\n }\r\n if (!invalidValue) {\r\n context.serializeValue(target, this.name, value, this.defaultValue, true);\r\n }\r\n };\r\n return ValueSetProperty;\r\n}(PropertyDefinition));\r\nexports.ValueSetProperty = ValueSetProperty;\r\nvar EnumProperty = /** @class */ (function (_super) {\r\n __extends(EnumProperty, _super);\r\n function EnumProperty(targetVersion, name, enumType, defaultValue, values, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.enumType = enumType;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n _this._values = [];\r\n if (!values) {\r\n // eslint-disable-next-line guard-for-in\r\n for (var key in enumType) {\r\n var keyAsNumber = parseInt(key, 10);\r\n if (keyAsNumber >= 0) {\r\n _this._values.push({ value: keyAsNumber });\r\n }\r\n }\r\n }\r\n else {\r\n _this._values = values;\r\n }\r\n return _this;\r\n }\r\n EnumProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (typeof sourceValue !== \"string\") {\r\n return this.defaultValue;\r\n }\r\n var enumValue = Utils.getEnumValueByName(this.enumType, sourceValue);\r\n if (enumValue !== undefined) {\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (versionedValue.value === enumValue) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n return enumValue;\r\n }\r\n else {\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.propertyValueNotSupported(sourceValue, this.name, targetVersion.toString(), context.targetVersion.toString()));\r\n return this.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n context.logParseEvent(sender, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(sourceValue, this.name));\r\n return this.defaultValue;\r\n };\r\n EnumProperty.prototype.toJSON = function (sender, target, value, context) {\r\n var invalidValue = false;\r\n if (value !== undefined) {\r\n invalidValue = true;\r\n for (var _i = 0, _a = this.values; _i < _a.length; _i++) {\r\n var versionedValue = _a[_i];\r\n if (versionedValue.value === value) {\r\n var targetVersion = versionedValue.targetVersion\r\n ? versionedValue.targetVersion\r\n : this.targetVersion;\r\n if (targetVersion.compareTo(context.targetVersion) <= 0) {\r\n invalidValue = false;\r\n break;\r\n }\r\n else {\r\n context.logEvent(sender, Enums.ValidationPhase.ToJSON, Enums.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidPropertyValue(value, this.name));\r\n }\r\n }\r\n }\r\n }\r\n if (!invalidValue) {\r\n context.serializeEnum(this.enumType, target, this.name, value, this.defaultValue);\r\n }\r\n };\r\n Object.defineProperty(EnumProperty.prototype, \"values\", {\r\n get: function () {\r\n return this._values;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return EnumProperty;\r\n}(PropertyDefinition));\r\nexports.EnumProperty = EnumProperty;\r\nvar SerializableObjectProperty = /** @class */ (function (_super) {\r\n __extends(SerializableObjectProperty, _super);\r\n function SerializableObjectProperty(targetVersion, name, objectType, nullable, defaultValue) {\r\n if (nullable === void 0) { nullable = false; }\r\n var _this = _super.call(this, targetVersion, name, defaultValue, function (sender) {\r\n return _this.nullable ? undefined : new _this.objectType();\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.objectType = objectType;\r\n _this.nullable = nullable;\r\n return _this;\r\n }\r\n SerializableObjectProperty.prototype.parse = function (sender, source, context) {\r\n var sourceValue = source[this.name];\r\n if (sourceValue === undefined) {\r\n return this.onGetInitialValue ? this.onGetInitialValue(sender) : this.defaultValue;\r\n }\r\n var result = new this.objectType();\r\n result.parse(sourceValue, context);\r\n return result;\r\n };\r\n SerializableObjectProperty.prototype.toJSON = function (sender, target, value, context) {\r\n var serializedValue = undefined;\r\n if (value !== undefined && !value.hasAllDefaultValues()) {\r\n serializedValue = value.toJSON(context);\r\n }\r\n if (typeof serializedValue === \"object\" && Object.keys(serializedValue).length === 0) {\r\n serializedValue = undefined;\r\n }\r\n context.serializeValue(target, this.name, serializedValue, this.defaultValue, true);\r\n };\r\n return SerializableObjectProperty;\r\n}(PropertyDefinition));\r\nexports.SerializableObjectProperty = SerializableObjectProperty;\r\nvar SerializableObjectCollectionProperty = /** @class */ (function (_super) {\r\n __extends(SerializableObjectCollectionProperty, _super);\r\n function SerializableObjectCollectionProperty(targetVersion, name, objectType, onItemAdded) {\r\n var _this = _super.call(this, targetVersion, name, undefined, function (sender) {\r\n return [];\r\n }) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.objectType = objectType;\r\n _this.onItemAdded = onItemAdded;\r\n return _this;\r\n }\r\n SerializableObjectCollectionProperty.prototype.parse = function (sender, source, context) {\r\n var result = [];\r\n var sourceCollection = source[this.name];\r\n if (Array.isArray(sourceCollection)) {\r\n for (var _i = 0, sourceCollection_1 = sourceCollection; _i < sourceCollection_1.length; _i++) {\r\n var sourceItem = sourceCollection_1[_i];\r\n var item = new this.objectType();\r\n item.parse(sourceItem, context);\r\n result.push(item);\r\n if (this.onItemAdded) {\r\n this.onItemAdded(sender, item);\r\n }\r\n }\r\n }\r\n return result.length > 0\r\n ? result\r\n : this.onGetInitialValue\r\n ? this.onGetInitialValue(sender)\r\n : undefined;\r\n };\r\n SerializableObjectCollectionProperty.prototype.toJSON = function (sender, target, value, context) {\r\n context.serializeArray(target, this.name, value);\r\n };\r\n return SerializableObjectCollectionProperty;\r\n}(PropertyDefinition));\r\nexports.SerializableObjectCollectionProperty = SerializableObjectCollectionProperty;\r\nvar CustomProperty = /** @class */ (function (_super) {\r\n __extends(CustomProperty, _super);\r\n function CustomProperty(targetVersion, name, onParse, onToJSON, defaultValue, onGetInitialValue) {\r\n var _this = _super.call(this, targetVersion, name, defaultValue, onGetInitialValue) || this;\r\n _this.targetVersion = targetVersion;\r\n _this.name = name;\r\n _this.onParse = onParse;\r\n _this.onToJSON = onToJSON;\r\n _this.defaultValue = defaultValue;\r\n _this.onGetInitialValue = onGetInitialValue;\r\n if (!_this.onParse) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onParse handler.\");\r\n }\r\n if (!_this.onToJSON) {\r\n throw new Error(\"CustomPropertyDefinition instances must have an onToJSON handler.\");\r\n }\r\n return _this;\r\n }\r\n CustomProperty.prototype.parse = function (sender, source, context) {\r\n return this.onParse(sender, this, source, context);\r\n };\r\n CustomProperty.prototype.toJSON = function (sender, target, value, context) {\r\n this.onToJSON(sender, this, target, value, context);\r\n };\r\n return CustomProperty;\r\n}(PropertyDefinition));\r\nexports.CustomProperty = CustomProperty;\r\nvar SerializableObjectSchema = /** @class */ (function () {\r\n function SerializableObjectSchema() {\r\n this._properties = [];\r\n }\r\n SerializableObjectSchema.prototype.indexOf = function (prop) {\r\n for (var i = 0; i < this._properties.length; i++) {\r\n if (this._properties[i] === prop) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n SerializableObjectSchema.prototype.add = function () {\r\n var properties = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n properties[_i] = arguments[_i];\r\n }\r\n for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) {\r\n var prop = properties_1[_a];\r\n if (this.indexOf(prop) === -1) {\r\n this._properties.push(prop);\r\n }\r\n }\r\n };\r\n SerializableObjectSchema.prototype.remove = function () {\r\n var properties = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n properties[_i] = arguments[_i];\r\n }\r\n for (var _a = 0, properties_2 = properties; _a < properties_2.length; _a++) {\r\n var prop = properties_2[_a];\r\n while (true) {\r\n var index = this.indexOf(prop);\r\n if (index >= 0) {\r\n this._properties.splice(index, 1);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n SerializableObjectSchema.prototype.getItemAt = function (index) {\r\n return this._properties[index];\r\n };\r\n SerializableObjectSchema.prototype.getCount = function () {\r\n return this._properties.length;\r\n };\r\n return SerializableObjectSchema;\r\n}());\r\nexports.SerializableObjectSchema = SerializableObjectSchema;\r\n// This is a decorator function, used to map SerializableObject descendant class members to\r\n// schema properties\r\nfunction property(prop) {\r\n return function (target, propertyKey) {\r\n var descriptor = Object.getOwnPropertyDescriptor(target, propertyKey) || {};\r\n if (!descriptor.get && !descriptor.set) {\r\n descriptor.get = function () {\r\n return this.getValue(prop);\r\n };\r\n descriptor.set = function (value) {\r\n this.setValue(prop, value);\r\n };\r\n Object.defineProperty(target, propertyKey, descriptor);\r\n }\r\n };\r\n}\r\nexports.property = property;\r\nvar SerializableObject = /** @class */ (function () {\r\n function SerializableObject() {\r\n this._propertyBag = {};\r\n this._rawProperties = {};\r\n this.maxVersion = SerializableObject.defaultMaxVersion;\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n if (prop.onGetInitialValue) {\r\n this.setValue(prop, prop.onGetInitialValue(this));\r\n }\r\n }\r\n }\r\n SerializableObject.prototype.getDefaultSerializationContext = function () {\r\n return new SimpleSerializationContext();\r\n };\r\n SerializableObject.prototype.populateSchema = function (schema) {\r\n var ctor = this.constructor;\r\n var properties = [];\r\n // eslint-disable-next-line guard-for-in\r\n for (var propertyName in ctor) {\r\n try {\r\n var propertyValue = ctor[propertyName];\r\n if (propertyValue instanceof PropertyDefinition) {\r\n properties.push(propertyValue);\r\n }\r\n }\r\n catch (_a) {\r\n // If a property happens to have a getter function and\r\n // it throws an exception, we need to catch it here\r\n }\r\n }\r\n if (properties.length > 0) {\r\n var sortedProperties = properties.sort(function (p1, p2) {\r\n if (p1.sequentialNumber > p2.sequentialNumber) {\r\n return 1;\r\n }\r\n else if (p1.sequentialNumber < p2.sequentialNumber) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n schema.add.apply(schema, sortedProperties);\r\n }\r\n if (SerializableObject.onRegisterCustomProperties) {\r\n SerializableObject.onRegisterCustomProperties(this, schema);\r\n }\r\n };\r\n SerializableObject.prototype.getValue = function (prop) {\r\n return this._propertyBag.hasOwnProperty(prop.getInternalName())\r\n ? this._propertyBag[prop.getInternalName()]\r\n : prop.defaultValue;\r\n };\r\n SerializableObject.prototype.setValue = function (prop, value) {\r\n if (value === undefined || value === null) {\r\n delete this._propertyBag[prop.getInternalName()];\r\n }\r\n else {\r\n this._propertyBag[prop.getInternalName()] = value;\r\n }\r\n };\r\n SerializableObject.prototype.internalParse = function (source, context) {\r\n this._propertyBag = {};\r\n this._rawProperties = shared_1.GlobalSettings.enableFullJsonRoundTrip ? (source ? source : {}) : {};\r\n if (source) {\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n if (prop.isSerializationEnabled) {\r\n var propertyValue = prop.onGetInitialValue\r\n ? prop.onGetInitialValue(this)\r\n : undefined;\r\n if (source.hasOwnProperty(prop.name)) {\r\n if (prop.targetVersion.compareTo(context.targetVersion) <= 0) {\r\n propertyValue = prop.parse(this, source, context);\r\n }\r\n else {\r\n context.logParseEvent(this, Enums.ValidationEvent.UnsupportedProperty, strings_1.Strings.errors.propertyNotSupported(prop.name, prop.targetVersion.toString(), context.targetVersion.toString()));\r\n }\r\n }\r\n this.setValue(prop, propertyValue);\r\n }\r\n }\r\n }\r\n else {\r\n this.resetDefaultValues();\r\n }\r\n };\r\n SerializableObject.prototype.internalToJSON = function (target, context) {\r\n var s = this.getSchema();\r\n var serializedProperties = [];\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n // Avoid serializing the same property multiple times. This is necessary\r\n // because some property definitions map to the same underlying schema\r\n // property\r\n if (prop.isSerializationEnabled &&\r\n prop.targetVersion.compareTo(context.targetVersion) <= 0 &&\r\n serializedProperties.indexOf(prop.name) === -1) {\r\n prop.toJSON(this, target, this.getValue(prop), context);\r\n serializedProperties.push(prop.name);\r\n }\r\n }\r\n };\r\n SerializableObject.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n SerializableObject.prototype.parse = function (source, context) {\r\n this.internalParse(source, context ? context : new SimpleSerializationContext());\r\n };\r\n SerializableObject.prototype.toJSON = function (context) {\r\n var effectiveContext;\r\n if (context && context instanceof BaseSerializationContext) {\r\n effectiveContext = context;\r\n }\r\n else {\r\n effectiveContext = this.getDefaultSerializationContext();\r\n effectiveContext.toJSONOriginalParam = context;\r\n }\r\n if (this.shouldSerialize(effectiveContext)) {\r\n var result = void 0;\r\n if (shared_1.GlobalSettings.enableFullJsonRoundTrip &&\r\n this._rawProperties &&\r\n typeof this._rawProperties === \"object\") {\r\n result = this._rawProperties;\r\n }\r\n else {\r\n result = {};\r\n }\r\n this.internalToJSON(result, effectiveContext);\r\n return result;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n };\r\n SerializableObject.prototype.hasDefaultValue = function (prop) {\r\n return this.getValue(prop) === prop.defaultValue;\r\n };\r\n SerializableObject.prototype.hasAllDefaultValues = function () {\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n if (!this.hasDefaultValue(prop)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n SerializableObject.prototype.resetDefaultValues = function () {\r\n var s = this.getSchema();\r\n for (var i = 0; i < s.getCount(); i++) {\r\n var prop = s.getItemAt(i);\r\n this.setValue(prop, prop.defaultValue);\r\n }\r\n };\r\n SerializableObject.prototype.setCustomProperty = function (name, value) {\r\n var shouldDeleteProperty = (typeof value === \"string\" && !value) || value === undefined || value === null;\r\n if (shouldDeleteProperty) {\r\n delete this._rawProperties[name];\r\n }\r\n else {\r\n this._rawProperties[name] = value;\r\n }\r\n };\r\n SerializableObject.prototype.getCustomProperty = function (name) {\r\n return this._rawProperties[name];\r\n };\r\n SerializableObject.prototype.getSchema = function () {\r\n var schema = SerializableObject._schemaCache[this.getSchemaKey()];\r\n if (!schema) {\r\n schema = new SerializableObjectSchema();\r\n this.populateSchema(schema);\r\n SerializableObject._schemaCache[this.getSchemaKey()] = schema;\r\n }\r\n return schema;\r\n };\r\n SerializableObject.defaultMaxVersion = Versions.latest;\r\n SerializableObject._schemaCache = {};\r\n return SerializableObject;\r\n}());\r\nexports.SerializableObject = SerializableObject;\r\n//# sourceMappingURL=serialization.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.UUID = exports.SizeAndUnit = exports.PaddingDefinition = exports.SpacingDefinition = exports.StringWithSubstitutions = exports.ContentTypes = exports.GlobalSettings = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar GlobalSettings = /** @class */ (function () {\r\n function GlobalSettings() {\r\n }\r\n GlobalSettings.useAdvancedTextBlockTruncation = true;\r\n GlobalSettings.useAdvancedCardBottomTruncation = false;\r\n GlobalSettings.useMarkdownInRadioButtonAndCheckbox = true;\r\n GlobalSettings.allowMarkForTextHighlighting = false;\r\n GlobalSettings.alwaysBleedSeparators = false;\r\n GlobalSettings.enableFullJsonRoundTrip = false;\r\n GlobalSettings.displayInputValidationErrors = true;\r\n GlobalSettings.allowPreProcessingPropertyValues = false;\r\n GlobalSettings.setTabIndexAtCardRoot = true;\r\n GlobalSettings.enableFallback = true;\r\n GlobalSettings.useWebkitLineClamp = true;\r\n GlobalSettings.allowMoreThanMaxActionsInOverflowMenu = false;\r\n GlobalSettings.removePaddingFromContainersWithBackgroundImage = false;\r\n GlobalSettings.resetInputsDirtyStateAfterActionExecution = true;\r\n GlobalSettings.applets = {\r\n logEnabled: true,\r\n logLevel: Enums.LogLevel.Error,\r\n maximumRetryAttempts: 3,\r\n defaultTimeBetweenRetryAttempts: 3000,\r\n authPromptWidth: 400,\r\n authPromptHeight: 600,\r\n refresh: {\r\n mode: Enums.RefreshMode.Manual,\r\n timeBetweenAutomaticRefreshes: 3000,\r\n maximumConsecutiveAutomaticRefreshes: 3,\r\n allowManualRefreshesAfterAutomaticRefreshes: true\r\n }\r\n };\r\n return GlobalSettings;\r\n}());\r\nexports.GlobalSettings = GlobalSettings;\r\nexports.ContentTypes = {\r\n applicationJson: \"application/json\",\r\n applicationXWwwFormUrlencoded: \"application/x-www-form-urlencoded\"\r\n};\r\nvar StringWithSubstitutions = /** @class */ (function () {\r\n function StringWithSubstitutions() {\r\n this._isProcessed = false;\r\n }\r\n StringWithSubstitutions.prototype.getReferencedInputs = function (inputs, referencedInputs) {\r\n if (!referencedInputs) {\r\n throw new Error(\"The referencedInputs parameter cannot be null.\");\r\n }\r\n if (this._original) {\r\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\r\n var input = inputs_1[_i];\r\n var matches = new RegExp(\"\\\\{{2}(\" + input.id + \").value\\\\}{2}\", \"gi\").exec(this._original);\r\n if (matches != null && input.id) {\r\n referencedInputs[input.id] = input;\r\n }\r\n }\r\n }\r\n };\r\n StringWithSubstitutions.prototype.substituteInputValues = function (inputs, contentType) {\r\n this._processed = this._original;\r\n if (this._original) {\r\n var regEx = /\\{{2}([a-z0-9_$@]+).value\\}{2}/gi;\r\n var matches = void 0;\r\n while ((matches = regEx.exec(this._original)) !== null && this._processed) {\r\n for (var _i = 0, _a = Object.keys(inputs); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n if (key.toLowerCase() === matches[1].toLowerCase()) {\r\n var matchedInput = inputs[key];\r\n var valueForReplace = \"\";\r\n if (matchedInput.value) {\r\n valueForReplace = matchedInput.value;\r\n }\r\n if (contentType === exports.ContentTypes.applicationJson) {\r\n valueForReplace = JSON.stringify(valueForReplace);\r\n valueForReplace = valueForReplace.slice(1, -1);\r\n }\r\n else if (contentType === exports.ContentTypes.applicationXWwwFormUrlencoded) {\r\n valueForReplace = encodeURIComponent(valueForReplace);\r\n }\r\n this._processed = this._processed.replace(matches[0], valueForReplace);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n this._isProcessed = true;\r\n };\r\n StringWithSubstitutions.prototype.getOriginal = function () {\r\n return this._original;\r\n };\r\n StringWithSubstitutions.prototype.get = function () {\r\n if (!this._isProcessed) {\r\n return this._original;\r\n }\r\n else {\r\n return this._processed;\r\n }\r\n };\r\n StringWithSubstitutions.prototype.set = function (value) {\r\n this._original = value;\r\n this._isProcessed = false;\r\n };\r\n return StringWithSubstitutions;\r\n}());\r\nexports.StringWithSubstitutions = StringWithSubstitutions;\r\nvar SpacingDefinition = /** @class */ (function () {\r\n function SpacingDefinition(top, right, bottom, left) {\r\n if (top === void 0) { top = 0; }\r\n if (right === void 0) { right = 0; }\r\n if (bottom === void 0) { bottom = 0; }\r\n if (left === void 0) { left = 0; }\r\n this.left = 0;\r\n this.top = 0;\r\n this.right = 0;\r\n this.bottom = 0;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n return SpacingDefinition;\r\n}());\r\nexports.SpacingDefinition = SpacingDefinition;\r\nvar PaddingDefinition = /** @class */ (function () {\r\n function PaddingDefinition(top, right, bottom, left) {\r\n if (top === void 0) { top = Enums.Spacing.None; }\r\n if (right === void 0) { right = Enums.Spacing.None; }\r\n if (bottom === void 0) { bottom = Enums.Spacing.None; }\r\n if (left === void 0) { left = Enums.Spacing.None; }\r\n this.top = Enums.Spacing.None;\r\n this.right = Enums.Spacing.None;\r\n this.bottom = Enums.Spacing.None;\r\n this.left = Enums.Spacing.None;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n this.left = left;\r\n }\r\n return PaddingDefinition;\r\n}());\r\nexports.PaddingDefinition = PaddingDefinition;\r\nvar SizeAndUnit = /** @class */ (function () {\r\n function SizeAndUnit(physicalSize, unit) {\r\n this.physicalSize = physicalSize;\r\n this.unit = unit;\r\n }\r\n SizeAndUnit.parse = function (input, requireUnitSpecifier) {\r\n if (requireUnitSpecifier === void 0) { requireUnitSpecifier = false; }\r\n var result = new SizeAndUnit(0, Enums.SizeUnit.Weight);\r\n if (typeof input === \"number\") {\r\n result.physicalSize = input;\r\n return result;\r\n }\r\n else if (typeof input === \"string\") {\r\n var regExp = /^([0-9]+)(px|\\*)?$/g;\r\n var matches = regExp.exec(input);\r\n var expectedMatchCount = requireUnitSpecifier ? 3 : 2;\r\n if (matches && matches.length >= expectedMatchCount) {\r\n result.physicalSize = parseInt(matches[1]);\r\n if (matches.length === 3) {\r\n if (matches[2] === \"px\") {\r\n result.unit = Enums.SizeUnit.Pixel;\r\n }\r\n }\r\n return result;\r\n }\r\n }\r\n throw new Error(\"Invalid size: \" + input);\r\n };\r\n return SizeAndUnit;\r\n}());\r\nexports.SizeAndUnit = SizeAndUnit;\r\n/**\r\n * Fast UUID generator, RFC4122 version 4 compliant.\r\n * @author Jeff Ward (jcward.com).\r\n * @license MIT license\r\n * @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\r\n **/\r\n/* eslint-disable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\nvar UUID = /** @class */ (function () {\r\n function UUID() {\r\n }\r\n UUID.generate = function () {\r\n var d0 = (Math.random() * 0xffffffff) | 0;\r\n var d1 = (Math.random() * 0xffffffff) | 0;\r\n var d2 = (Math.random() * 0xffffffff) | 0;\r\n var d3 = (Math.random() * 0xffffffff) | 0;\r\n return (UUID.lut[d0 & 0xff] +\r\n UUID.lut[(d0 >> 8) & 0xff] +\r\n UUID.lut[(d0 >> 16) & 0xff] +\r\n UUID.lut[(d0 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[d1 & 0xff] +\r\n UUID.lut[(d1 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[((d1 >> 16) & 0x0f) | 0x40] +\r\n UUID.lut[(d1 >> 24) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 & 0x3f) | 0x80] +\r\n UUID.lut[(d2 >> 8) & 0xff] +\r\n \"-\" +\r\n UUID.lut[(d2 >> 16) & 0xff] +\r\n UUID.lut[(d2 >> 24) & 0xff] +\r\n UUID.lut[d3 & 0xff] +\r\n UUID.lut[(d3 >> 8) & 0xff] +\r\n UUID.lut[(d3 >> 16) & 0xff] +\r\n UUID.lut[(d3 >> 24) & 0xff]);\r\n };\r\n UUID.initialize = function () {\r\n for (var i = 0; i < 256; i++) {\r\n UUID.lut[i] = (i < 16 ? \"0\" : \"\") + i.toString(16);\r\n }\r\n };\r\n UUID.lut = [];\r\n return UUID;\r\n}());\r\nexports.UUID = UUID;\r\nUUID.initialize();\r\n/* eslint-enable @typescript-eslint/no-extraneous-class, @typescript-eslint/naming-convention, no-bitwise */\r\n//# sourceMappingURL=shared.js.map","\"use strict\";\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Strings = void 0;\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nvar Strings = /** @class */ (function () {\r\n function Strings() {\r\n }\r\n Strings.errors = {\r\n unknownElementType: function (typeName) {\r\n return \"Unknown element type \\\"\".concat(typeName, \"\\\". Fallback will be used if present.\");\r\n },\r\n unknownActionType: function (typeName) {\r\n return \"Unknown action type \\\"\".concat(typeName, \"\\\". Fallback will be used if present.\");\r\n },\r\n elementTypeNotAllowed: function (typeName) {\r\n return \"Element type \\\"\".concat(typeName, \"\\\" is not allowed in this context.\");\r\n },\r\n actionTypeNotAllowed: function (typeName) {\r\n return \"Action type \\\"\".concat(typeName, \"\\\" is not allowed in this context.\");\r\n },\r\n invalidPropertyValue: function (value, propertyName) {\r\n return \"Invalid value \\\"\".concat(value, \"\\\" for property \\\"\").concat(propertyName, \"\\\".\");\r\n },\r\n showCardMustHaveCard: function () {\r\n return \"\\\"An Action.ShowCard must have its \\\"card\\\" property set to a valid AdaptiveCard object.\";\r\n },\r\n invalidColumnWidth: function (invalidWidth) {\r\n return \"Invalid column width \\\"\".concat(invalidWidth, \"\\\" - defaulting to \\\"auto\\\".\");\r\n },\r\n invalidCardVersion: function (defaultingToVersion) {\r\n return \"Invalid card version. Defaulting to \\\"\".concat(defaultingToVersion, \"\\\".\");\r\n },\r\n invalidVersionString: function (versionString) {\r\n return \"Invalid version string \\\"\".concat(versionString, \"\\\".\");\r\n },\r\n propertyValueNotSupported: function (value, propertyName, supportedInVersion, versionUsed) {\r\n return \"Value \\\"\".concat(value, \"\\\" for property \\\"\").concat(propertyName, \"\\\" is supported in version \").concat(supportedInVersion, \", but you are using version \").concat(versionUsed, \".\");\r\n },\r\n propertyNotSupported: function (propertyName, supportedInVersion, versionUsed) {\r\n return \"Property \\\"\".concat(propertyName, \"\\\" is supported in version \").concat(supportedInVersion, \", but you are using version \").concat(versionUsed, \".\");\r\n },\r\n indexOutOfRange: function (index) { return \"Index out of range (\".concat(index, \").\"); },\r\n elementCannotBeUsedAsInline: function () {\r\n return \"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.\";\r\n },\r\n inlineAlreadyParented: function () {\r\n return \"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.\";\r\n },\r\n interactivityNotAllowed: function () { return \"Interactivity is not allowed.\"; },\r\n inputsMustHaveUniqueId: function () { return \"All inputs must have a unique Id.\"; },\r\n choiceSetMustHaveAtLeastOneChoice: function () {\r\n return \"An Input.ChoiceSet must have at least one choice defined.\";\r\n },\r\n choiceSetChoicesMustHaveTitleAndValue: function () {\r\n return \"All choices in an Input.ChoiceSet must have their title and value properties set.\";\r\n },\r\n propertyMustBeSet: function (propertyName) { return \"Property \\\"\".concat(propertyName, \"\\\" must be set.\"); },\r\n actionHttpHeadersMustHaveNameAndValue: function () {\r\n return \"All headers of an Action.Http must have their name and value properties set.\";\r\n },\r\n tooManyActions: function (maximumActions) {\r\n return \"Maximum number of actions exceeded (\".concat(maximumActions, \").\");\r\n },\r\n tooLittleTimeDelay: function (minAutoplayDelay) {\r\n return \"Autoplay Delay is too short (\".concat(minAutoplayDelay, \").\");\r\n },\r\n tooManyCarouselPages: function (maxCarouselPages) {\r\n return \"Maximum number of Carousel pages exceeded (\".concat(maxCarouselPages, \").\");\r\n },\r\n invalidInitialPageIndex: function (initialPageIndex) {\r\n return \"InitialPage for carousel is invalid (\".concat(initialPageIndex, \").\");\r\n },\r\n columnAlreadyBelongsToAnotherSet: function () { return \"This column already belongs to another ColumnSet.\"; },\r\n invalidCardType: function () {\r\n return \"Invalid or missing card type. Make sure the card's type property is set to \\\"AdaptiveCard\\\".\";\r\n },\r\n unsupportedCardVersion: function (version, maxSupportedVersion) {\r\n return \"The specified card version (\".concat(version, \") is not supported or still in preview. The latest released card version is \").concat(maxSupportedVersion, \".\");\r\n },\r\n duplicateId: function (id) { return \"Duplicate Id \\\"\".concat(id, \"\\\".\"); },\r\n markdownProcessingNotEnabled: function () {\r\n return \"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown\";\r\n },\r\n processMarkdownEventRemoved: function () {\r\n return \"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.\";\r\n },\r\n elementAlreadyParented: function () { return \"The element already belongs to another container.\"; },\r\n actionAlreadyParented: function () { return \"The action already belongs to another element.\"; },\r\n elementTypeNotStandalone: function (typeName) {\r\n return \"Elements of type \".concat(typeName, \" cannot be used as standalone elements.\");\r\n },\r\n invalidInputLabelWidth: function () {\r\n return \"Invalid input label width. Defaulting to label width from host config.\";\r\n },\r\n };\r\n Strings.magicCodeInputCard = {\r\n tryAgain: function () { return \"That didn't work... let's try again.\"; },\r\n pleaseLogin: function () {\r\n return 'Please login in the popup. You will obtain a magic code. Paste that code below and select \"Submit\"';\r\n },\r\n enterMagicCode: function () { return \"Enter magic code\"; },\r\n pleaseEnterMagicCodeYouReceived: function () { return \"Please enter the magic code you received.\"; },\r\n submit: function () { return \"Submit\"; },\r\n cancel: function () { return \"Cancel\"; },\r\n somethingWentWrong: function () { return \"Something went wrong. This action can't be handled.\"; },\r\n authenticationFailed: function () { return \"Authentication failed.\"; }\r\n };\r\n Strings.runtime = {\r\n automaticRefreshPaused: function () { return \"Automatic refresh paused.\"; },\r\n clckToRestartAutomaticRefresh: function () { return \"Click to restart.\"; },\r\n refreshThisCard: function () { return \"Refresh this card\"; }\r\n };\r\n Strings.hints = {\r\n dontUseWeightedAndStrecthedColumnsInSameSet: function () {\r\n return \"It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space.\";\r\n }\r\n };\r\n Strings.defaults = {\r\n inlineActionTitle: function () { return \"Inline Action\"; },\r\n overflowButtonText: function () { return \"...\"; },\r\n overflowButtonTooltip: function () { return \"More options\"; },\r\n emptyElementText: function (elementType) { return \"Empty \".concat(elementType); },\r\n mediaPlayerAriaLabel: function () { return \"Media content\"; },\r\n mediaPlayerPlayMedia: function () { return \"Play media\"; },\r\n youTubeVideoPlayer: function () { return \"YouTube video player\"; },\r\n vimeoVideoPlayer: function () { return \"Vimeo video player\"; },\r\n dailymotionVideoPlayer: function () { return \"Dailymotion video player\"; },\r\n carouselNavigationPreviousTooltip: function () { return \"Previous carousel page\"; },\r\n carouselNavigationNextTooltip: function () { return \"Next carousel page\"; }\r\n };\r\n return Strings;\r\n}());\r\nexports.Strings = Strings;\r\n//# sourceMappingURL=strings.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Table = exports.TableRow = exports.TableCell = exports.StylableContainer = exports.TableColumnDefinition = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar card_elements_1 = require(\"./card-elements\");\r\nvar enums_1 = require(\"./enums\");\r\nvar registry_1 = require(\"./registry\");\r\nvar serialization_1 = require(\"./serialization\");\r\nvar shared_1 = require(\"./shared\");\r\nvar strings_1 = require(\"./strings\");\r\nvar utils_1 = require(\"./utils\");\r\nvar TableColumnDefinition = /** @class */ (function (_super) {\r\n __extends(TableColumnDefinition, _super);\r\n function TableColumnDefinition() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.width = new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight);\r\n return _this;\r\n }\r\n TableColumnDefinition.prototype.getSchemaKey = function () {\r\n return \"ColumnDefinition\";\r\n };\r\n TableColumnDefinition.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\r\n TableColumnDefinition.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\r\n TableColumnDefinition.widthProperty = new serialization_1.CustomProperty(serialization_1.Versions.v1_5, \"width\", function (sender, prop, source, context) {\r\n var result = prop.defaultValue;\r\n var value = source[prop.name];\r\n var invalidWidth = false;\r\n if (typeof value === \"number\" && !isNaN(value)) {\r\n result = new shared_1.SizeAndUnit(value, enums_1.SizeUnit.Weight);\r\n }\r\n else if (typeof value === \"string\") {\r\n try {\r\n result = shared_1.SizeAndUnit.parse(value);\r\n }\r\n catch (e) {\r\n invalidWidth = true;\r\n }\r\n }\r\n else {\r\n invalidWidth = true;\r\n }\r\n if (invalidWidth) {\r\n context.logParseEvent(sender, enums_1.ValidationEvent.InvalidPropertyValue, strings_1.Strings.errors.invalidColumnWidth(value));\r\n }\r\n return result;\r\n }, function (sender, property, target, value, context) {\r\n if (value.unit === enums_1.SizeUnit.Pixel) {\r\n context.serializeValue(target, \"width\", value.physicalSize + \"px\");\r\n }\r\n else {\r\n context.serializeNumber(target, \"width\", value.physicalSize);\r\n }\r\n }, new shared_1.SizeAndUnit(1, enums_1.SizeUnit.Weight));\r\n __decorate([\r\n (0, serialization_1.property)(TableColumnDefinition.horizontalCellContentAlignmentProperty)\r\n ], TableColumnDefinition.prototype, \"horizontalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TableColumnDefinition.verticalCellContentAlignmentProperty)\r\n ], TableColumnDefinition.prototype, \"verticalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TableColumnDefinition.widthProperty)\r\n ], TableColumnDefinition.prototype, \"width\", void 0);\r\n return TableColumnDefinition;\r\n}(serialization_1.SerializableObject));\r\nexports.TableColumnDefinition = TableColumnDefinition;\r\nvar StylableContainer = /** @class */ (function (_super) {\r\n __extends(StylableContainer, _super);\r\n function StylableContainer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._items = [];\r\n return _this;\r\n }\r\n StylableContainer.prototype.parseItem = function (source, context) {\r\n var _this = this;\r\n return context.parseCardObject(this, source, [], // Forbidden types not supported for elements for now\r\n !this.isDesignMode(), function (typeName) {\r\n return _this.createItemInstance(typeName);\r\n }, function (typeName, _errorType) {\r\n context.logParseEvent(undefined, enums_1.ValidationEvent.ElementTypeNotAllowed, strings_1.Strings.errors.elementTypeNotAllowed(typeName));\r\n });\r\n };\r\n StylableContainer.prototype.internalAddItem = function (item) {\r\n if (!item.parent) {\r\n this._items.push(item);\r\n item.setParent(this);\r\n }\r\n else {\r\n throw new Error(strings_1.Strings.errors.elementAlreadyParented());\r\n }\r\n };\r\n StylableContainer.prototype.internalRemoveItem = function (item) {\r\n var itemIndex = this._items.indexOf(item);\r\n if (itemIndex >= 0) {\r\n this._items.splice(itemIndex, 1);\r\n item.setParent(undefined);\r\n this.updateLayout();\r\n return true;\r\n }\r\n return false;\r\n };\r\n StylableContainer.prototype.internalIndexOf = function (item) {\r\n return this._items.indexOf(item);\r\n };\r\n StylableContainer.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this._items = [];\r\n var items = source[this.getCollectionPropertyName()];\r\n if (Array.isArray(items)) {\r\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\r\n var item = items_1[_i];\r\n var instance = this.parseItem(item, context);\r\n if (instance) {\r\n this._items.push(instance);\r\n }\r\n }\r\n }\r\n };\r\n StylableContainer.prototype.internalToJSON = function (target, context) {\r\n _super.prototype.internalToJSON.call(this, target, context);\r\n context.serializeArray(target, this.getCollectionPropertyName(), this._items);\r\n };\r\n StylableContainer.prototype.removeItem = function (item) {\r\n return this.internalRemoveItem(item);\r\n };\r\n StylableContainer.prototype.getItemCount = function () {\r\n return this._items.length;\r\n };\r\n StylableContainer.prototype.getItemAt = function (index) {\r\n return this._items[index];\r\n };\r\n StylableContainer.prototype.getFirstVisibleRenderedItem = function () {\r\n return this.getItemCount() > 0 ? this.getItemAt(0) : undefined;\r\n };\r\n StylableContainer.prototype.getLastVisibleRenderedItem = function () {\r\n return this.getItemCount() > 0 ? this.getItemAt(this.getItemCount() - 1) : undefined;\r\n };\r\n return StylableContainer;\r\n}(card_elements_1.StylableCardElementContainer));\r\nexports.StylableContainer = StylableContainer;\r\nvar TableCell = /** @class */ (function (_super) {\r\n __extends(TableCell, _super);\r\n function TableCell() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._columnIndex = -1;\r\n _this._cellType = \"data\";\r\n return _this;\r\n }\r\n TableCell.prototype.getHasBorder = function () {\r\n return this.parentRow.parentTable.showGridLines;\r\n };\r\n TableCell.prototype.applyBorder = function () {\r\n if (this.renderedElement && this.getHasBorder()) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.parentRow.parentTable.gridStyle);\r\n if (styleDefinition.borderColor) {\r\n var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor);\r\n if (borderColor) {\r\n this.renderedElement.style.borderRight = \"1px solid \" + borderColor;\r\n this.renderedElement.style.borderBottom = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n };\r\n TableCell.prototype.getDefaultPadding = function () {\r\n return this.getHasBackground() || this.getHasBorder()\r\n ? new shared_1.PaddingDefinition(enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small, enums_1.Spacing.Small)\r\n : _super.prototype.getDefaultPadding.call(this);\r\n };\r\n TableCell.prototype.internalRender = function () {\r\n var cellElement = _super.prototype.internalRender.call(this);\r\n if (cellElement) {\r\n cellElement.setAttribute(\"role\", this.cellType === \"data\" ? \"cell\" : \"columnheader\");\r\n cellElement.style.minWidth = \"0\";\r\n if (this.cellType === \"header\") {\r\n cellElement.setAttribute(\"scope\", \"col\");\r\n }\r\n }\r\n return cellElement;\r\n };\r\n TableCell.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n TableCell.prototype.getJsonTypeName = function () {\r\n return \"TableCell\";\r\n };\r\n TableCell.prototype.getEffectiveTextStyleDefinition = function () {\r\n if (this.cellType === \"header\") {\r\n return this.hostConfig.textStyles.columnHeader;\r\n }\r\n return _super.prototype.getEffectiveTextStyleDefinition.call(this);\r\n };\r\n TableCell.prototype.getEffectiveHorizontalAlignment = function () {\r\n if (this.horizontalAlignment !== undefined) {\r\n return this.horizontalAlignment;\r\n }\r\n if (this.parentRow.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.horizontalCellContentAlignment;\r\n }\r\n if (this.columnIndex >= 0) {\r\n var horizontalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).horizontalCellContentAlignment;\r\n if (horizontalAlignment !== undefined) {\r\n return horizontalAlignment;\r\n }\r\n }\r\n if (this.parentRow.parentTable.horizontalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.horizontalCellContentAlignment;\r\n }\r\n return _super.prototype.getEffectiveHorizontalAlignment.call(this);\r\n };\r\n TableCell.prototype.getEffectiveVerticalContentAlignment = function () {\r\n if (this.verticalContentAlignment !== undefined) {\r\n return this.verticalContentAlignment;\r\n }\r\n if (this.parentRow.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.verticalCellContentAlignment;\r\n }\r\n if (this.columnIndex >= 0) {\r\n var verticalAlignment = this.parentRow.parentTable.getColumnAt(this.columnIndex).verticalCellContentAlignment;\r\n if (verticalAlignment !== undefined) {\r\n return verticalAlignment;\r\n }\r\n }\r\n if (this.parentRow.parentTable.verticalCellContentAlignment !== undefined) {\r\n return this.parentRow.parentTable.verticalCellContentAlignment;\r\n }\r\n return _super.prototype.getEffectiveVerticalContentAlignment.call(this);\r\n };\r\n Object.defineProperty(TableCell.prototype, \"columnIndex\", {\r\n get: function () {\r\n return this._columnIndex;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableCell.prototype, \"cellType\", {\r\n get: function () {\r\n return this._cellType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableCell.prototype, \"parentRow\", {\r\n get: function () {\r\n return this.parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableCell.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return TableCell;\r\n}(card_elements_1.Container));\r\nexports.TableCell = TableCell;\r\nvar TableRow = /** @class */ (function (_super) {\r\n __extends(TableRow, _super);\r\n function TableRow() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n //#endregion\r\n TableRow.prototype.getDefaultPadding = function () {\r\n return new shared_1.PaddingDefinition(enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None, enums_1.Spacing.None);\r\n };\r\n TableRow.prototype.applyBackground = function () {\r\n if (this.renderedElement) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.style, this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));\r\n if (styleDefinition.backgroundColor) {\r\n var bgColor = (0, utils_1.stringToCssColor)(styleDefinition.backgroundColor);\r\n if (bgColor) {\r\n this.renderedElement.style.backgroundColor = bgColor;\r\n }\r\n }\r\n }\r\n };\r\n TableRow.prototype.getCollectionPropertyName = function () {\r\n return \"cells\";\r\n };\r\n TableRow.prototype.createItemInstance = function (typeName) {\r\n return !typeName || typeName === \"TableCell\" ? new TableCell() : undefined;\r\n };\r\n TableRow.prototype.internalRender = function () {\r\n var isFirstRow = this.getIsFirstRow();\r\n var cellSpacing = this.hostConfig.table.cellSpacing;\r\n var rowElement = document.createElement(\"div\");\r\n rowElement.setAttribute(\"role\", \"row\");\r\n rowElement.style.display = \"flex\";\r\n rowElement.style.flexDirection = \"row\";\r\n for (var i = 0; i < Math.min(this.getItemCount(), this.parentTable.getColumnCount()); i++) {\r\n var cell = this.getItemAt(i);\r\n // Cheating a bit in order to keep cellType read-only\r\n cell[\"_columnIndex\"] = i;\r\n cell[\"_cellType\"] =\r\n this.parentTable.firstRowAsHeaders && isFirstRow ? \"header\" : \"data\";\r\n var renderedCell = cell.render();\r\n if (renderedCell) {\r\n var column = this.parentTable.getColumnAt(i);\r\n if (column.computedWidth.unit === enums_1.SizeUnit.Pixel) {\r\n renderedCell.style.flex = \"0 0 \" + column.computedWidth.physicalSize + \"px\";\r\n }\r\n else {\r\n renderedCell.style.flex = \"1 1 \" + column.computedWidth.physicalSize + \"%\";\r\n }\r\n if (i > 0 && !this.parentTable.showGridLines && cellSpacing > 0) {\r\n renderedCell.style.marginLeft = cellSpacing + \"px\";\r\n }\r\n rowElement.appendChild(renderedCell);\r\n }\r\n }\r\n return rowElement.children.length > 0 ? rowElement : undefined;\r\n };\r\n TableRow.prototype.shouldSerialize = function (_context) {\r\n return true;\r\n };\r\n TableRow.prototype.addCell = function (cell) {\r\n this.internalAddItem(cell);\r\n };\r\n TableRow.prototype.removeCellAt = function (columnIndex) {\r\n if (columnIndex >= 0 && columnIndex < this.getItemCount()) {\r\n return this.removeItem(this.getItemAt(columnIndex));\r\n }\r\n return false;\r\n };\r\n TableRow.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof TableCell ? this.internalIndexOf(cardElement) : -1;\r\n };\r\n TableRow.prototype.ensureHasEnoughCells = function (cellCount) {\r\n while (this.getItemCount() < cellCount) {\r\n this.addCell(new TableCell());\r\n }\r\n };\r\n TableRow.prototype.getJsonTypeName = function () {\r\n return \"TableRow\";\r\n };\r\n TableRow.prototype.getIsFirstRow = function () {\r\n return this.parentTable.getItemAt(0) === this;\r\n };\r\n Object.defineProperty(TableRow.prototype, \"parentTable\", {\r\n get: function () {\r\n return this.parent;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(TableRow.prototype, \"isStandalone\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#region Schema\r\n TableRow.styleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"style\");\r\n TableRow.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\r\n TableRow.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\r\n __decorate([\r\n (0, serialization_1.property)(TableRow.horizontalCellContentAlignmentProperty)\r\n ], TableRow.prototype, \"horizontalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(TableRow.verticalCellContentAlignmentProperty)\r\n ], TableRow.prototype, \"verticalCellContentAlignment\", void 0);\r\n return TableRow;\r\n}(StylableContainer));\r\nexports.TableRow = TableRow;\r\nvar Table = /** @class */ (function (_super) {\r\n __extends(Table, _super);\r\n function Table() {\r\n //#region Schema\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this._columns = [];\r\n _this.firstRowAsHeaders = true;\r\n _this.showGridLines = true;\r\n return _this;\r\n }\r\n Object.defineProperty(Table.prototype, \"gridStyle\", {\r\n get: function () {\r\n var style = this.getValue(Table.gridStyleProperty);\r\n if (style && this.hostConfig.containerStyles.getStyleByName(style)) {\r\n return style;\r\n }\r\n return undefined;\r\n },\r\n set: function (value) {\r\n this.setValue(Table.gridStyleProperty, value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n //#endregion\r\n Table.prototype.ensureRowsHaveEnoughCells = function () {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).ensureHasEnoughCells(this.getColumnCount());\r\n }\r\n };\r\n Table.prototype.removeCellsFromColumn = function (columnIndex) {\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n this.getItemAt(i).removeCellAt(columnIndex);\r\n }\r\n };\r\n Table.prototype.getCollectionPropertyName = function () {\r\n return \"rows\";\r\n };\r\n Table.prototype.createItemInstance = function (typeName) {\r\n return !typeName || typeName === \"TableRow\" ? new TableRow() : undefined;\r\n };\r\n Table.prototype.internalParse = function (source, context) {\r\n _super.prototype.internalParse.call(this, source, context);\r\n this.ensureRowsHaveEnoughCells();\r\n };\r\n Table.prototype.internalRender = function () {\r\n if (this.getItemCount() > 0) {\r\n var totalWeights = 0;\r\n for (var _i = 0, _a = this._columns; _i < _a.length; _i++) {\r\n var column = _a[_i];\r\n if (column.width.unit === enums_1.SizeUnit.Weight) {\r\n totalWeights += column.width.physicalSize;\r\n }\r\n }\r\n for (var _b = 0, _c = this._columns; _b < _c.length; _b++) {\r\n var column = _c[_b];\r\n if (column.width.unit === enums_1.SizeUnit.Pixel) {\r\n column.computedWidth = new shared_1.SizeAndUnit(column.width.physicalSize, enums_1.SizeUnit.Pixel);\r\n }\r\n else {\r\n column.computedWidth = new shared_1.SizeAndUnit((100 / totalWeights) * column.width.physicalSize, enums_1.SizeUnit.Weight);\r\n }\r\n }\r\n var tableElement = document.createElement(\"div\");\r\n tableElement.setAttribute(\"role\", \"table\");\r\n tableElement.style.display = \"flex\";\r\n tableElement.style.flexDirection = \"column\";\r\n if (this.showGridLines) {\r\n var styleDefinition = this.hostConfig.containerStyles.getStyleByName(this.gridStyle);\r\n if (styleDefinition.borderColor) {\r\n var borderColor = (0, utils_1.stringToCssColor)(styleDefinition.borderColor);\r\n if (borderColor) {\r\n tableElement.style.borderTop = \"1px solid \" + borderColor;\r\n tableElement.style.borderLeft = \"1px solid \" + borderColor;\r\n }\r\n }\r\n }\r\n var cellSpacing = this.hostConfig.table.cellSpacing;\r\n for (var i = 0; i < this.getItemCount(); i++) {\r\n var renderedRow = this.getItemAt(i).render();\r\n if (renderedRow) {\r\n if (i > 0 && !this.showGridLines && cellSpacing > 0) {\r\n var separatorRow = document.createElement(\"div\");\r\n separatorRow.setAttribute(\"aria-hidden\", \"true\");\r\n separatorRow.style.height = cellSpacing + \"px\";\r\n tableElement.appendChild(separatorRow);\r\n }\r\n tableElement.appendChild(renderedRow);\r\n }\r\n }\r\n return tableElement;\r\n }\r\n return undefined;\r\n };\r\n Table.prototype.addColumn = function (column) {\r\n this._columns.push(column);\r\n this.ensureRowsHaveEnoughCells();\r\n };\r\n Table.prototype.removeColumn = function (column) {\r\n var index = this._columns.indexOf(column);\r\n if (index >= 0) {\r\n this.removeCellsFromColumn(index);\r\n this._columns.splice(index, 1);\r\n }\r\n };\r\n Table.prototype.getColumnCount = function () {\r\n return this._columns.length;\r\n };\r\n Table.prototype.getColumnAt = function (index) {\r\n return this._columns[index];\r\n };\r\n Table.prototype.addRow = function (row) {\r\n this.internalAddItem(row);\r\n row.ensureHasEnoughCells(this.getColumnCount());\r\n };\r\n Table.prototype.indexOf = function (cardElement) {\r\n return cardElement instanceof TableRow ? this.internalIndexOf(cardElement) : -1;\r\n };\r\n Table.prototype.getJsonTypeName = function () {\r\n return \"Table\";\r\n };\r\n Table._columnsProperty = new serialization_1.SerializableObjectCollectionProperty(serialization_1.Versions.v1_5, \"columns\", TableColumnDefinition);\r\n Table.firstRowAsHeadersProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"firstRowAsHeaders\", true);\r\n Table.showGridLinesProperty = new serialization_1.BoolProperty(serialization_1.Versions.v1_5, \"showGridLines\", true);\r\n Table.gridStyleProperty = new card_elements_1.ContainerStyleProperty(serialization_1.Versions.v1_5, \"gridStyle\");\r\n Table.horizontalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"horizontalCellContentAlignment\", enums_1.HorizontalAlignment);\r\n Table.verticalCellContentAlignmentProperty = new serialization_1.EnumProperty(serialization_1.Versions.v1_5, \"verticalCellContentAlignment\", enums_1.VerticalAlignment);\r\n __decorate([\r\n (0, serialization_1.property)(Table._columnsProperty)\r\n ], Table.prototype, \"_columns\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.firstRowAsHeadersProperty)\r\n ], Table.prototype, \"firstRowAsHeaders\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.showGridLinesProperty)\r\n ], Table.prototype, \"showGridLines\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.gridStyleProperty)\r\n ], Table.prototype, \"gridStyle\", null);\r\n __decorate([\r\n (0, serialization_1.property)(Table.horizontalCellContentAlignmentProperty)\r\n ], Table.prototype, \"horizontalCellContentAlignment\", void 0);\r\n __decorate([\r\n (0, serialization_1.property)(Table.verticalCellContentAlignmentProperty)\r\n ], Table.prototype, \"verticalCellContentAlignment\", void 0);\r\n return Table;\r\n}(StylableContainer));\r\nexports.Table = Table;\r\nregistry_1.GlobalRegistry.defaultElements.register(\"Table\", Table, serialization_1.Versions.v1_5);\r\n//# sourceMappingURL=table.js.map","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.formatText = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar AbstractTextFormatter = /** @class */ (function () {\r\n function AbstractTextFormatter(regularExpression) {\r\n this._regularExpression = regularExpression;\r\n }\r\n AbstractTextFormatter.prototype.format = function (lang, input) {\r\n var matches;\r\n if (input) {\r\n var result = input;\r\n while ((matches = this._regularExpression.exec(input)) != null) {\r\n result = result.replace(matches[0], this.internalFormat(lang, matches));\r\n }\r\n return result;\r\n }\r\n else {\r\n return input;\r\n }\r\n };\r\n return AbstractTextFormatter;\r\n}());\r\nvar DateFormatter = /** @class */ (function (_super) {\r\n __extends(DateFormatter, _super);\r\n function DateFormatter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DateFormatter.prototype.internalFormat = function (lang, matches) {\r\n var date = new Date(Date.parse(matches[1]));\r\n var format = matches[2] !== undefined ? matches[2].toLowerCase() : \"compact\";\r\n if (format !== \"compact\") {\r\n return date.toLocaleDateString(lang, {\r\n day: \"numeric\",\r\n weekday: format,\r\n month: format,\r\n year: \"numeric\"\r\n });\r\n }\r\n else {\r\n return date.toLocaleDateString();\r\n }\r\n };\r\n return DateFormatter;\r\n}(AbstractTextFormatter));\r\nvar TimeFormatter = /** @class */ (function (_super) {\r\n __extends(TimeFormatter, _super);\r\n function TimeFormatter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeFormatter.prototype.internalFormat = function (lang, matches) {\r\n var date = new Date(Date.parse(matches[1]));\r\n return date.toLocaleTimeString(lang, { hour: \"numeric\", minute: \"2-digit\" });\r\n };\r\n return TimeFormatter;\r\n}(AbstractTextFormatter));\r\nfunction formatText(lang, text) {\r\n var formatters = [\r\n new DateFormatter(/\\{{2}DATE\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\\)\\}{2}/g),\r\n new TimeFormatter(/\\{{2}TIME\\((\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:Z|(?:(?:-|\\+)\\d{2}:\\d{2})))\\)\\}{2}/g)\r\n ];\r\n var result = text;\r\n for (var _i = 0, formatters_1 = formatters; _i < formatters_1.length; _i++) {\r\n var formatter = formatters_1[_i];\r\n result = formatter.format(lang, result);\r\n }\r\n return result;\r\n}\r\nexports.formatText = formatText;\r\n//# sourceMappingURL=text-formatters.js.map","\"use strict\";\r\nvar _a;\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.debounce = exports.addCancelSelectActionEventHandler = exports.clearElementChildren = exports.getScrollY = exports.getScrollX = exports.getFitStatus = exports.truncate = exports.truncateText = exports.stringToCssColor = exports.parseEnum = exports.getEnumValueByName = exports.parseBool = exports.parseNumber = exports.parseString = exports.appendChild = exports.generateUniqueId = exports.isMobileOS = exports.isInternetExplorer = void 0;\r\n// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nvar Enums = require(\"./enums\");\r\nvar Shared = require(\"./shared\");\r\nfunction isInternetExplorer() {\r\n // The documentMode property only exists in IE\r\n return window.document.documentMode !== undefined;\r\n}\r\nexports.isInternetExplorer = isInternetExplorer;\r\nfunction isMobileOS() {\r\n var userAgent = window.navigator.userAgent;\r\n return (!!userAgent.match(/Android/i) || !!userAgent.match(/iPad/i) || !!userAgent.match(/iPhone/i));\r\n}\r\nexports.isMobileOS = isMobileOS;\r\n/**\r\n * Generate a UUID prepended with \"__ac-\"\r\n */\r\nfunction generateUniqueId() {\r\n return \"__ac-\" + Shared.UUID.generate();\r\n}\r\nexports.generateUniqueId = generateUniqueId;\r\nfunction appendChild(node, child) {\r\n if (child) {\r\n node.appendChild(child);\r\n }\r\n}\r\nexports.appendChild = appendChild;\r\nfunction parseString(obj, defaultValue) {\r\n return typeof obj === \"string\" ? obj : defaultValue;\r\n}\r\nexports.parseString = parseString;\r\nfunction parseNumber(obj, defaultValue) {\r\n return typeof obj === \"number\" ? obj : defaultValue;\r\n}\r\nexports.parseNumber = parseNumber;\r\nfunction parseBool(value, defaultValue) {\r\n if (typeof value === \"boolean\") {\r\n return value;\r\n }\r\n else if (typeof value === \"string\") {\r\n switch (value.toLowerCase()) {\r\n case \"true\":\r\n return true;\r\n case \"false\":\r\n return false;\r\n default:\r\n return defaultValue;\r\n }\r\n }\r\n return defaultValue;\r\n}\r\nexports.parseBool = parseBool;\r\nfunction getEnumValueByName(enumType, name) {\r\n // eslint-disable-next-line guard-for-in\r\n for (var key in enumType) {\r\n var keyAsNumber = parseInt(key, 10);\r\n if (keyAsNumber >= 0) {\r\n var value = enumType[key];\r\n if (value && typeof value === \"string\" && value.toLowerCase() === name.toLowerCase()) {\r\n return keyAsNumber;\r\n }\r\n }\r\n }\r\n return undefined;\r\n}\r\nexports.getEnumValueByName = getEnumValueByName;\r\nfunction parseEnum(enumType, name, defaultValue) {\r\n if (!name) {\r\n return defaultValue;\r\n }\r\n var enumValue = getEnumValueByName(enumType, name);\r\n return enumValue !== undefined ? enumValue : defaultValue;\r\n}\r\nexports.parseEnum = parseEnum;\r\nfunction stringToCssColor(color) {\r\n if (color) {\r\n var regEx = /#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi;\r\n var matches = regEx.exec(color);\r\n if (matches && matches[4]) {\r\n var a = parseInt(matches[1], 16) / 255;\r\n var r = parseInt(matches[2], 16);\r\n var g = parseInt(matches[3], 16);\r\n var b = parseInt(matches[4], 16);\r\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + a + \")\";\r\n }\r\n }\r\n return color;\r\n}\r\nexports.stringToCssColor = stringToCssColor;\r\nfunction truncateWorker(element, maxHeight, fullText, truncateAt, lineHeight) {\r\n var fits = function () {\r\n // Allow a one pixel overflow to account for rounding differences\r\n // between browsers\r\n return maxHeight - element.scrollHeight >= -1.0;\r\n };\r\n if (fits()) {\r\n return;\r\n }\r\n var breakableIndices = findBreakableIndices(fullText);\r\n var lo = 0;\r\n var hi = breakableIndices.length;\r\n var bestBreakIdx = 0;\r\n // Do a binary search for the longest string that fits\r\n while (lo < hi) {\r\n var mid = Math.floor((lo + hi) / 2);\r\n truncateAt(fullText, breakableIndices[mid]);\r\n if (fits()) {\r\n bestBreakIdx = breakableIndices[mid];\r\n lo = mid + 1;\r\n }\r\n else {\r\n hi = mid;\r\n }\r\n }\r\n truncateAt(fullText, bestBreakIdx);\r\n // If we have extra room, try to expand the string letter by letter\r\n // (covers the case where we have to break in the middle of a long word)\r\n if (lineHeight && maxHeight - element.scrollHeight >= lineHeight - 1.0) {\r\n var idx = findNextCharacter(fullText, bestBreakIdx);\r\n while (idx < fullText.length) {\r\n truncateAt(fullText, idx);\r\n if (fits()) {\r\n bestBreakIdx = idx;\r\n idx = findNextCharacter(fullText, idx);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n truncateAt(fullText, bestBreakIdx);\r\n }\r\n}\r\nfunction truncateText(element, maxHeight, lineHeight) {\r\n truncateWorker(element, maxHeight, element.innerText, function (text, idx) {\r\n element.innerText = text.substring(0, idx) + \"...\";\r\n }, lineHeight);\r\n}\r\nexports.truncateText = truncateText;\r\n/**\r\n * {@link truncate} has been deprecated and is no longer in use internally. This policy passes\r\n * content through as it always has, which is _supposed_ to be dealing with text only (see {@link\r\n * TextBlock.truncateIfSupported}), but had a bug where it might actually pass through an element\r\n * for which innerHTML yielded actual HTML (since fixed).\r\n */\r\nvar ttDeprecatedPolicy = (typeof window === 'undefined') ? undefined : (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy(\"adaptivecards#deprecatedExportedFunctionPolicy\", {\r\n createHTML: function (value) { return value; }\r\n});\r\n/** @deprecated Use {@link truncateText} instead. */\r\nfunction truncate(element, maxHeight, lineHeight) {\r\n truncateWorker(element, maxHeight, element.innerHTML, function (text, idx) {\r\n var _a;\r\n var truncatedString = text.substring(0, idx) + \"...\";\r\n var truncatedHTML = (_a = ttDeprecatedPolicy === null || ttDeprecatedPolicy === void 0 ? void 0 : ttDeprecatedPolicy.createHTML(truncatedString)) !== null && _a !== void 0 ? _a : truncatedString;\r\n element.innerHTML = truncatedHTML;\r\n }, lineHeight);\r\n}\r\nexports.truncate = truncate;\r\nfunction findBreakableIndices(html) {\r\n var results = [];\r\n var idx = findNextCharacter(html, -1);\r\n while (idx < html.length) {\r\n if (html[idx] === \" \") {\r\n results.push(idx);\r\n }\r\n idx = findNextCharacter(html, idx);\r\n }\r\n return results;\r\n}\r\nfunction findNextCharacter(html, currIdx) {\r\n currIdx += 1;\r\n // If we found the start of an HTML tag, keep advancing until we get\r\n // past it, so we don't end up truncating in the middle of the tag\r\n while (currIdx < html.length && html[currIdx] === \"<\") {\r\n while (currIdx < html.length && html[currIdx++] !== \">\") {\r\n continue;\r\n }\r\n }\r\n return currIdx;\r\n}\r\nfunction getFitStatus(element, containerEnd) {\r\n var start = element.offsetTop;\r\n var end = start + element.clientHeight;\r\n if (end <= containerEnd) {\r\n return Enums.ContainerFitStatus.FullyInContainer;\r\n }\r\n else if (start < containerEnd) {\r\n return Enums.ContainerFitStatus.Overflowing;\r\n }\r\n else {\r\n return Enums.ContainerFitStatus.FullyOutOfContainer;\r\n }\r\n}\r\nexports.getFitStatus = getFitStatus;\r\nfunction getScrollX() {\r\n return window.pageXOffset;\r\n}\r\nexports.getScrollX = getScrollX;\r\nfunction getScrollY() {\r\n return window.pageYOffset;\r\n}\r\nexports.getScrollY = getScrollY;\r\nfunction clearElementChildren(element) {\r\n while (element.firstChild) {\r\n element.removeChild(element.firstChild);\r\n }\r\n}\r\nexports.clearElementChildren = clearElementChildren;\r\nfunction addCancelSelectActionEventHandler(element) {\r\n element.onclick = function (e) {\r\n e.preventDefault();\r\n e.cancelBubble = true;\r\n };\r\n}\r\nexports.addCancelSelectActionEventHandler = addCancelSelectActionEventHandler;\r\nfunction debounce(fn, delay) {\r\n var timer;\r\n function debouncedFn() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n timer = setTimeout(function () {\r\n fn.apply(void 0, args);\r\n }, delay);\r\n }\r\n return debouncedFn;\r\n}\r\nexports.debounce = debounce;\r\n//# sourceMappingURL=utils.js.map","module.exports =\n{\n parallel : require('./parallel.js'),\n serial : require('./serial.js'),\n serialOrdered : require('./serialOrdered.js')\n};\n","// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n Object.keys(state.jobs).forEach(clean.bind(state));\n\n // reset leftover jobs\n state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n if (typeof this.jobs[key] == 'function')\n {\n this.jobs[key]();\n }\n}\n","var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n var isAsync = false;\n\n // check if async happened\n defer(function() { isAsync = true; });\n\n return function async_callback(err, result)\n {\n if (isAsync)\n {\n callback(err, result);\n }\n else\n {\n defer(function nextTick_callback()\n {\n callback(err, result);\n });\n }\n };\n}\n","module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n var nextTick = typeof setImmediate == 'function'\n ? setImmediate\n : (\n typeof process == 'object' && typeof process.nextTick == 'function'\n ? process.nextTick\n : null\n );\n\n if (nextTick)\n {\n nextTick(fn);\n }\n else\n {\n setTimeout(fn, 0);\n }\n}\n","var async = require('./async.js')\n , abort = require('./abort.js')\n ;\n\n// API\nmodule.exports = iterate;\n\n/**\n * Iterates over each job object\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {object} state - current job status\n * @param {function} callback - invoked when all elements processed\n */\nfunction iterate(list, iterator, state, callback)\n{\n // store current index\n var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;\n\n state.jobs[key] = runJob(iterator, key, list[key], function(error, output)\n {\n // don't repeat yourself\n // skip secondary callbacks\n if (!(key in state.jobs))\n {\n return;\n }\n\n // clean up jobs\n delete state.jobs[key];\n\n if (error)\n {\n // don't process rest of the results\n // stop still active jobs\n // and reset the list\n abort(state);\n }\n else\n {\n state.results[key] = output;\n }\n\n // return salvaged results\n callback(error, state.results);\n });\n}\n\n/**\n * Runs iterator over provided job element\n *\n * @param {function} iterator - iterator to invoke\n * @param {string|number} key - key/index of the element in the list of jobs\n * @param {mixed} item - job description\n * @param {function} callback - invoked after iterator is done with the job\n * @returns {function|mixed} - job abort function or something else\n */\nfunction runJob(iterator, key, item, callback)\n{\n var aborter;\n\n // allow shortcut if iterator expects only two arguments\n if (iterator.length == 2)\n {\n aborter = iterator(item, async(callback));\n }\n // otherwise go with full three arguments\n else\n {\n aborter = iterator(item, key, async(callback));\n }\n\n return aborter;\n}\n","// API\nmodule.exports = state;\n\n/**\n * Creates initial state object\n * for iteration over list\n *\n * @param {array|object} list - list to iterate over\n * @param {function|null} sortMethod - function to use for keys sort,\n * or `null` to keep them as is\n * @returns {object} - initial state object\n */\nfunction state(list, sortMethod)\n{\n var isNamedList = !Array.isArray(list)\n , initState =\n {\n index : 0,\n keyedList: isNamedList || sortMethod ? Object.keys(list) : null,\n jobs : {},\n results : isNamedList ? {} : [],\n size : isNamedList ? Object.keys(list).length : list.length\n }\n ;\n\n if (sortMethod)\n {\n // sort array keys based on it's values\n // sort object's keys just on own merit\n initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)\n {\n return sortMethod(list[a], list[b]);\n });\n }\n\n return initState;\n}\n","var abort = require('./abort.js')\n , async = require('./async.js')\n ;\n\n// API\nmodule.exports = terminator;\n\n/**\n * Terminates jobs in the attached state context\n *\n * @this AsyncKitState#\n * @param {function} callback - final callback to invoke after termination\n */\nfunction terminator(callback)\n{\n if (!Object.keys(this.jobs).length)\n {\n return;\n }\n\n // fast forward iteration index\n this.index = this.size;\n\n // abort jobs\n abort(this);\n\n // send back results we have so far\n async(callback)(null, this.results);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = parallel;\n\n/**\n * Runs iterator over provided array elements in parallel\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction parallel(list, iterator, callback)\n{\n var state = initState(list);\n\n while (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, function(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n // looks like it's the last one\n if (Object.keys(state.jobs).length === 0)\n {\n callback(null, state.results);\n return;\n }\n });\n\n state.index++;\n }\n\n return terminator.bind(state, callback);\n}\n","var serialOrdered = require('./serialOrdered.js');\n\n// Public API\nmodule.exports = serial;\n\n/**\n * Runs iterator over provided array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serial(list, iterator, callback)\n{\n return serialOrdered(list, iterator, null, callback);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = serialOrdered;\n// sorting helpers\nmodule.exports.ascending = ascending;\nmodule.exports.descending = descending;\n\n/**\n * Runs iterator over provided sorted array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} sortMethod - custom sort function\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serialOrdered(list, iterator, sortMethod, callback)\n{\n var state = initState(list, sortMethod);\n\n iterate(list, iterator, state, function iteratorHandler(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n state.index++;\n\n // are we there yet?\n if (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, iteratorHandler);\n return;\n }\n\n // done here\n callback(null, state.results);\n });\n\n return terminator.bind(state, callback);\n}\n\n/*\n * -- Sort methods\n */\n\n/**\n * sort helper to sort array elements in ascending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction ascending(a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * sort helper to sort array elements in descending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction descending(a, b)\n{\n return -1 * ascending(a, b);\n}\n","var register = require(\"./lib/register\");\nvar addHook = require(\"./lib/add\");\nvar removeHook = require(\"./lib/remove\");\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind;\nvar bindable = bind.bind(bind);\n\nfunction bindApi(hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(\n null,\n name ? [state, name] : [state]\n );\n hook.api = { remove: removeHookRef };\n hook.remove = removeHookRef;\n [\"before\", \"error\", \"after\", \"wrap\"].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind];\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);\n });\n}\n\nfunction HookSingular() {\n var singularHookName = \"h\";\n var singularHookState = {\n registry: {},\n };\n var singularHook = register.bind(null, singularHookState, singularHookName);\n bindApi(singularHook, singularHookState, singularHookName);\n return singularHook;\n}\n\nfunction HookCollection() {\n var state = {\n registry: {},\n };\n\n var hook = register.bind(null, state);\n bindApi(hook, state);\n\n return hook;\n}\n\nvar collectionHookDeprecationMessageDisplayed = false;\nfunction Hook() {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn(\n '[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4'\n );\n collectionHookDeprecationMessageDisplayed = true;\n }\n return HookCollection();\n}\n\nHook.Singular = HookSingular.bind();\nHook.Collection = HookCollection.bind();\n\nmodule.exports = Hook;\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook;\nmodule.exports.Singular = Hook.Singular;\nmodule.exports.Collection = Hook.Collection;\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n\nvar isNode = typeof process !== \"undefined\" && process.versions != null && process.versions.node != null;\n\nvar isWebWorker = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) === \"object\" && self.constructor && self.constructor.name === \"DedicatedWorkerGlobalScope\";\n\n/**\n * @see https://github.com/jsdom/jsdom/releases/tag/12.0.0\n * @see https://github.com/jsdom/jsdom/issues/1537\n */\nvar isJsDom = typeof window !== \"undefined\" && window.name === \"nodejs\" || typeof navigator !== \"undefined\" && (navigator.userAgent.includes(\"Node.js\") || navigator.userAgent.includes(\"jsdom\"));\n\nvar isDeno = typeof Deno !== \"undefined\" && typeof Deno.version !== \"undefined\" && typeof Deno.version.deno !== \"undefined\";\n\nexports.isBrowser = isBrowser;\nexports.isWebWorker = isWebWorker;\nexports.isNode = isNode;\nexports.isJsDom = isJsDom;\nexports.isDeno = isDeno;","var util = require('util');\nvar Stream = require('stream').Stream;\nvar DelayedStream = require('delayed-stream');\n\nmodule.exports = CombinedStream;\nfunction CombinedStream() {\n this.writable = false;\n this.readable = true;\n this.dataSize = 0;\n this.maxDataSize = 2 * 1024 * 1024;\n this.pauseStreams = true;\n\n this._released = false;\n this._streams = [];\n this._currentStream = null;\n this._insideLoop = false;\n this._pendingNext = false;\n}\nutil.inherits(CombinedStream, Stream);\n\nCombinedStream.create = function(options) {\n var combinedStream = new this();\n\n options = options || {};\n for (var option in options) {\n combinedStream[option] = options[option];\n }\n\n return combinedStream;\n};\n\nCombinedStream.isStreamLike = function(stream) {\n return (typeof stream !== 'function')\n && (typeof stream !== 'string')\n && (typeof stream !== 'boolean')\n && (typeof stream !== 'number')\n && (!Buffer.isBuffer(stream));\n};\n\nCombinedStream.prototype.append = function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n\n if (isStreamLike) {\n if (!(stream instanceof DelayedStream)) {\n var newStream = DelayedStream.create(stream, {\n maxDataSize: Infinity,\n pauseStream: this.pauseStreams,\n });\n stream.on('data', this._checkDataSize.bind(this));\n stream = newStream;\n }\n\n this._handleErrors(stream);\n\n if (this.pauseStreams) {\n stream.pause();\n }\n }\n\n this._streams.push(stream);\n return this;\n};\n\nCombinedStream.prototype.pipe = function(dest, options) {\n Stream.prototype.pipe.call(this, dest, options);\n this.resume();\n return dest;\n};\n\nCombinedStream.prototype._getNext = function() {\n this._currentStream = null;\n\n if (this._insideLoop) {\n this._pendingNext = true;\n return; // defer call\n }\n\n this._insideLoop = true;\n try {\n do {\n this._pendingNext = false;\n this._realGetNext();\n } while (this._pendingNext);\n } finally {\n this._insideLoop = false;\n }\n};\n\nCombinedStream.prototype._realGetNext = function() {\n var stream = this._streams.shift();\n\n\n if (typeof stream == 'undefined') {\n this.end();\n return;\n }\n\n if (typeof stream !== 'function') {\n this._pipeNext(stream);\n return;\n }\n\n var getStream = stream;\n getStream(function(stream) {\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('data', this._checkDataSize.bind(this));\n this._handleErrors(stream);\n }\n\n this._pipeNext(stream);\n }.bind(this));\n};\n\nCombinedStream.prototype._pipeNext = function(stream) {\n this._currentStream = stream;\n\n var isStreamLike = CombinedStream.isStreamLike(stream);\n if (isStreamLike) {\n stream.on('end', this._getNext.bind(this));\n stream.pipe(this, {end: false});\n return;\n }\n\n var value = stream;\n this.write(value);\n this._getNext();\n};\n\nCombinedStream.prototype._handleErrors = function(stream) {\n var self = this;\n stream.on('error', function(err) {\n self._emitError(err);\n });\n};\n\nCombinedStream.prototype.write = function(data) {\n this.emit('data', data);\n};\n\nCombinedStream.prototype.pause = function() {\n if (!this.pauseStreams) {\n return;\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();\n this.emit('pause');\n};\n\nCombinedStream.prototype.resume = function() {\n if (!this._released) {\n this._released = true;\n this.writable = true;\n this._getNext();\n }\n\n if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();\n this.emit('resume');\n};\n\nCombinedStream.prototype.end = function() {\n this._reset();\n this.emit('end');\n};\n\nCombinedStream.prototype.destroy = function() {\n this._reset();\n this.emit('close');\n};\n\nCombinedStream.prototype._reset = function() {\n this.writable = false;\n this._streams = [];\n this._currentStream = null;\n};\n\nCombinedStream.prototype._checkDataSize = function() {\n this._updateDataSize();\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';\n this._emitError(new Error(message));\n};\n\nCombinedStream.prototype._updateDataSize = function() {\n this.dataSize = 0;\n\n var self = this;\n this._streams.forEach(function(stream) {\n if (!stream.dataSize) {\n return;\n }\n\n self.dataSize += stream.dataSize;\n });\n\n if (this._currentStream && this._currentStream.dataSize) {\n this.dataSize += this._currentStream.dataSize;\n }\n};\n\nCombinedStream.prototype._emitError = function(err) {\n this._reset();\n this.emit('error', err);\n};\n","const nodeFetch = require('node-fetch')\nconst realFetch = nodeFetch.default || nodeFetch\n\nconst fetch = function (url, options) {\n // Support schemaless URIs on the server for parity with the browser.\n // Ex: //github.com/ -> https://github.com/\n if (/^\\/\\//.test(url)) {\n url = 'https:' + url\n }\n return realFetch.call(this, url, options)\n}\n\nfetch.ponyfill = true\n\nmodule.exports = exports = fetch\nexports.fetch = fetch\nexports.Headers = nodeFetch.Headers\nexports.Request = nodeFetch.Request\nexports.Response = nodeFetch.Response\n\n// Needed for TypeScript consumers without esModuleInterop.\nexports.default = fetch\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","var Stream = require('stream').Stream;\nvar util = require('util');\n\nmodule.exports = DelayedStream;\nfunction DelayedStream() {\n this.source = null;\n this.dataSize = 0;\n this.maxDataSize = 1024 * 1024;\n this.pauseStream = true;\n\n this._maxDataSizeExceeded = false;\n this._released = false;\n this._bufferedEvents = [];\n}\nutil.inherits(DelayedStream, Stream);\n\nDelayedStream.create = function(source, options) {\n var delayedStream = new this();\n\n options = options || {};\n for (var option in options) {\n delayedStream[option] = options[option];\n }\n\n delayedStream.source = source;\n\n var realEmit = source.emit;\n source.emit = function() {\n delayedStream._handleEmit(arguments);\n return realEmit.apply(source, arguments);\n };\n\n source.on('error', function() {});\n if (delayedStream.pauseStream) {\n source.pause();\n }\n\n return delayedStream;\n};\n\nObject.defineProperty(DelayedStream.prototype, 'readable', {\n configurable: true,\n enumerable: true,\n get: function() {\n return this.source.readable;\n }\n});\n\nDelayedStream.prototype.setEncoding = function() {\n return this.source.setEncoding.apply(this.source, arguments);\n};\n\nDelayedStream.prototype.resume = function() {\n if (!this._released) {\n this.release();\n }\n\n this.source.resume();\n};\n\nDelayedStream.prototype.pause = function() {\n this.source.pause();\n};\n\nDelayedStream.prototype.release = function() {\n this._released = true;\n\n this._bufferedEvents.forEach(function(args) {\n this.emit.apply(this, args);\n }.bind(this));\n this._bufferedEvents = [];\n};\n\nDelayedStream.prototype.pipe = function() {\n var r = Stream.prototype.pipe.apply(this, arguments);\n this.resume();\n return r;\n};\n\nDelayedStream.prototype._handleEmit = function(args) {\n if (this._released) {\n this.emit.apply(this, args);\n return;\n }\n\n if (args[0] === 'data') {\n this.dataSize += args[1].length;\n this._checkIfMaxDataSizeExceeded();\n }\n\n this._bufferedEvents.push(args);\n};\n\nDelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {\n if (this._maxDataSizeExceeded) {\n return;\n }\n\n if (this.dataSize <= this.maxDataSize) {\n return;\n }\n\n this._maxDataSizeExceeded = true;\n var message =\n 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'\n this.emit('error', new Error(message));\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","'use strict';\n\nvar iconvLite = require('iconv-lite');\n\n// Expose to the world\nmodule.exports.convert = convert;\n\n/**\n * Convert encoding of an UTF-8 string or a buffer\n *\n * @param {String|Buffer} str String to be converted\n * @param {String} to Encoding to be converted to\n * @param {String} [from='UTF-8'] Encoding to be converted from\n * @return {Buffer} Encoded string\n */\nfunction convert(str, to, from) {\n from = checkEncoding(from || 'UTF-8');\n to = checkEncoding(to || 'UTF-8');\n str = str || '';\n\n var result;\n\n if (from !== 'UTF-8' && typeof str === 'string') {\n str = Buffer.from(str, 'binary');\n }\n\n if (from === to) {\n if (typeof str === 'string') {\n result = Buffer.from(str);\n } else {\n result = str;\n }\n } else {\n try {\n result = convertIconvLite(str, to, from);\n } catch (E) {\n console.error(E);\n result = str;\n }\n }\n\n if (typeof result === 'string') {\n result = Buffer.from(result, 'utf-8');\n }\n\n return result;\n}\n\n/**\n * Convert encoding of astring with iconv-lite\n *\n * @param {String|Buffer} str String to be converted\n * @param {String} to Encoding to be converted to\n * @param {String} [from='UTF-8'] Encoding to be converted from\n * @return {Buffer} Encoded string\n */\nfunction convertIconvLite(str, to, from) {\n if (to === 'UTF-8') {\n return iconvLite.decode(str, from);\n } else if (from === 'UTF-8') {\n return iconvLite.encode(str, to);\n } else {\n return iconvLite.encode(iconvLite.decode(str, from), to);\n }\n}\n\n/**\n * Converts charset name if needed\n *\n * @param {String} name Character set\n * @return {String} Character set name\n */\nfunction checkEncoding(name) {\n return (name || '')\n .toString()\n .trim()\n .replace(/^latin[\\-_]?(\\d+)$/i, 'ISO-8859-$1')\n .replace(/^win(?:dows)?[\\-_]?(\\d+)$/i, 'WINDOWS-$1')\n .replace(/^utf[\\-_]?(\\d+)$/i, 'UTF-$1')\n .replace(/^ks_c_5601\\-1987$/i, 'CP949')\n .replace(/^us[\\-_]?ascii$/i, 'ASCII')\n .toUpperCase();\n}\n","var debug;\n\nmodule.exports = function () {\n if (!debug) {\n try {\n /* eslint global-require: off */\n debug = require(\"debug\")(\"follow-redirects\");\n }\n catch (error) { /* */ }\n if (typeof debug !== \"function\") {\n debug = function () { /* */ };\n }\n }\n debug.apply(null, arguments);\n};\n","var url = require(\"url\");\nvar URL = url.URL;\nvar http = require(\"http\");\nvar https = require(\"https\");\nvar Writable = require(\"stream\").Writable;\nvar assert = require(\"assert\");\nvar debug = require(\"./debug\");\n\n// Whether to use the native URL object or the legacy url module\nvar useNativeURL = false;\ntry {\n assert(new URL());\n}\ncatch (error) {\n useNativeURL = error.code === \"ERR_INVALID_URL\";\n}\n\n// URL fields to preserve in copy operations\nvar preservedUrlFields = [\n \"auth\",\n \"host\",\n \"hostname\",\n \"href\",\n \"path\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"query\",\n \"search\",\n \"hash\",\n];\n\n// Create handlers that pass events from native requests\nvar events = [\"abort\", \"aborted\", \"connect\", \"error\", \"socket\", \"timeout\"];\nvar eventHandlers = Object.create(null);\nevents.forEach(function (event) {\n eventHandlers[event] = function (arg1, arg2, arg3) {\n this._redirectable.emit(event, arg1, arg2, arg3);\n };\n});\n\n// Error types with codes\nvar InvalidUrlError = createErrorType(\n \"ERR_INVALID_URL\",\n \"Invalid URL\",\n TypeError\n);\nvar RedirectionError = createErrorType(\n \"ERR_FR_REDIRECTION_FAILURE\",\n \"Redirected request failed\"\n);\nvar TooManyRedirectsError = createErrorType(\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"Maximum number of redirects exceeded\",\n RedirectionError\n);\nvar MaxBodyLengthExceededError = createErrorType(\n \"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n \"Request body larger than maxBodyLength limit\"\n);\nvar WriteAfterEndError = createErrorType(\n \"ERR_STREAM_WRITE_AFTER_END\",\n \"write after end\"\n);\n\n// istanbul ignore next\nvar destroy = Writable.prototype.destroy || noop;\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n this._sanitizeOptions(options);\n this._options = options;\n this._ended = false;\n this._ending = false;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0;\n this._requestBodyBuffers = [];\n\n // Attach a callback if passed\n if (responseCallback) {\n this.on(\"response\", responseCallback);\n }\n\n // React to responses of native requests\n var self = this;\n this._onNativeResponse = function (response) {\n try {\n self._processResponse(response);\n }\n catch (cause) {\n self.emit(\"error\", cause instanceof RedirectionError ?\n cause : new RedirectionError({ cause: cause }));\n }\n };\n\n // Perform the first request\n this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort = function () {\n destroyRequest(this._currentRequest);\n this._currentRequest.abort();\n this.emit(\"abort\");\n};\n\nRedirectableRequest.prototype.destroy = function (error) {\n destroyRequest(this._currentRequest, error);\n destroy.call(this, error);\n return this;\n};\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n // Writing is not allowed if end has been called\n if (this._ending) {\n throw new WriteAfterEndError();\n }\n\n // Validate input and shift parameters if necessary\n if (!isString(data) && !isBuffer(data)) {\n throw new TypeError(\"data should be a string, Buffer or Uint8Array\");\n }\n if (isFunction(encoding)) {\n callback = encoding;\n encoding = null;\n }\n\n // Ignore empty buffers, since writing them doesn't invoke the callback\n // https://github.com/nodejs/node/issues/22066\n if (data.length === 0) {\n if (callback) {\n callback();\n }\n return;\n }\n // Only write when we don't exceed the maximum body length\n if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n this._requestBodyLength += data.length;\n this._requestBodyBuffers.push({ data: data, encoding: encoding });\n this._currentRequest.write(data, encoding, callback);\n }\n // Error when we exceed the maximum body length\n else {\n this.emit(\"error\", new MaxBodyLengthExceededError());\n this.abort();\n }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n // Shift parameters if necessary\n if (isFunction(data)) {\n callback = data;\n data = encoding = null;\n }\n else if (isFunction(encoding)) {\n callback = encoding;\n encoding = null;\n }\n\n // Write data if needed and end\n if (!data) {\n this._ended = this._ending = true;\n this._currentRequest.end(null, null, callback);\n }\n else {\n var self = this;\n var currentRequest = this._currentRequest;\n this.write(data, encoding, function () {\n self._ended = true;\n currentRequest.end(null, null, callback);\n });\n this._ending = true;\n }\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n this._options.headers[name] = value;\n this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n delete this._options.headers[name];\n this._currentRequest.removeHeader(name);\n};\n\n// Global timeout for all underlying requests\nRedirectableRequest.prototype.setTimeout = function (msecs, callback) {\n var self = this;\n\n // Destroys the socket on timeout\n function destroyOnTimeout(socket) {\n socket.setTimeout(msecs);\n socket.removeListener(\"timeout\", socket.destroy);\n socket.addListener(\"timeout\", socket.destroy);\n }\n\n // Sets up a timer to trigger a timeout event\n function startTimer(socket) {\n if (self._timeout) {\n clearTimeout(self._timeout);\n }\n self._timeout = setTimeout(function () {\n self.emit(\"timeout\");\n clearTimer();\n }, msecs);\n destroyOnTimeout(socket);\n }\n\n // Stops a timeout from triggering\n function clearTimer() {\n // Clear the timeout\n if (self._timeout) {\n clearTimeout(self._timeout);\n self._timeout = null;\n }\n\n // Clean up all attached listeners\n self.removeListener(\"abort\", clearTimer);\n self.removeListener(\"error\", clearTimer);\n self.removeListener(\"response\", clearTimer);\n self.removeListener(\"close\", clearTimer);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!self.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }\n\n // Attach callback if passed\n if (callback) {\n this.on(\"timeout\", callback);\n }\n\n // Start the timer if or when the socket is opened\n if (this.socket) {\n startTimer(this.socket);\n }\n else {\n this._currentRequest.once(\"socket\", startTimer);\n }\n\n // Clean up on events\n this.on(\"socket\", destroyOnTimeout);\n this.on(\"abort\", clearTimer);\n this.on(\"error\", clearTimer);\n this.on(\"response\", clearTimer);\n this.on(\"close\", clearTimer);\n\n return this;\n};\n\n// Proxy all other public ClientRequest methods\n[\n \"flushHeaders\", \"getHeader\",\n \"setNoDelay\", \"setSocketKeepAlive\",\n].forEach(function (method) {\n RedirectableRequest.prototype[method] = function (a, b) {\n return this._currentRequest[method](a, b);\n };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n Object.defineProperty(RedirectableRequest.prototype, property, {\n get: function () { return this._currentRequest[property]; },\n });\n});\n\nRedirectableRequest.prototype._sanitizeOptions = function (options) {\n // Ensure headers are always present\n if (!options.headers) {\n options.headers = {};\n }\n\n // Since http.request treats host as an alias of hostname,\n // but the url module interprets host as hostname plus port,\n // eliminate the host property to avoid confusion.\n if (options.host) {\n // Use hostname if set, because it has precedence\n if (!options.hostname) {\n options.hostname = options.host;\n }\n delete options.host;\n }\n\n // Complete the URL object when necessary\n if (!options.pathname && options.path) {\n var searchPos = options.path.indexOf(\"?\");\n if (searchPos < 0) {\n options.pathname = options.path;\n }\n else {\n options.pathname = options.path.substring(0, searchPos);\n options.search = options.path.substring(searchPos);\n }\n }\n};\n\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n // Load the native protocol\n var protocol = this._options.protocol;\n var nativeProtocol = this._options.nativeProtocols[protocol];\n if (!nativeProtocol) {\n throw new TypeError(\"Unsupported protocol \" + protocol);\n }\n\n // If specified, use the agent corresponding to the protocol\n // (HTTP and HTTPS use different types of agents)\n if (this._options.agents) {\n var scheme = protocol.slice(0, -1);\n this._options.agent = this._options.agents[scheme];\n }\n\n // Create the native request and set up its event handlers\n var request = this._currentRequest =\n nativeProtocol.request(this._options, this._onNativeResponse);\n request._redirectable = this;\n for (var event of events) {\n request.on(event, eventHandlers[event]);\n }\n\n // RFC7230§5.3.1: When making a request directly to an origin server, […]\n // a client MUST send only the absolute path […] as the request-target.\n this._currentUrl = /^\\//.test(this._options.path) ?\n url.format(this._options) :\n // When making a request to a proxy, […]\n // a client MUST send the target URI in absolute-form […].\n this._options.path;\n\n // End a redirected request\n // (The first request must be ended explicitly with RedirectableRequest#end)\n if (this._isRedirect) {\n // Write the request entity and end\n var i = 0;\n var self = this;\n var buffers = this._requestBodyBuffers;\n (function writeNext(error) {\n // Only write if this request has not been redirected yet\n /* istanbul ignore else */\n if (request === self._currentRequest) {\n // Report any write errors\n /* istanbul ignore if */\n if (error) {\n self.emit(\"error\", error);\n }\n // Write the next buffer if there are still left\n else if (i < buffers.length) {\n var buffer = buffers[i++];\n /* istanbul ignore else */\n if (!request.finished) {\n request.write(buffer.data, buffer.encoding, writeNext);\n }\n }\n // End the request if `end` has been called on us\n else if (self._ended) {\n request.end();\n }\n }\n }());\n }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n // Store the redirected response\n var statusCode = response.statusCode;\n if (this._options.trackRedirects) {\n this._redirects.push({\n url: this._currentUrl,\n headers: response.headers,\n statusCode: statusCode,\n });\n }\n\n // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n // that further action needs to be taken by the user agent in order to\n // fulfill the request. If a Location header field is provided,\n // the user agent MAY automatically redirect its request to the URI\n // referenced by the Location field value,\n // even if the specific status code is not understood.\n\n // If the response is not a redirect; return it as-is\n var location = response.headers.location;\n if (!location || this._options.followRedirects === false ||\n statusCode < 300 || statusCode >= 400) {\n response.responseUrl = this._currentUrl;\n response.redirects = this._redirects;\n this.emit(\"response\", response);\n\n // Clean up\n this._requestBodyBuffers = [];\n return;\n }\n\n // The response is a redirect, so abort the current request\n destroyRequest(this._currentRequest);\n // Discard the remainder of the response to avoid waiting for data\n response.destroy();\n\n // RFC7231§6.4: A client SHOULD detect and intervene\n // in cyclical redirections (i.e., \"infinite\" redirection loops).\n if (++this._redirectCount > this._options.maxRedirects) {\n throw new TooManyRedirectsError();\n }\n\n // Store the request headers if applicable\n var requestHeaders;\n var beforeRedirect = this._options.beforeRedirect;\n if (beforeRedirect) {\n requestHeaders = Object.assign({\n // The Host header was set by nativeProtocol.request\n Host: response.req.getHeader(\"host\"),\n }, this._options.headers);\n }\n\n // RFC7231§6.4: Automatic redirection needs to done with\n // care for methods not known to be safe, […]\n // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change\n // the request method from POST to GET for the subsequent request.\n var method = this._options.method;\n if ((statusCode === 301 || statusCode === 302) && this._options.method === \"POST\" ||\n // RFC7231§6.4.4: The 303 (See Other) status code indicates that\n // the server is redirecting the user agent to a different resource […]\n // A user agent can perform a retrieval request targeting that URI\n // (a GET or HEAD request if using HTTP) […]\n (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {\n this._options.method = \"GET\";\n // Drop a possible entity and headers related to it\n this._requestBodyBuffers = [];\n removeMatchingHeaders(/^content-/i, this._options.headers);\n }\n\n // Drop the Host header, as the redirect might lead to a different host\n var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);\n\n // If the redirect is relative, carry over the host of the last request\n var currentUrlParts = parseUrl(this._currentUrl);\n var currentHost = currentHostHeader || currentUrlParts.host;\n var currentUrl = /^\\w+:/.test(location) ? this._currentUrl :\n url.format(Object.assign(currentUrlParts, { host: currentHost }));\n\n // Create the redirected request\n var redirectUrl = resolveUrl(location, currentUrl);\n debug(\"redirecting to\", redirectUrl.href);\n this._isRedirect = true;\n spreadUrlObject(redirectUrl, this._options);\n\n // Drop confidential headers when redirecting to a less secure protocol\n // or to a different domain that is not a superdomain\n if (redirectUrl.protocol !== currentUrlParts.protocol &&\n redirectUrl.protocol !== \"https:\" ||\n redirectUrl.host !== currentHost &&\n !isSubdomain(redirectUrl.host, currentHost)) {\n removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);\n }\n\n // Evaluate the beforeRedirect callback\n if (isFunction(beforeRedirect)) {\n var responseDetails = {\n headers: response.headers,\n statusCode: statusCode,\n };\n var requestDetails = {\n url: currentUrl,\n method: method,\n headers: requestHeaders,\n };\n beforeRedirect(this._options, responseDetails, requestDetails);\n this._sanitizeOptions(this._options);\n }\n\n // Perform the redirected request\n this._performRequest();\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n // Executes a request, following redirects\n function request(input, options, callback) {\n // Parse parameters, ensuring that input is an object\n if (isURL(input)) {\n input = spreadUrlObject(input);\n }\n else if (isString(input)) {\n input = spreadUrlObject(parseUrl(input));\n }\n else {\n callback = options;\n options = validateUrl(input);\n input = { protocol: protocol };\n }\n if (isFunction(options)) {\n callback = options;\n options = null;\n }\n\n // Set defaults\n options = Object.assign({\n maxRedirects: exports.maxRedirects,\n maxBodyLength: exports.maxBodyLength,\n }, input, options);\n options.nativeProtocols = nativeProtocols;\n if (!isString(options.host) && !isString(options.hostname)) {\n options.hostname = \"::1\";\n }\n\n assert.equal(options.protocol, protocol, \"protocol mismatch\");\n debug(\"options\", options);\n return new RedirectableRequest(options, callback);\n }\n\n // Executes a GET request, following redirects\n function get(input, options, callback) {\n var wrappedRequest = wrappedProtocol.request(input, options, callback);\n wrappedRequest.end();\n return wrappedRequest;\n }\n\n // Expose the properties on the wrapped protocol\n Object.defineProperties(wrappedProtocol, {\n request: { value: request, configurable: true, enumerable: true, writable: true },\n get: { value: get, configurable: true, enumerable: true, writable: true },\n });\n });\n return exports;\n}\n\nfunction noop() { /* empty */ }\n\nfunction parseUrl(input) {\n var parsed;\n /* istanbul ignore else */\n if (useNativeURL) {\n parsed = new URL(input);\n }\n else {\n // Ensure the URL is valid and absolute\n parsed = validateUrl(url.parse(input));\n if (!isString(parsed.protocol)) {\n throw new InvalidUrlError({ input });\n }\n }\n return parsed;\n}\n\nfunction resolveUrl(relative, base) {\n /* istanbul ignore next */\n return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));\n}\n\nfunction validateUrl(input) {\n if (/^\\[/.test(input.hostname) && !/^\\[[:0-9a-f]+\\]$/i.test(input.hostname)) {\n throw new InvalidUrlError({ input: input.href || input });\n }\n if (/^\\[/.test(input.host) && !/^\\[[:0-9a-f]+\\](:\\d+)?$/i.test(input.host)) {\n throw new InvalidUrlError({ input: input.href || input });\n }\n return input;\n}\n\nfunction spreadUrlObject(urlObject, target) {\n var spread = target || {};\n for (var key of preservedUrlFields) {\n spread[key] = urlObject[key];\n }\n\n // Fix IPv6 hostname\n if (spread.hostname.startsWith(\"[\")) {\n spread.hostname = spread.hostname.slice(1, -1);\n }\n // Ensure port is a number\n if (spread.port !== \"\") {\n spread.port = Number(spread.port);\n }\n // Concatenate path\n spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;\n\n return spread;\n}\n\nfunction removeMatchingHeaders(regex, headers) {\n var lastValue;\n for (var header in headers) {\n if (regex.test(header)) {\n lastValue = headers[header];\n delete headers[header];\n }\n }\n return (lastValue === null || typeof lastValue === \"undefined\") ?\n undefined : String(lastValue).trim();\n}\n\nfunction createErrorType(code, message, baseClass) {\n // Create constructor\n function CustomError(properties) {\n Error.captureStackTrace(this, this.constructor);\n Object.assign(this, properties || {});\n this.code = code;\n this.message = this.cause ? message + \": \" + this.cause.message : message;\n }\n\n // Attach constructor and set default properties\n CustomError.prototype = new (baseClass || Error)();\n Object.defineProperties(CustomError.prototype, {\n constructor: {\n value: CustomError,\n enumerable: false,\n },\n name: {\n value: \"Error [\" + code + \"]\",\n enumerable: false,\n },\n });\n return CustomError;\n}\n\nfunction destroyRequest(request, error) {\n for (var event of events) {\n request.removeListener(event, eventHandlers[event]);\n }\n request.on(\"error\", noop);\n request.destroy(error);\n}\n\nfunction isSubdomain(subdomain, domain) {\n assert(isString(subdomain) && isString(domain));\n var dot = subdomain.length - domain.length - 1;\n return dot > 0 && subdomain[dot] === \".\" && subdomain.endsWith(domain);\n}\n\nfunction isString(value) {\n return typeof value === \"string\" || value instanceof String;\n}\n\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\nfunction isBuffer(value) {\n return typeof value === \"object\" && (\"length\" in value);\n}\n\nfunction isURL(value) {\n return URL && value instanceof URL;\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n","var CombinedStream = require('combined-stream');\nvar util = require('util');\nvar path = require('path');\nvar http = require('http');\nvar https = require('https');\nvar parseUrl = require('url').parse;\nvar fs = require('fs');\nvar Stream = require('stream').Stream;\nvar mime = require('mime-types');\nvar asynckit = require('asynckit');\nvar populate = require('./populate.js');\n\n// Public API\nmodule.exports = FormData;\n\n// make it a Stream\nutil.inherits(FormData, CombinedStream);\n\n/**\n * Create readable \"multipart/form-data\" streams.\n * Can be used to submit forms\n * and file uploads to other web applications.\n *\n * @constructor\n * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream\n */\nfunction FormData(options) {\n if (!(this instanceof FormData)) {\n return new FormData(options);\n }\n\n this._overheadLength = 0;\n this._valueLength = 0;\n this._valuesToMeasure = [];\n\n CombinedStream.call(this);\n\n options = options || {};\n for (var option in options) {\n this[option] = options[option];\n }\n}\n\nFormData.LINE_BREAK = '\\r\\n';\nFormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\nFormData.prototype.append = function(field, value, options) {\n\n options = options || {};\n\n // allow filename as single option\n if (typeof options == 'string') {\n options = {filename: options};\n }\n\n var append = CombinedStream.prototype.append.bind(this);\n\n // all that streamy business can't handle numbers\n if (typeof value == 'number') {\n value = '' + value;\n }\n\n // https://github.com/felixge/node-form-data/issues/38\n if (util.isArray(value)) {\n // Please convert your array into string\n // the way web server expects it\n this._error(new Error('Arrays are not supported.'));\n return;\n }\n\n var header = this._multiPartHeader(field, value, options);\n var footer = this._multiPartFooter();\n\n append(header);\n append(value);\n append(footer);\n\n // pass along options.knownLength\n this._trackLength(header, value, options);\n};\n\nFormData.prototype._trackLength = function(header, value, options) {\n var valueLength = 0;\n\n // used w/ getLengthSync(), when length is known.\n // e.g. for streaming directly from a remote server,\n // w/ a known file a size, and not wanting to wait for\n // incoming file to finish to get its size.\n if (options.knownLength != null) {\n valueLength += +options.knownLength;\n } else if (Buffer.isBuffer(value)) {\n valueLength = value.length;\n } else if (typeof value === 'string') {\n valueLength = Buffer.byteLength(value);\n }\n\n this._valueLength += valueLength;\n\n // @check why add CRLF? does this account for custom/multiple CRLFs?\n this._overheadLength +=\n Buffer.byteLength(header) +\n FormData.LINE_BREAK.length;\n\n // empty or either doesn't have path or not an http response or not a stream\n if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {\n return;\n }\n\n // no need to bother with the length\n if (!options.knownLength) {\n this._valuesToMeasure.push(value);\n }\n};\n\nFormData.prototype._lengthRetriever = function(value, callback) {\n\n if (value.hasOwnProperty('fd')) {\n\n // take read range into a account\n // `end` = Infinity –> read file till the end\n //\n // TODO: Looks like there is bug in Node fs.createReadStream\n // it doesn't respect `end` options without `start` options\n // Fix it when node fixes it.\n // https://github.com/joyent/node/issues/7819\n if (value.end != undefined && value.end != Infinity && value.start != undefined) {\n\n // when end specified\n // no need to calculate range\n // inclusive, starts with 0\n callback(null, value.end + 1 - (value.start ? value.start : 0));\n\n // not that fast snoopy\n } else {\n // still need to fetch file size from fs\n fs.stat(value.path, function(err, stat) {\n\n var fileSize;\n\n if (err) {\n callback(err);\n return;\n }\n\n // update final size based on the range options\n fileSize = stat.size - (value.start ? value.start : 0);\n callback(null, fileSize);\n });\n }\n\n // or http response\n } else if (value.hasOwnProperty('httpVersion')) {\n callback(null, +value.headers['content-length']);\n\n // or request stream http://github.com/mikeal/request\n } else if (value.hasOwnProperty('httpModule')) {\n // wait till response come back\n value.on('response', function(response) {\n value.pause();\n callback(null, +response.headers['content-length']);\n });\n value.resume();\n\n // something else\n } else {\n callback('Unknown stream');\n }\n};\n\nFormData.prototype._multiPartHeader = function(field, value, options) {\n // custom header specified (as string)?\n // it becomes responsible for boundary\n // (e.g. to handle extra CRLFs on .NET servers)\n if (typeof options.header == 'string') {\n return options.header;\n }\n\n var contentDisposition = this._getContentDisposition(value, options);\n var contentType = this._getContentType(value, options);\n\n var contents = '';\n var headers = {\n // add custom disposition as third element or keep it two elements if not\n 'Content-Disposition': ['form-data', 'name=\"' + field + '\"'].concat(contentDisposition || []),\n // if no content type. allow it to be empty array\n 'Content-Type': [].concat(contentType || [])\n };\n\n // allow custom headers.\n if (typeof options.header == 'object') {\n populate(headers, options.header);\n }\n\n var header;\n for (var prop in headers) {\n if (!headers.hasOwnProperty(prop)) continue;\n header = headers[prop];\n\n // skip nullish headers.\n if (header == null) {\n continue;\n }\n\n // convert all headers to arrays.\n if (!Array.isArray(header)) {\n header = [header];\n }\n\n // add non-empty headers.\n if (header.length) {\n contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;\n }\n }\n\n return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;\n};\n\nFormData.prototype._getContentDisposition = function(value, options) {\n\n var filename\n , contentDisposition\n ;\n\n if (typeof options.filepath === 'string') {\n // custom filepath for relative paths\n filename = path.normalize(options.filepath).replace(/\\\\/g, '/');\n } else if (options.filename || value.name || value.path) {\n // custom filename take precedence\n // formidable and the browser add a name property\n // fs- and request- streams have path property\n filename = path.basename(options.filename || value.name || value.path);\n } else if (value.readable && value.hasOwnProperty('httpVersion')) {\n // or try http response\n filename = path.basename(value.client._httpMessage.path || '');\n }\n\n if (filename) {\n contentDisposition = 'filename=\"' + filename + '\"';\n }\n\n return contentDisposition;\n};\n\nFormData.prototype._getContentType = function(value, options) {\n\n // use custom content-type above all\n var contentType = options.contentType;\n\n // or try `name` from formidable, browser\n if (!contentType && value.name) {\n contentType = mime.lookup(value.name);\n }\n\n // or try `path` from fs-, request- streams\n if (!contentType && value.path) {\n contentType = mime.lookup(value.path);\n }\n\n // or if it's http-reponse\n if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {\n contentType = value.headers['content-type'];\n }\n\n // or guess it from the filepath or filename\n if (!contentType && (options.filepath || options.filename)) {\n contentType = mime.lookup(options.filepath || options.filename);\n }\n\n // fallback to the default content type if `value` is not simple value\n if (!contentType && typeof value == 'object') {\n contentType = FormData.DEFAULT_CONTENT_TYPE;\n }\n\n return contentType;\n};\n\nFormData.prototype._multiPartFooter = function() {\n return function(next) {\n var footer = FormData.LINE_BREAK;\n\n var lastPart = (this._streams.length === 0);\n if (lastPart) {\n footer += this._lastBoundary();\n }\n\n next(footer);\n }.bind(this);\n};\n\nFormData.prototype._lastBoundary = function() {\n return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;\n};\n\nFormData.prototype.getHeaders = function(userHeaders) {\n var header;\n var formHeaders = {\n 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()\n };\n\n for (header in userHeaders) {\n if (userHeaders.hasOwnProperty(header)) {\n formHeaders[header.toLowerCase()] = userHeaders[header];\n }\n }\n\n return formHeaders;\n};\n\nFormData.prototype.setBoundary = function(boundary) {\n this._boundary = boundary;\n};\n\nFormData.prototype.getBoundary = function() {\n if (!this._boundary) {\n this._generateBoundary();\n }\n\n return this._boundary;\n};\n\nFormData.prototype.getBuffer = function() {\n var dataBuffer = new Buffer.alloc( 0 );\n var boundary = this.getBoundary();\n\n // Create the form content. Add Line breaks to the end of data.\n for (var i = 0, len = this._streams.length; i < len; i++) {\n if (typeof this._streams[i] !== 'function') {\n\n // Add content to the buffer.\n if(Buffer.isBuffer(this._streams[i])) {\n dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);\n }else {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);\n }\n\n // Add break after content.\n if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );\n }\n }\n }\n\n // Add the footer and return the Buffer object.\n return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );\n};\n\nFormData.prototype._generateBoundary = function() {\n // This generates a 50 character boundary similar to those used by Firefox.\n // They are optimized for boyer-moore parsing.\n var boundary = '--------------------------';\n for (var i = 0; i < 24; i++) {\n boundary += Math.floor(Math.random() * 10).toString(16);\n }\n\n this._boundary = boundary;\n};\n\n// Note: getLengthSync DOESN'T calculate streams length\n// As workaround one can calculate file size manually\n// and add it as knownLength option\nFormData.prototype.getLengthSync = function() {\n var knownLength = this._overheadLength + this._valueLength;\n\n // Don't get confused, there are 3 \"internal\" streams for each keyval pair\n // so it basically checks if there is any value added to the form\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n // https://github.com/form-data/form-data/issues/40\n if (!this.hasKnownLength()) {\n // Some async length retrievers are present\n // therefore synchronous length calculation is false.\n // Please use getLength(callback) to get proper length\n this._error(new Error('Cannot calculate proper length in synchronous way.'));\n }\n\n return knownLength;\n};\n\n// Public API to check if length of added values is known\n// https://github.com/form-data/form-data/issues/196\n// https://github.com/form-data/form-data/issues/262\nFormData.prototype.hasKnownLength = function() {\n var hasKnownLength = true;\n\n if (this._valuesToMeasure.length) {\n hasKnownLength = false;\n }\n\n return hasKnownLength;\n};\n\nFormData.prototype.getLength = function(cb) {\n var knownLength = this._overheadLength + this._valueLength;\n\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n if (!this._valuesToMeasure.length) {\n process.nextTick(cb.bind(this, null, knownLength));\n return;\n }\n\n asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {\n if (err) {\n cb(err);\n return;\n }\n\n values.forEach(function(length) {\n knownLength += length;\n });\n\n cb(null, knownLength);\n });\n};\n\nFormData.prototype.submit = function(params, cb) {\n var request\n , options\n , defaults = {method: 'post'}\n ;\n\n // parse provided url if it's string\n // or treat it as options object\n if (typeof params == 'string') {\n\n params = parseUrl(params);\n options = populate({\n port: params.port,\n path: params.pathname,\n host: params.hostname,\n protocol: params.protocol\n }, defaults);\n\n // use custom params\n } else {\n\n options = populate(params, defaults);\n // if no port provided use default one\n if (!options.port) {\n options.port = options.protocol == 'https:' ? 443 : 80;\n }\n }\n\n // put that good code in getHeaders to some use\n options.headers = this.getHeaders(params.headers);\n\n // https if specified, fallback to http in any other case\n if (options.protocol == 'https:') {\n request = https.request(options);\n } else {\n request = http.request(options);\n }\n\n // get content length and fire away\n this.getLength(function(err, length) {\n if (err && err !== 'Unknown stream') {\n this._error(err);\n return;\n }\n\n // add content length\n if (length) {\n request.setHeader('Content-Length', length);\n }\n\n this.pipe(request);\n if (cb) {\n var onResponse;\n\n var callback = function (error, responce) {\n request.removeListener('error', callback);\n request.removeListener('response', onResponse);\n\n return cb.call(this, error, responce);\n };\n\n onResponse = callback.bind(this, null);\n\n request.on('error', callback);\n request.on('response', onResponse);\n }\n }.bind(this));\n\n return request;\n};\n\nFormData.prototype._error = function(err) {\n if (!this.error) {\n this.error = err;\n this.pause();\n this.emit('error', err);\n }\n};\n\nFormData.prototype.toString = function () {\n return '[object FormData]';\n};\n","// populates missing values\nmodule.exports = function(dst, src) {\n\n Object.keys(src).forEach(function(prop)\n {\n dst[prop] = dst[prop] || src[prop];\n });\n\n return dst;\n};\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Multibyte codec. In this scheme, a character is represented by 1 or more bytes.\n// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.\n// To save memory and loading time, we read table files only when requested.\n\nexports._dbcs = DBCSCodec;\n\nvar UNASSIGNED = -1,\n GB18030_CODE = -2,\n SEQ_START = -10,\n NODE_START = -1000,\n UNASSIGNED_NODE = new Array(0x100),\n DEF_CHAR = -1;\n\nfor (var i = 0; i < 0x100; i++)\n UNASSIGNED_NODE[i] = UNASSIGNED;\n\n\n// Class DBCSCodec reads and initializes mapping tables.\nfunction DBCSCodec(codecOptions, iconv) {\n this.encodingName = codecOptions.encodingName;\n if (!codecOptions)\n throw new Error(\"DBCS codec is called without the data.\")\n if (!codecOptions.table)\n throw new Error(\"Encoding '\" + this.encodingName + \"' has no data.\");\n\n // Load tables.\n var mappingTable = codecOptions.table();\n\n\n // Decode tables: MBCS -> Unicode.\n\n // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.\n // Trie root is decodeTables[0].\n // Values: >= 0 -> unicode character code. can be > 0xFFFF\n // == UNASSIGNED -> unknown/unassigned sequence.\n // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.\n // <= NODE_START -> index of the next node in our trie to process next byte.\n // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.\n this.decodeTables = [];\n this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.\n\n // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. \n this.decodeTableSeq = [];\n\n // Actual mapping tables consist of chunks. Use them to fill up decode tables.\n for (var i = 0; i < mappingTable.length; i++)\n this._addDecodeChunk(mappingTable[i]);\n\n // Load & create GB18030 tables when needed.\n if (typeof codecOptions.gb18030 === 'function') {\n this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.\n\n // Add GB18030 common decode nodes.\n var commonThirdByteNodeIdx = this.decodeTables.length;\n this.decodeTables.push(UNASSIGNED_NODE.slice(0));\n\n var commonFourthByteNodeIdx = this.decodeTables.length;\n this.decodeTables.push(UNASSIGNED_NODE.slice(0));\n\n // Fill out the tree\n var firstByteNode = this.decodeTables[0];\n for (var i = 0x81; i <= 0xFE; i++) {\n var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];\n for (var j = 0x30; j <= 0x39; j++) {\n if (secondByteNode[j] === UNASSIGNED) {\n secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;\n } else if (secondByteNode[j] > NODE_START) {\n throw new Error(\"gb18030 decode tables conflict at byte 2\");\n }\n\n var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]];\n for (var k = 0x81; k <= 0xFE; k++) {\n if (thirdByteNode[k] === UNASSIGNED) {\n thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx;\n } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) {\n continue;\n } else if (thirdByteNode[k] > NODE_START) {\n throw new Error(\"gb18030 decode tables conflict at byte 3\");\n }\n\n var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]];\n for (var l = 0x30; l <= 0x39; l++) {\n if (fourthByteNode[l] === UNASSIGNED)\n fourthByteNode[l] = GB18030_CODE;\n }\n }\n }\n }\n }\n\n this.defaultCharUnicode = iconv.defaultCharUnicode;\n\n \n // Encode tables: Unicode -> DBCS.\n\n // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.\n // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.\n // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).\n // == UNASSIGNED -> no conversion found. Output a default char.\n // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.\n this.encodeTable = [];\n \n // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of\n // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key\n // means end of sequence (needed when one sequence is a strict subsequence of another).\n // Objects are kept separately from encodeTable to increase performance.\n this.encodeTableSeq = [];\n\n // Some chars can be decoded, but need not be encoded.\n var skipEncodeChars = {};\n if (codecOptions.encodeSkipVals)\n for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {\n var val = codecOptions.encodeSkipVals[i];\n if (typeof val === 'number')\n skipEncodeChars[val] = true;\n else\n for (var j = val.from; j <= val.to; j++)\n skipEncodeChars[j] = true;\n }\n \n // Use decode trie to recursively fill out encode tables.\n this._fillEncodeTable(0, 0, skipEncodeChars);\n\n // Add more encoding pairs when needed.\n if (codecOptions.encodeAdd) {\n for (var uChar in codecOptions.encodeAdd)\n if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))\n this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);\n }\n\n this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];\n if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];\n if (this.defCharSB === UNASSIGNED) this.defCharSB = \"?\".charCodeAt(0);\n}\n\nDBCSCodec.prototype.encoder = DBCSEncoder;\nDBCSCodec.prototype.decoder = DBCSDecoder;\n\n// Decoder helpers\nDBCSCodec.prototype._getDecodeTrieNode = function(addr) {\n var bytes = [];\n for (; addr > 0; addr >>>= 8)\n bytes.push(addr & 0xFF);\n if (bytes.length == 0)\n bytes.push(0);\n\n var node = this.decodeTables[0];\n for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.\n var val = node[bytes[i]];\n\n if (val == UNASSIGNED) { // Create new node.\n node[bytes[i]] = NODE_START - this.decodeTables.length;\n this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));\n }\n else if (val <= NODE_START) { // Existing node.\n node = this.decodeTables[NODE_START - val];\n }\n else\n throw new Error(\"Overwrite byte in \" + this.encodingName + \", addr: \" + addr.toString(16));\n }\n return node;\n}\n\n\nDBCSCodec.prototype._addDecodeChunk = function(chunk) {\n // First element of chunk is the hex mbcs code where we start.\n var curAddr = parseInt(chunk[0], 16);\n\n // Choose the decoding node where we'll write our chars.\n var writeTable = this._getDecodeTrieNode(curAddr);\n curAddr = curAddr & 0xFF;\n\n // Write all other elements of the chunk to the table.\n for (var k = 1; k < chunk.length; k++) {\n var part = chunk[k];\n if (typeof part === \"string\") { // String, write as-is.\n for (var l = 0; l < part.length;) {\n var code = part.charCodeAt(l++);\n if (0xD800 <= code && code < 0xDC00) { // Decode surrogate\n var codeTrail = part.charCodeAt(l++);\n if (0xDC00 <= codeTrail && codeTrail < 0xE000)\n writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);\n else\n throw new Error(\"Incorrect surrogate pair in \" + this.encodingName + \" at chunk \" + chunk[0]);\n }\n else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)\n var len = 0xFFF - code + 2;\n var seq = [];\n for (var m = 0; m < len; m++)\n seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.\n\n writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;\n this.decodeTableSeq.push(seq);\n }\n else\n writeTable[curAddr++] = code; // Basic char\n }\n } \n else if (typeof part === \"number\") { // Integer, meaning increasing sequence starting with prev character.\n var charCode = writeTable[curAddr - 1] + 1;\n for (var l = 0; l < part; l++)\n writeTable[curAddr++] = charCode++;\n }\n else\n throw new Error(\"Incorrect type '\" + typeof part + \"' given in \" + this.encodingName + \" at chunk \" + chunk[0]);\n }\n if (curAddr > 0xFF)\n throw new Error(\"Incorrect chunk in \" + this.encodingName + \" at addr \" + chunk[0] + \": too long\" + curAddr);\n}\n\n// Encoder helpers\nDBCSCodec.prototype._getEncodeBucket = function(uCode) {\n var high = uCode >> 8; // This could be > 0xFF because of astral characters.\n if (this.encodeTable[high] === undefined)\n this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.\n return this.encodeTable[high];\n}\n\nDBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {\n var bucket = this._getEncodeBucket(uCode);\n var low = uCode & 0xFF;\n if (bucket[low] <= SEQ_START)\n this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.\n else if (bucket[low] == UNASSIGNED)\n bucket[low] = dbcsCode;\n}\n\nDBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {\n \n // Get the root of character tree according to first character of the sequence.\n var uCode = seq[0];\n var bucket = this._getEncodeBucket(uCode);\n var low = uCode & 0xFF;\n\n var node;\n if (bucket[low] <= SEQ_START) {\n // There's already a sequence with - use it.\n node = this.encodeTableSeq[SEQ_START-bucket[low]];\n }\n else {\n // There was no sequence object - allocate a new one.\n node = {};\n if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.\n bucket[low] = SEQ_START - this.encodeTableSeq.length;\n this.encodeTableSeq.push(node);\n }\n\n // Traverse the character tree, allocating new nodes as needed.\n for (var j = 1; j < seq.length-1; j++) {\n var oldVal = node[uCode];\n if (typeof oldVal === 'object')\n node = oldVal;\n else {\n node = node[uCode] = {}\n if (oldVal !== undefined)\n node[DEF_CHAR] = oldVal\n }\n }\n\n // Set the leaf to given dbcsCode.\n uCode = seq[seq.length-1];\n node[uCode] = dbcsCode;\n}\n\nDBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {\n var node = this.decodeTables[nodeIdx];\n var hasValues = false;\n var subNodeEmpty = {};\n for (var i = 0; i < 0x100; i++) {\n var uCode = node[i];\n var mbCode = prefix + i;\n if (skipEncodeChars[mbCode])\n continue;\n\n if (uCode >= 0) {\n this._setEncodeChar(uCode, mbCode);\n hasValues = true;\n } else if (uCode <= NODE_START) {\n var subNodeIdx = NODE_START - uCode;\n if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030).\n var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive.\n if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars))\n hasValues = true;\n else\n subNodeEmpty[subNodeIdx] = true;\n }\n } else if (uCode <= SEQ_START) {\n this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);\n hasValues = true;\n }\n }\n return hasValues;\n}\n\n\n\n// == Encoder ==================================================================\n\nfunction DBCSEncoder(options, codec) {\n // Encoder state\n this.leadSurrogate = -1;\n this.seqObj = undefined;\n \n // Static data\n this.encodeTable = codec.encodeTable;\n this.encodeTableSeq = codec.encodeTableSeq;\n this.defaultCharSingleByte = codec.defCharSB;\n this.gb18030 = codec.gb18030;\n}\n\nDBCSEncoder.prototype.write = function(str) {\n var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),\n leadSurrogate = this.leadSurrogate,\n seqObj = this.seqObj, nextChar = -1,\n i = 0, j = 0;\n\n while (true) {\n // 0. Get next character.\n if (nextChar === -1) {\n if (i == str.length) break;\n var uCode = str.charCodeAt(i++);\n }\n else {\n var uCode = nextChar;\n nextChar = -1; \n }\n\n // 1. Handle surrogates.\n if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.\n if (uCode < 0xDC00) { // We've got lead surrogate.\n if (leadSurrogate === -1) {\n leadSurrogate = uCode;\n continue;\n } else {\n leadSurrogate = uCode;\n // Double lead surrogate found.\n uCode = UNASSIGNED;\n }\n } else { // We've got trail surrogate.\n if (leadSurrogate !== -1) {\n uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);\n leadSurrogate = -1;\n } else {\n // Incomplete surrogate pair - only trail surrogate found.\n uCode = UNASSIGNED;\n }\n \n }\n }\n else if (leadSurrogate !== -1) {\n // Incomplete surrogate pair - only lead surrogate found.\n nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.\n leadSurrogate = -1;\n }\n\n // 2. Convert uCode character.\n var dbcsCode = UNASSIGNED;\n if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence\n var resCode = seqObj[uCode];\n if (typeof resCode === 'object') { // Sequence continues.\n seqObj = resCode;\n continue;\n\n } else if (typeof resCode == 'number') { // Sequence finished. Write it.\n dbcsCode = resCode;\n\n } else if (resCode == undefined) { // Current character is not part of the sequence.\n\n // Try default character for this sequence\n resCode = seqObj[DEF_CHAR];\n if (resCode !== undefined) {\n dbcsCode = resCode; // Found. Write it.\n nextChar = uCode; // Current character will be written too in the next iteration.\n\n } else {\n // TODO: What if we have no default? (resCode == undefined)\n // Then, we should write first char of the sequence as-is and try the rest recursively.\n // Didn't do it for now because no encoding has this situation yet.\n // Currently, just skip the sequence and write current char.\n }\n }\n seqObj = undefined;\n }\n else if (uCode >= 0) { // Regular character\n var subtable = this.encodeTable[uCode >> 8];\n if (subtable !== undefined)\n dbcsCode = subtable[uCode & 0xFF];\n \n if (dbcsCode <= SEQ_START) { // Sequence start\n seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];\n continue;\n }\n\n if (dbcsCode == UNASSIGNED && this.gb18030) {\n // Use GB18030 algorithm to find character(s) to write.\n var idx = findIdx(this.gb18030.uChars, uCode);\n if (idx != -1) {\n var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);\n newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;\n newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;\n newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;\n newBuf[j++] = 0x30 + dbcsCode;\n continue;\n }\n }\n }\n\n // 3. Write dbcsCode character.\n if (dbcsCode === UNASSIGNED)\n dbcsCode = this.defaultCharSingleByte;\n \n if (dbcsCode < 0x100) {\n newBuf[j++] = dbcsCode;\n }\n else if (dbcsCode < 0x10000) {\n newBuf[j++] = dbcsCode >> 8; // high byte\n newBuf[j++] = dbcsCode & 0xFF; // low byte\n }\n else if (dbcsCode < 0x1000000) {\n newBuf[j++] = dbcsCode >> 16;\n newBuf[j++] = (dbcsCode >> 8) & 0xFF;\n newBuf[j++] = dbcsCode & 0xFF;\n } else {\n newBuf[j++] = dbcsCode >>> 24;\n newBuf[j++] = (dbcsCode >>> 16) & 0xFF;\n newBuf[j++] = (dbcsCode >>> 8) & 0xFF;\n newBuf[j++] = dbcsCode & 0xFF;\n }\n }\n\n this.seqObj = seqObj;\n this.leadSurrogate = leadSurrogate;\n return newBuf.slice(0, j);\n}\n\nDBCSEncoder.prototype.end = function() {\n if (this.leadSurrogate === -1 && this.seqObj === undefined)\n return; // All clean. Most often case.\n\n var newBuf = Buffer.alloc(10), j = 0;\n\n if (this.seqObj) { // We're in the sequence.\n var dbcsCode = this.seqObj[DEF_CHAR];\n if (dbcsCode !== undefined) { // Write beginning of the sequence.\n if (dbcsCode < 0x100) {\n newBuf[j++] = dbcsCode;\n }\n else {\n newBuf[j++] = dbcsCode >> 8; // high byte\n newBuf[j++] = dbcsCode & 0xFF; // low byte\n }\n } else {\n // See todo above.\n }\n this.seqObj = undefined;\n }\n\n if (this.leadSurrogate !== -1) {\n // Incomplete surrogate pair - only lead surrogate found.\n newBuf[j++] = this.defaultCharSingleByte;\n this.leadSurrogate = -1;\n }\n \n return newBuf.slice(0, j);\n}\n\n// Export for testing\nDBCSEncoder.prototype.findIdx = findIdx;\n\n\n// == Decoder ==================================================================\n\nfunction DBCSDecoder(options, codec) {\n // Decoder state\n this.nodeIdx = 0;\n this.prevBytes = [];\n\n // Static data\n this.decodeTables = codec.decodeTables;\n this.decodeTableSeq = codec.decodeTableSeq;\n this.defaultCharUnicode = codec.defaultCharUnicode;\n this.gb18030 = codec.gb18030;\n}\n\nDBCSDecoder.prototype.write = function(buf) {\n var newBuf = Buffer.alloc(buf.length*2),\n nodeIdx = this.nodeIdx, \n prevBytes = this.prevBytes, prevOffset = this.prevBytes.length,\n seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence.\n uCode;\n\n for (var i = 0, j = 0; i < buf.length; i++) {\n var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset];\n\n // Lookup in current trie node.\n var uCode = this.decodeTables[nodeIdx][curByte];\n\n if (uCode >= 0) { \n // Normal character, just use it.\n }\n else if (uCode === UNASSIGNED) { // Unknown char.\n // TODO: Callback with seq.\n uCode = this.defaultCharUnicode.charCodeAt(0);\n i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again.\n }\n else if (uCode === GB18030_CODE) {\n if (i >= 3) {\n var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30);\n } else {\n var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + \n (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + \n (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + \n (curByte-0x30);\n }\n var idx = findIdx(this.gb18030.gbChars, ptr);\n uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];\n }\n else if (uCode <= NODE_START) { // Go to next trie node.\n nodeIdx = NODE_START - uCode;\n continue;\n }\n else if (uCode <= SEQ_START) { // Output a sequence of chars.\n var seq = this.decodeTableSeq[SEQ_START - uCode];\n for (var k = 0; k < seq.length - 1; k++) {\n uCode = seq[k];\n newBuf[j++] = uCode & 0xFF;\n newBuf[j++] = uCode >> 8;\n }\n uCode = seq[seq.length-1];\n }\n else\n throw new Error(\"iconv-lite internal error: invalid decoding table value \" + uCode + \" at \" + nodeIdx + \"/\" + curByte);\n\n // Write the character to buffer, handling higher planes using surrogate pair.\n if (uCode >= 0x10000) { \n uCode -= 0x10000;\n var uCodeLead = 0xD800 | (uCode >> 10);\n newBuf[j++] = uCodeLead & 0xFF;\n newBuf[j++] = uCodeLead >> 8;\n\n uCode = 0xDC00 | (uCode & 0x3FF);\n }\n newBuf[j++] = uCode & 0xFF;\n newBuf[j++] = uCode >> 8;\n\n // Reset trie node.\n nodeIdx = 0; seqStart = i+1;\n }\n\n this.nodeIdx = nodeIdx;\n this.prevBytes = (seqStart >= 0)\n ? Array.prototype.slice.call(buf, seqStart)\n : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf));\n\n return newBuf.slice(0, j).toString('ucs2');\n}\n\nDBCSDecoder.prototype.end = function() {\n var ret = '';\n\n // Try to parse all remaining chars.\n while (this.prevBytes.length > 0) {\n // Skip 1 character in the buffer.\n ret += this.defaultCharUnicode;\n var bytesArr = this.prevBytes.slice(1);\n\n // Parse remaining as usual.\n this.prevBytes = [];\n this.nodeIdx = 0;\n if (bytesArr.length > 0)\n ret += this.write(bytesArr);\n }\n\n this.prevBytes = [];\n this.nodeIdx = 0;\n return ret;\n}\n\n// Binary search for GB18030. Returns largest i such that table[i] <= val.\nfunction findIdx(table, val) {\n if (table[0] > val)\n return -1;\n\n var l = 0, r = table.length;\n while (l < r-1) { // always table[l] <= val < table[r]\n var mid = l + ((r-l+1) >> 1);\n if (table[mid] <= val)\n l = mid;\n else\n r = mid;\n }\n return l;\n}\n\n","\"use strict\";\n\n// Description of supported double byte encodings and aliases.\n// Tables are not require()-d until they are needed to speed up library load.\n// require()-s are direct to support Browserify.\n\nmodule.exports = {\n \n // == Japanese/ShiftJIS ====================================================\n // All japanese encodings are based on JIS X set of standards:\n // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.\n // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. \n // Has several variations in 1978, 1983, 1990 and 1997.\n // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.\n // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.\n // 2 planes, first is superset of 0208, second - revised 0212.\n // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)\n\n // Byte encodings are:\n // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte\n // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.\n // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.\n // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.\n // 0x00-0x7F - lower part of 0201\n // 0x8E, 0xA1-0xDF - upper part of 0201\n // (0xA1-0xFE)x2 - 0208 plane (94x94).\n // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).\n // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.\n // Used as-is in ISO2022 family.\n // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, \n // 0201-1976 Roman, 0208-1978, 0208-1983.\n // * ISO2022-JP-1: Adds esc seq for 0212-1990.\n // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.\n // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.\n // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.\n //\n // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.\n //\n // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html\n\n 'shiftjis': {\n type: '_dbcs',\n table: function() { return require('./tables/shiftjis.json') },\n encodeAdd: {'\\u00a5': 0x5C, '\\u203E': 0x7E},\n encodeSkipVals: [{from: 0xED40, to: 0xF940}],\n },\n 'csshiftjis': 'shiftjis',\n 'mskanji': 'shiftjis',\n 'sjis': 'shiftjis',\n 'windows31j': 'shiftjis',\n 'ms31j': 'shiftjis',\n 'xsjis': 'shiftjis',\n 'windows932': 'shiftjis',\n 'ms932': 'shiftjis',\n '932': 'shiftjis',\n 'cp932': 'shiftjis',\n\n 'eucjp': {\n type: '_dbcs',\n table: function() { return require('./tables/eucjp.json') },\n encodeAdd: {'\\u00a5': 0x5C, '\\u203E': 0x7E},\n },\n\n // TODO: KDDI extension to Shift_JIS\n // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.\n // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.\n\n\n // == Chinese/GBK ==========================================================\n // http://en.wikipedia.org/wiki/GBK\n // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder\n\n // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936\n 'gb2312': 'cp936',\n 'gb231280': 'cp936',\n 'gb23121980': 'cp936',\n 'csgb2312': 'cp936',\n 'csiso58gb231280': 'cp936',\n 'euccn': 'cp936',\n\n // Microsoft's CP936 is a subset and approximation of GBK.\n 'windows936': 'cp936',\n 'ms936': 'cp936',\n '936': 'cp936',\n 'cp936': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json') },\n },\n\n // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.\n 'gbk': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },\n },\n 'xgbk': 'gbk',\n 'isoir58': 'gbk',\n\n // GB18030 is an algorithmic extension of GBK.\n // Main source: https://www.w3.org/TR/encoding/#gbk-encoder\n // http://icu-project.org/docs/papers/gb18030.html\n // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml\n // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0\n 'gb18030': {\n type: '_dbcs',\n table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },\n gb18030: function() { return require('./tables/gb18030-ranges.json') },\n encodeSkipVals: [0x80],\n encodeAdd: {'€': 0xA2E3},\n },\n\n 'chinese': 'gb18030',\n\n\n // == Korean ===============================================================\n // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.\n 'windows949': 'cp949',\n 'ms949': 'cp949',\n '949': 'cp949',\n 'cp949': {\n type: '_dbcs',\n table: function() { return require('./tables/cp949.json') },\n },\n\n 'cseuckr': 'cp949',\n 'csksc56011987': 'cp949',\n 'euckr': 'cp949',\n 'isoir149': 'cp949',\n 'korean': 'cp949',\n 'ksc56011987': 'cp949',\n 'ksc56011989': 'cp949',\n 'ksc5601': 'cp949',\n\n\n // == Big5/Taiwan/Hong Kong ================================================\n // There are lots of tables for Big5 and cp950. Please see the following links for history:\n // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html\n // Variations, in roughly number of defined chars:\n // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT\n // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/\n // * Big5-2003 (Taiwan standard) almost superset of cp950.\n // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.\n // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. \n // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.\n // Plus, it has 4 combining sequences.\n // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299\n // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.\n // Implementations are not consistent within browsers; sometimes labeled as just big5.\n // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.\n // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31\n // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.\n // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt\n // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt\n // \n // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder\n // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.\n\n 'windows950': 'cp950',\n 'ms950': 'cp950',\n '950': 'cp950',\n 'cp950': {\n type: '_dbcs',\n table: function() { return require('./tables/cp950.json') },\n },\n\n // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.\n 'big5': 'big5hkscs',\n 'big5hkscs': {\n type: '_dbcs',\n table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },\n encodeSkipVals: [\n // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of\n // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU.\n // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter.\n 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe,\n 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca,\n 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62,\n 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef,\n 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed,\n\n // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345\n 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce,\n ],\n },\n\n 'cnbig5': 'big5hkscs',\n 'csbig5': 'big5hkscs',\n 'xxbig5': 'big5hkscs',\n};\n","\"use strict\";\n\n// Update this array if you add/rename/remove files in this directory.\n// We support Browserify by skipping automatic module discovery and requiring modules directly.\nvar modules = [\n require(\"./internal\"),\n require(\"./utf32\"),\n require(\"./utf16\"),\n require(\"./utf7\"),\n require(\"./sbcs-codec\"),\n require(\"./sbcs-data\"),\n require(\"./sbcs-data-generated\"),\n require(\"./dbcs-codec\"),\n require(\"./dbcs-data\"),\n];\n\n// Put all encoding/alias/codec definitions to single object and export it.\nfor (var i = 0; i < modules.length; i++) {\n var module = modules[i];\n for (var enc in module)\n if (Object.prototype.hasOwnProperty.call(module, enc))\n exports[enc] = module[enc];\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Export Node.js internal encodings.\n\nmodule.exports = {\n // Encodings\n utf8: { type: \"_internal\", bomAware: true},\n cesu8: { type: \"_internal\", bomAware: true},\n unicode11utf8: \"utf8\",\n\n ucs2: { type: \"_internal\", bomAware: true},\n utf16le: \"ucs2\",\n\n binary: { type: \"_internal\" },\n base64: { type: \"_internal\" },\n hex: { type: \"_internal\" },\n\n // Codec.\n _internal: InternalCodec,\n};\n\n//------------------------------------------------------------------------------\n\nfunction InternalCodec(codecOptions, iconv) {\n this.enc = codecOptions.encodingName;\n this.bomAware = codecOptions.bomAware;\n\n if (this.enc === \"base64\")\n this.encoder = InternalEncoderBase64;\n else if (this.enc === \"cesu8\") {\n this.enc = \"utf8\"; // Use utf8 for decoding.\n this.encoder = InternalEncoderCesu8;\n\n // Add decoder for versions of Node not supporting CESU-8\n if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {\n this.decoder = InternalDecoderCesu8;\n this.defaultCharUnicode = iconv.defaultCharUnicode;\n }\n }\n}\n\nInternalCodec.prototype.encoder = InternalEncoder;\nInternalCodec.prototype.decoder = InternalDecoder;\n\n//------------------------------------------------------------------------------\n\n// We use node.js internal decoder. Its signature is the same as ours.\nvar StringDecoder = require('string_decoder').StringDecoder;\n\nif (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.\n StringDecoder.prototype.end = function() {};\n\n\nfunction InternalDecoder(options, codec) {\n this.decoder = new StringDecoder(codec.enc);\n}\n\nInternalDecoder.prototype.write = function(buf) {\n if (!Buffer.isBuffer(buf)) {\n buf = Buffer.from(buf);\n }\n\n return this.decoder.write(buf);\n}\n\nInternalDecoder.prototype.end = function() {\n return this.decoder.end();\n}\n\n\n//------------------------------------------------------------------------------\n// Encoder is mostly trivial\n\nfunction InternalEncoder(options, codec) {\n this.enc = codec.enc;\n}\n\nInternalEncoder.prototype.write = function(str) {\n return Buffer.from(str, this.enc);\n}\n\nInternalEncoder.prototype.end = function() {\n}\n\n\n//------------------------------------------------------------------------------\n// Except base64 encoder, which must keep its state.\n\nfunction InternalEncoderBase64(options, codec) {\n this.prevStr = '';\n}\n\nInternalEncoderBase64.prototype.write = function(str) {\n str = this.prevStr + str;\n var completeQuads = str.length - (str.length % 4);\n this.prevStr = str.slice(completeQuads);\n str = str.slice(0, completeQuads);\n\n return Buffer.from(str, \"base64\");\n}\n\nInternalEncoderBase64.prototype.end = function() {\n return Buffer.from(this.prevStr, \"base64\");\n}\n\n\n//------------------------------------------------------------------------------\n// CESU-8 encoder is also special.\n\nfunction InternalEncoderCesu8(options, codec) {\n}\n\nInternalEncoderCesu8.prototype.write = function(str) {\n var buf = Buffer.alloc(str.length * 3), bufIdx = 0;\n for (var i = 0; i < str.length; i++) {\n var charCode = str.charCodeAt(i);\n // Naive implementation, but it works because CESU-8 is especially easy\n // to convert from UTF-16 (which all JS strings are encoded in).\n if (charCode < 0x80)\n buf[bufIdx++] = charCode;\n else if (charCode < 0x800) {\n buf[bufIdx++] = 0xC0 + (charCode >>> 6);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n else { // charCode will always be < 0x10000 in javascript.\n buf[bufIdx++] = 0xE0 + (charCode >>> 12);\n buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n }\n return buf.slice(0, bufIdx);\n}\n\nInternalEncoderCesu8.prototype.end = function() {\n}\n\n//------------------------------------------------------------------------------\n// CESU-8 decoder is not implemented in Node v4.0+\n\nfunction InternalDecoderCesu8(options, codec) {\n this.acc = 0;\n this.contBytes = 0;\n this.accBytes = 0;\n this.defaultCharUnicode = codec.defaultCharUnicode;\n}\n\nInternalDecoderCesu8.prototype.write = function(buf) {\n var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, \n res = '';\n for (var i = 0; i < buf.length; i++) {\n var curByte = buf[i];\n if ((curByte & 0xC0) !== 0x80) { // Leading byte\n if (contBytes > 0) { // Previous code is invalid\n res += this.defaultCharUnicode;\n contBytes = 0;\n }\n\n if (curByte < 0x80) { // Single-byte code\n res += String.fromCharCode(curByte);\n } else if (curByte < 0xE0) { // Two-byte code\n acc = curByte & 0x1F;\n contBytes = 1; accBytes = 1;\n } else if (curByte < 0xF0) { // Three-byte code\n acc = curByte & 0x0F;\n contBytes = 2; accBytes = 1;\n } else { // Four or more are not supported for CESU-8.\n res += this.defaultCharUnicode;\n }\n } else { // Continuation byte\n if (contBytes > 0) { // We're waiting for it.\n acc = (acc << 6) | (curByte & 0x3f);\n contBytes--; accBytes++;\n if (contBytes === 0) {\n // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)\n if (accBytes === 2 && acc < 0x80 && acc > 0)\n res += this.defaultCharUnicode;\n else if (accBytes === 3 && acc < 0x800)\n res += this.defaultCharUnicode;\n else\n // Actually add character.\n res += String.fromCharCode(acc);\n }\n } else { // Unexpected continuation byte\n res += this.defaultCharUnicode;\n }\n }\n }\n this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;\n return res;\n}\n\nInternalDecoderCesu8.prototype.end = function() {\n var res = 0;\n if (this.contBytes > 0)\n res += this.defaultCharUnicode;\n return res;\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that\n// correspond to encoded bytes (if 128 - then lower half is ASCII). \n\nexports._sbcs = SBCSCodec;\nfunction SBCSCodec(codecOptions, iconv) {\n if (!codecOptions)\n throw new Error(\"SBCS codec is called without the data.\")\n \n // Prepare char buffer for decoding.\n if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))\n throw new Error(\"Encoding '\"+codecOptions.type+\"' has incorrect 'chars' (must be of len 128 or 256)\");\n \n if (codecOptions.chars.length === 128) {\n var asciiString = \"\";\n for (var i = 0; i < 128; i++)\n asciiString += String.fromCharCode(i);\n codecOptions.chars = asciiString + codecOptions.chars;\n }\n\n this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');\n \n // Encoding buffer.\n var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));\n\n for (var i = 0; i < codecOptions.chars.length; i++)\n encodeBuf[codecOptions.chars.charCodeAt(i)] = i;\n\n this.encodeBuf = encodeBuf;\n}\n\nSBCSCodec.prototype.encoder = SBCSEncoder;\nSBCSCodec.prototype.decoder = SBCSDecoder;\n\n\nfunction SBCSEncoder(options, codec) {\n this.encodeBuf = codec.encodeBuf;\n}\n\nSBCSEncoder.prototype.write = function(str) {\n var buf = Buffer.alloc(str.length);\n for (var i = 0; i < str.length; i++)\n buf[i] = this.encodeBuf[str.charCodeAt(i)];\n \n return buf;\n}\n\nSBCSEncoder.prototype.end = function() {\n}\n\n\nfunction SBCSDecoder(options, codec) {\n this.decodeBuf = codec.decodeBuf;\n}\n\nSBCSDecoder.prototype.write = function(buf) {\n // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.\n var decodeBuf = this.decodeBuf;\n var newBuf = Buffer.alloc(buf.length*2);\n var idx1 = 0, idx2 = 0;\n for (var i = 0; i < buf.length; i++) {\n idx1 = buf[i]*2; idx2 = i*2;\n newBuf[idx2] = decodeBuf[idx1];\n newBuf[idx2+1] = decodeBuf[idx1+1];\n }\n return newBuf.toString('ucs2');\n}\n\nSBCSDecoder.prototype.end = function() {\n}\n","\"use strict\";\n\n// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.\nmodule.exports = {\n \"437\": \"cp437\",\n \"737\": \"cp737\",\n \"775\": \"cp775\",\n \"850\": \"cp850\",\n \"852\": \"cp852\",\n \"855\": \"cp855\",\n \"856\": \"cp856\",\n \"857\": \"cp857\",\n \"858\": \"cp858\",\n \"860\": \"cp860\",\n \"861\": \"cp861\",\n \"862\": \"cp862\",\n \"863\": \"cp863\",\n \"864\": \"cp864\",\n \"865\": \"cp865\",\n \"866\": \"cp866\",\n \"869\": \"cp869\",\n \"874\": \"windows874\",\n \"922\": \"cp922\",\n \"1046\": \"cp1046\",\n \"1124\": \"cp1124\",\n \"1125\": \"cp1125\",\n \"1129\": \"cp1129\",\n \"1133\": \"cp1133\",\n \"1161\": \"cp1161\",\n \"1162\": \"cp1162\",\n \"1163\": \"cp1163\",\n \"1250\": \"windows1250\",\n \"1251\": \"windows1251\",\n \"1252\": \"windows1252\",\n \"1253\": \"windows1253\",\n \"1254\": \"windows1254\",\n \"1255\": \"windows1255\",\n \"1256\": \"windows1256\",\n \"1257\": \"windows1257\",\n \"1258\": \"windows1258\",\n \"28591\": \"iso88591\",\n \"28592\": \"iso88592\",\n \"28593\": \"iso88593\",\n \"28594\": \"iso88594\",\n \"28595\": \"iso88595\",\n \"28596\": \"iso88596\",\n \"28597\": \"iso88597\",\n \"28598\": \"iso88598\",\n \"28599\": \"iso88599\",\n \"28600\": \"iso885910\",\n \"28601\": \"iso885911\",\n \"28603\": \"iso885913\",\n \"28604\": \"iso885914\",\n \"28605\": \"iso885915\",\n \"28606\": \"iso885916\",\n \"windows874\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"win874\": \"windows874\",\n \"cp874\": \"windows874\",\n \"windows1250\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙\"\n },\n \"win1250\": \"windows1250\",\n \"cp1250\": \"windows1250\",\n \"windows1251\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"win1251\": \"windows1251\",\n \"cp1251\": \"windows1251\",\n \"windows1252\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"win1252\": \"windows1252\",\n \"cp1252\": \"windows1252\",\n \"windows1253\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�\"\n },\n \"win1253\": \"windows1253\",\n \"cp1253\": \"windows1253\",\n \"windows1254\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ\"\n },\n \"win1254\": \"windows1254\",\n \"cp1254\": \"windows1254\",\n \"windows1255\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�\"\n },\n \"win1255\": \"windows1255\",\n \"cp1255\": \"windows1255\",\n \"windows1256\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے\"\n },\n \"win1256\": \"windows1256\",\n \"cp1256\": \"windows1256\",\n \"windows1257\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙\"\n },\n \"win1257\": \"windows1257\",\n \"cp1257\": \"windows1257\",\n \"windows1258\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"win1258\": \"windows1258\",\n \"cp1258\": \"windows1258\",\n \"iso88591\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"cp28591\": \"iso88591\",\n \"iso88592\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙\"\n },\n \"cp28592\": \"iso88592\",\n \"iso88593\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙\"\n },\n \"cp28593\": \"iso88593\",\n \"iso88594\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙\"\n },\n \"cp28594\": \"iso88594\",\n \"iso88595\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ\"\n },\n \"cp28595\": \"iso88595\",\n \"iso88596\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������\"\n },\n \"cp28596\": \"iso88596\",\n \"iso88597\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�\"\n },\n \"cp28597\": \"iso88597\",\n \"iso88598\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�\"\n },\n \"cp28598\": \"iso88598\",\n \"iso88599\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ\"\n },\n \"cp28599\": \"iso88599\",\n \"iso885910\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ\"\n },\n \"cp28600\": \"iso885910\",\n \"iso885911\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"cp28601\": \"iso885911\",\n \"iso885913\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’\"\n },\n \"cp28603\": \"iso885913\",\n \"iso885914\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ\"\n },\n \"cp28604\": \"iso885914\",\n \"iso885915\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"cp28605\": \"iso885915\",\n \"iso885916\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ\"\n },\n \"cp28606\": \"iso885916\",\n \"cp437\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm437\": \"cp437\",\n \"csibm437\": \"cp437\",\n \"cp737\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ \"\n },\n \"ibm737\": \"cp737\",\n \"csibm737\": \"cp737\",\n \"cp775\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ \"\n },\n \"ibm775\": \"cp775\",\n \"csibm775\": \"cp775\",\n \"cp850\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm850\": \"cp850\",\n \"csibm850\": \"cp850\",\n \"cp852\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ \"\n },\n \"ibm852\": \"cp852\",\n \"csibm852\": \"cp852\",\n \"cp855\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ \"\n },\n \"ibm855\": \"cp855\",\n \"csibm855\": \"cp855\",\n \"cp856\": {\n \"type\": \"_sbcs\",\n \"chars\": \"אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm856\": \"cp856\",\n \"csibm856\": \"cp856\",\n \"cp857\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm857\": \"cp857\",\n \"csibm857\": \"cp857\",\n \"cp858\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ \"\n },\n \"ibm858\": \"cp858\",\n \"csibm858\": \"cp858\",\n \"cp860\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm860\": \"cp860\",\n \"csibm860\": \"cp860\",\n \"cp861\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm861\": \"cp861\",\n \"csibm861\": \"cp861\",\n \"cp862\": {\n \"type\": \"_sbcs\",\n \"chars\": \"אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm862\": \"cp862\",\n \"csibm862\": \"cp862\",\n \"cp863\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm863\": \"cp863\",\n \"csibm863\": \"cp863\",\n \"cp864\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\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 !\\\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�\"\n },\n \"ibm864\": \"cp864\",\n \"csibm864\": \"cp864\",\n \"cp865\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n \"ibm865\": \"cp865\",\n \"csibm865\": \"cp865\",\n \"cp866\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ \"\n },\n \"ibm866\": \"cp866\",\n \"csibm866\": \"cp866\",\n \"cp869\": {\n \"type\": \"_sbcs\",\n \"chars\": \"������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ \"\n },\n \"ibm869\": \"cp869\",\n \"csibm869\": \"cp869\",\n \"cp922\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ\"\n },\n \"ibm922\": \"cp922\",\n \"csibm922\": \"cp922\",\n \"cp1046\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�\"\n },\n \"ibm1046\": \"cp1046\",\n \"csibm1046\": \"cp1046\",\n \"cp1124\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ\"\n },\n \"ibm1124\": \"cp1124\",\n \"csibm1124\": \"cp1124\",\n \"cp1125\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ \"\n },\n \"ibm1125\": \"cp1125\",\n \"csibm1125\": \"cp1125\",\n \"cp1129\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"ibm1129\": \"cp1129\",\n \"csibm1129\": \"cp1129\",\n \"cp1133\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�\"\n },\n \"ibm1133\": \"cp1133\",\n \"csibm1133\": \"cp1133\",\n \"cp1161\": {\n \"type\": \"_sbcs\",\n \"chars\": \"��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ \"\n },\n \"ibm1161\": \"cp1161\",\n \"csibm1161\": \"cp1161\",\n \"cp1162\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n },\n \"ibm1162\": \"cp1162\",\n \"csibm1162\": \"cp1162\",\n \"cp1163\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ\"\n },\n \"ibm1163\": \"cp1163\",\n \"csibm1163\": \"cp1163\",\n \"maccroatian\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ\"\n },\n \"maccyrillic\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤\"\n },\n \"macgreek\": {\n \"type\": \"_sbcs\",\n \"chars\": \"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�\"\n },\n \"maciceland\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macroman\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macromania\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macthai\": {\n \"type\": \"_sbcs\",\n \"chars\": \"«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����\"\n },\n \"macturkish\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"macukraine\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤\"\n },\n \"koi8r\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8u\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8ru\": {\n \"type\": \"_sbcs\",\n \"chars\": \"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"koi8t\": {\n \"type\": \"_sbcs\",\n \"chars\": \"қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ\"\n },\n \"armscii8\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�\"\n },\n \"rk1048\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"tcvn\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000ÚỤ\\u0003ỪỬỮ\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010ỨỰỲỶỸÝỴ\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ\"\n },\n \"georgianacademy\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"georgianps\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\"\n },\n \"pt154\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя\"\n },\n \"viscii\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\u0000\\u0001Ẳ\\u0003\\u0004ẴẪ\\u0007\\b\\t\\n\\u000b\\f\\r\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013Ỷ\\u0015\\u0016\\u0017\\u0018Ỹ\\u001a\\u001b\\u001c\\u001dỴ\\u001f !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ\"\n },\n \"iso646cn\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\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 !\\\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"iso646jp\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\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 !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"hproman8\": {\n \"type\": \"_sbcs\",\n \"chars\": \"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�\"\n },\n \"macintosh\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ\"\n },\n \"ascii\": {\n \"type\": \"_sbcs\",\n \"chars\": \"��������������������������������������������������������������������������������������������������������������������������������\"\n },\n \"tis620\": {\n \"type\": \"_sbcs\",\n \"chars\": \"���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����\"\n }\n}","\"use strict\";\n\n// Manually added data to be used by sbcs codec in addition to generated one.\n\nmodule.exports = {\n // Not supported by iconv, not sure why.\n \"10029\": \"maccenteuro\",\n \"maccenteuro\": {\n \"type\": \"_sbcs\",\n \"chars\": \"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ\"\n },\n\n \"808\": \"cp808\",\n \"ibm808\": \"cp808\",\n \"cp808\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ \"\n },\n\n \"mik\": {\n \"type\": \"_sbcs\",\n \"chars\": \"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \"\n },\n\n \"cp720\": {\n \"type\": \"_sbcs\",\n \"chars\": \"\\x80\\x81éâ\\x84à\\x86çêëèïî\\x8d\\x8e\\x8f\\x90\\u0651\\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\\u064b\\u064c\\u064d\\u064e\\u064f\\u0650≈°∙·√ⁿ²■\\u00a0\"\n },\n\n // Aliases of generated encodings.\n \"ascii8bit\": \"ascii\",\n \"usascii\": \"ascii\",\n \"ansix34\": \"ascii\",\n \"ansix341968\": \"ascii\",\n \"ansix341986\": \"ascii\",\n \"csascii\": \"ascii\",\n \"cp367\": \"ascii\",\n \"ibm367\": \"ascii\",\n \"isoir6\": \"ascii\",\n \"iso646us\": \"ascii\",\n \"iso646irv\": \"ascii\",\n \"us\": \"ascii\",\n\n \"latin1\": \"iso88591\",\n \"latin2\": \"iso88592\",\n \"latin3\": \"iso88593\",\n \"latin4\": \"iso88594\",\n \"latin5\": \"iso88599\",\n \"latin6\": \"iso885910\",\n \"latin7\": \"iso885913\",\n \"latin8\": \"iso885914\",\n \"latin9\": \"iso885915\",\n \"latin10\": \"iso885916\",\n\n \"csisolatin1\": \"iso88591\",\n \"csisolatin2\": \"iso88592\",\n \"csisolatin3\": \"iso88593\",\n \"csisolatin4\": \"iso88594\",\n \"csisolatincyrillic\": \"iso88595\",\n \"csisolatinarabic\": \"iso88596\",\n \"csisolatingreek\" : \"iso88597\",\n \"csisolatinhebrew\": \"iso88598\",\n \"csisolatin5\": \"iso88599\",\n \"csisolatin6\": \"iso885910\",\n\n \"l1\": \"iso88591\",\n \"l2\": \"iso88592\",\n \"l3\": \"iso88593\",\n \"l4\": \"iso88594\",\n \"l5\": \"iso88599\",\n \"l6\": \"iso885910\",\n \"l7\": \"iso885913\",\n \"l8\": \"iso885914\",\n \"l9\": \"iso885915\",\n \"l10\": \"iso885916\",\n\n \"isoir14\": \"iso646jp\",\n \"isoir57\": \"iso646cn\",\n \"isoir100\": \"iso88591\",\n \"isoir101\": \"iso88592\",\n \"isoir109\": \"iso88593\",\n \"isoir110\": \"iso88594\",\n \"isoir144\": \"iso88595\",\n \"isoir127\": \"iso88596\",\n \"isoir126\": \"iso88597\",\n \"isoir138\": \"iso88598\",\n \"isoir148\": \"iso88599\",\n \"isoir157\": \"iso885910\",\n \"isoir166\": \"tis620\",\n \"isoir179\": \"iso885913\",\n \"isoir199\": \"iso885914\",\n \"isoir203\": \"iso885915\",\n \"isoir226\": \"iso885916\",\n\n \"cp819\": \"iso88591\",\n \"ibm819\": \"iso88591\",\n\n \"cyrillic\": \"iso88595\",\n\n \"arabic\": \"iso88596\",\n \"arabic8\": \"iso88596\",\n \"ecma114\": \"iso88596\",\n \"asmo708\": \"iso88596\",\n\n \"greek\" : \"iso88597\",\n \"greek8\" : \"iso88597\",\n \"ecma118\" : \"iso88597\",\n \"elot928\" : \"iso88597\",\n\n \"hebrew\": \"iso88598\",\n \"hebrew8\": \"iso88598\",\n\n \"turkish\": \"iso88599\",\n \"turkish8\": \"iso88599\",\n\n \"thai\": \"iso885911\",\n \"thai8\": \"iso885911\",\n\n \"celtic\": \"iso885914\",\n \"celtic8\": \"iso885914\",\n \"isoceltic\": \"iso885914\",\n\n \"tis6200\": \"tis620\",\n \"tis62025291\": \"tis620\",\n \"tis62025330\": \"tis620\",\n\n \"10000\": \"macroman\",\n \"10006\": \"macgreek\",\n \"10007\": \"maccyrillic\",\n \"10079\": \"maciceland\",\n \"10081\": \"macturkish\",\n\n \"cspc8codepage437\": \"cp437\",\n \"cspc775baltic\": \"cp775\",\n \"cspc850multilingual\": \"cp850\",\n \"cspcp852\": \"cp852\",\n \"cspc862latinhebrew\": \"cp862\",\n \"cpgr\": \"cp869\",\n\n \"msee\": \"cp1250\",\n \"mscyrl\": \"cp1251\",\n \"msansi\": \"cp1252\",\n \"msgreek\": \"cp1253\",\n \"msturk\": \"cp1254\",\n \"mshebr\": \"cp1255\",\n \"msarab\": \"cp1256\",\n \"winbaltrim\": \"cp1257\",\n\n \"cp20866\": \"koi8r\",\n \"20866\": \"koi8r\",\n \"ibm878\": \"koi8r\",\n \"cskoi8r\": \"koi8r\",\n\n \"cp21866\": \"koi8u\",\n \"21866\": \"koi8u\",\n \"ibm1168\": \"koi8u\",\n\n \"strk10482002\": \"rk1048\",\n\n \"tcvn5712\": \"tcvn\",\n \"tcvn57121\": \"tcvn\",\n\n \"gb198880\": \"iso646cn\",\n \"cn\": \"iso646cn\",\n\n \"csiso14jisc6220ro\": \"iso646jp\",\n \"jisc62201969ro\": \"iso646jp\",\n \"jp\": \"iso646jp\",\n\n \"cshproman8\": \"hproman8\",\n \"r8\": \"hproman8\",\n \"roman8\": \"hproman8\",\n \"xroman8\": \"hproman8\",\n \"ibm1051\": \"hproman8\",\n\n \"mac\": \"macintosh\",\n \"csmacintosh\": \"macintosh\",\n};\n\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js\n\n// == UTF16-BE codec. ==========================================================\n\nexports.utf16be = Utf16BECodec;\nfunction Utf16BECodec() {\n}\n\nUtf16BECodec.prototype.encoder = Utf16BEEncoder;\nUtf16BECodec.prototype.decoder = Utf16BEDecoder;\nUtf16BECodec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nfunction Utf16BEEncoder() {\n}\n\nUtf16BEEncoder.prototype.write = function(str) {\n var buf = Buffer.from(str, 'ucs2');\n for (var i = 0; i < buf.length; i += 2) {\n var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;\n }\n return buf;\n}\n\nUtf16BEEncoder.prototype.end = function() {\n}\n\n\n// -- Decoding\n\nfunction Utf16BEDecoder() {\n this.overflowByte = -1;\n}\n\nUtf16BEDecoder.prototype.write = function(buf) {\n if (buf.length == 0)\n return '';\n\n var buf2 = Buffer.alloc(buf.length + 1),\n i = 0, j = 0;\n\n if (this.overflowByte !== -1) {\n buf2[0] = buf[0];\n buf2[1] = this.overflowByte;\n i = 1; j = 2;\n }\n\n for (; i < buf.length-1; i += 2, j+= 2) {\n buf2[j] = buf[i+1];\n buf2[j+1] = buf[i];\n }\n\n this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;\n\n return buf2.slice(0, j).toString('ucs2');\n}\n\nUtf16BEDecoder.prototype.end = function() {\n this.overflowByte = -1;\n}\n\n\n// == UTF-16 codec =============================================================\n// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.\n// Defaults to UTF-16LE, as it's prevalent and default in Node.\n// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le\n// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});\n\n// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).\n\nexports.utf16 = Utf16Codec;\nfunction Utf16Codec(codecOptions, iconv) {\n this.iconv = iconv;\n}\n\nUtf16Codec.prototype.encoder = Utf16Encoder;\nUtf16Codec.prototype.decoder = Utf16Decoder;\n\n\n// -- Encoding (pass-through)\n\nfunction Utf16Encoder(options, codec) {\n options = options || {};\n if (options.addBOM === undefined)\n options.addBOM = true;\n this.encoder = codec.iconv.getEncoder('utf-16le', options);\n}\n\nUtf16Encoder.prototype.write = function(str) {\n return this.encoder.write(str);\n}\n\nUtf16Encoder.prototype.end = function() {\n return this.encoder.end();\n}\n\n\n// -- Decoding\n\nfunction Utf16Decoder(options, codec) {\n this.decoder = null;\n this.initialBufs = [];\n this.initialBufsLen = 0;\n\n this.options = options || {};\n this.iconv = codec.iconv;\n}\n\nUtf16Decoder.prototype.write = function(buf) {\n if (!this.decoder) {\n // Codec is not chosen yet. Accumulate initial bytes.\n this.initialBufs.push(buf);\n this.initialBufsLen += buf.length;\n \n if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below)\n return '';\n\n // We have enough bytes -> detect endianness.\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n\n return this.decoder.write(buf);\n}\n\nUtf16Decoder.prototype.end = function() {\n if (!this.decoder) {\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n var trail = this.decoder.end();\n if (trail)\n resStr += trail;\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n return this.decoder.end();\n}\n\nfunction detectEncoding(bufs, defaultEncoding) {\n var b = [];\n var charsProcessed = 0;\n var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE.\n\n outer_loop:\n for (var i = 0; i < bufs.length; i++) {\n var buf = bufs[i];\n for (var j = 0; j < buf.length; j++) {\n b.push(buf[j]);\n if (b.length === 2) {\n if (charsProcessed === 0) {\n // Check BOM first.\n if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le';\n if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be';\n }\n\n if (b[0] === 0 && b[1] !== 0) asciiCharsBE++;\n if (b[0] !== 0 && b[1] === 0) asciiCharsLE++;\n\n b.length = 0;\n charsProcessed++;\n\n if (charsProcessed >= 100) {\n break outer_loop;\n }\n }\n }\n }\n\n // Make decisions.\n // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.\n // So, we count ASCII as if it was LE or BE, and decide from that.\n if (asciiCharsBE > asciiCharsLE) return 'utf-16be';\n if (asciiCharsBE < asciiCharsLE) return 'utf-16le';\n\n // Couldn't decide (likely all zeros or not enough data).\n return defaultEncoding || 'utf-16le';\n}\n\n\n","'use strict';\n\nvar Buffer = require('safer-buffer').Buffer;\n\n// == UTF32-LE/BE codec. ==========================================================\n\nexports._utf32 = Utf32Codec;\n\nfunction Utf32Codec(codecOptions, iconv) {\n this.iconv = iconv;\n this.bomAware = true;\n this.isLE = codecOptions.isLE;\n}\n\nexports.utf32le = { type: '_utf32', isLE: true };\nexports.utf32be = { type: '_utf32', isLE: false };\n\n// Aliases\nexports.ucs4le = 'utf32le';\nexports.ucs4be = 'utf32be';\n\nUtf32Codec.prototype.encoder = Utf32Encoder;\nUtf32Codec.prototype.decoder = Utf32Decoder;\n\n// -- Encoding\n\nfunction Utf32Encoder(options, codec) {\n this.isLE = codec.isLE;\n this.highSurrogate = 0;\n}\n\nUtf32Encoder.prototype.write = function(str) {\n var src = Buffer.from(str, 'ucs2');\n var dst = Buffer.alloc(src.length * 2);\n var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE;\n var offset = 0;\n\n for (var i = 0; i < src.length; i += 2) {\n var code = src.readUInt16LE(i);\n var isHighSurrogate = (0xD800 <= code && code < 0xDC00);\n var isLowSurrogate = (0xDC00 <= code && code < 0xE000);\n\n if (this.highSurrogate) {\n if (isHighSurrogate || !isLowSurrogate) {\n // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low\n // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character\n // (technically wrong, but expected by some applications, like Windows file names).\n write32.call(dst, this.highSurrogate, offset);\n offset += 4;\n }\n else {\n // Create 32-bit value from high and low surrogates;\n var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000;\n\n write32.call(dst, codepoint, offset);\n offset += 4;\n this.highSurrogate = 0;\n\n continue;\n }\n }\n\n if (isHighSurrogate)\n this.highSurrogate = code;\n else {\n // Even if the current character is a low surrogate, with no previous high surrogate, we'll\n // encode it as a semi-invalid stand-alone character for the same reasons expressed above for\n // unpaired high surrogates.\n write32.call(dst, code, offset);\n offset += 4;\n this.highSurrogate = 0;\n }\n }\n\n if (offset < dst.length)\n dst = dst.slice(0, offset);\n\n return dst;\n};\n\nUtf32Encoder.prototype.end = function() {\n // Treat any leftover high surrogate as a semi-valid independent character.\n if (!this.highSurrogate)\n return;\n\n var buf = Buffer.alloc(4);\n\n if (this.isLE)\n buf.writeUInt32LE(this.highSurrogate, 0);\n else\n buf.writeUInt32BE(this.highSurrogate, 0);\n\n this.highSurrogate = 0;\n\n return buf;\n};\n\n// -- Decoding\n\nfunction Utf32Decoder(options, codec) {\n this.isLE = codec.isLE;\n this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0);\n this.overflow = [];\n}\n\nUtf32Decoder.prototype.write = function(src) {\n if (src.length === 0)\n return '';\n\n var i = 0;\n var codepoint = 0;\n var dst = Buffer.alloc(src.length + 4);\n var offset = 0;\n var isLE = this.isLE;\n var overflow = this.overflow;\n var badChar = this.badChar;\n\n if (overflow.length > 0) {\n for (; i < src.length && overflow.length < 4; i++)\n overflow.push(src[i]);\n \n if (overflow.length === 4) {\n // NOTE: codepoint is a signed int32 and can be negative.\n // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).\n if (isLE) {\n codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24);\n } else {\n codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24);\n }\n overflow.length = 0;\n\n offset = _writeCodepoint(dst, offset, codepoint, badChar);\n }\n }\n\n // Main loop. Should be as optimized as possible.\n for (; i < src.length - 3; i += 4) {\n // NOTE: codepoint is a signed int32 and can be negative.\n if (isLE) {\n codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24);\n } else {\n codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24);\n }\n offset = _writeCodepoint(dst, offset, codepoint, badChar);\n }\n\n // Keep overflowing bytes.\n for (; i < src.length; i++) {\n overflow.push(src[i]);\n }\n\n return dst.slice(0, offset).toString('ucs2');\n};\n\nfunction _writeCodepoint(dst, offset, codepoint, badChar) {\n // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations.\n if (codepoint < 0 || codepoint > 0x10FFFF) {\n // Not a valid Unicode codepoint\n codepoint = badChar;\n } \n\n // Ephemeral Planes: Write high surrogate.\n if (codepoint >= 0x10000) {\n codepoint -= 0x10000;\n\n var high = 0xD800 | (codepoint >> 10);\n dst[offset++] = high & 0xff;\n dst[offset++] = high >> 8;\n\n // Low surrogate is written below.\n var codepoint = 0xDC00 | (codepoint & 0x3FF);\n }\n\n // Write BMP char or low surrogate.\n dst[offset++] = codepoint & 0xff;\n dst[offset++] = codepoint >> 8;\n\n return offset;\n};\n\nUtf32Decoder.prototype.end = function() {\n this.overflow.length = 0;\n};\n\n// == UTF-32 Auto codec =============================================================\n// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.\n// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32\n// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'});\n\n// Encoder prepends BOM (which can be overridden with (addBOM: false}).\n\nexports.utf32 = Utf32AutoCodec;\nexports.ucs4 = 'utf32';\n\nfunction Utf32AutoCodec(options, iconv) {\n this.iconv = iconv;\n}\n\nUtf32AutoCodec.prototype.encoder = Utf32AutoEncoder;\nUtf32AutoCodec.prototype.decoder = Utf32AutoDecoder;\n\n// -- Encoding\n\nfunction Utf32AutoEncoder(options, codec) {\n options = options || {};\n\n if (options.addBOM === undefined)\n options.addBOM = true;\n\n this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options);\n}\n\nUtf32AutoEncoder.prototype.write = function(str) {\n return this.encoder.write(str);\n};\n\nUtf32AutoEncoder.prototype.end = function() {\n return this.encoder.end();\n};\n\n// -- Decoding\n\nfunction Utf32AutoDecoder(options, codec) {\n this.decoder = null;\n this.initialBufs = [];\n this.initialBufsLen = 0;\n this.options = options || {};\n this.iconv = codec.iconv;\n}\n\nUtf32AutoDecoder.prototype.write = function(buf) {\n if (!this.decoder) { \n // Codec is not chosen yet. Accumulate initial bytes.\n this.initialBufs.push(buf);\n this.initialBufsLen += buf.length;\n\n if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below)\n return '';\n\n // We have enough bytes -> detect endianness.\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n\n return this.decoder.write(buf);\n};\n\nUtf32AutoDecoder.prototype.end = function() {\n if (!this.decoder) {\n var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);\n this.decoder = this.iconv.getDecoder(encoding, this.options);\n\n var resStr = '';\n for (var i = 0; i < this.initialBufs.length; i++)\n resStr += this.decoder.write(this.initialBufs[i]);\n\n var trail = this.decoder.end();\n if (trail)\n resStr += trail;\n\n this.initialBufs.length = this.initialBufsLen = 0;\n return resStr;\n }\n\n return this.decoder.end();\n};\n\nfunction detectEncoding(bufs, defaultEncoding) {\n var b = [];\n var charsProcessed = 0;\n var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE.\n var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE.\n\n outer_loop:\n for (var i = 0; i < bufs.length; i++) {\n var buf = bufs[i];\n for (var j = 0; j < buf.length; j++) {\n b.push(buf[j]);\n if (b.length === 4) {\n if (charsProcessed === 0) {\n // Check BOM first.\n if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) {\n return 'utf-32le';\n }\n if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) {\n return 'utf-32be';\n }\n }\n\n if (b[0] !== 0 || b[1] > 0x10) invalidBE++;\n if (b[3] !== 0 || b[2] > 0x10) invalidLE++;\n\n if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++;\n if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++;\n\n b.length = 0;\n charsProcessed++;\n\n if (charsProcessed >= 100) {\n break outer_loop;\n }\n }\n }\n }\n\n // Make decisions.\n if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be';\n if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le';\n\n // Couldn't decide (likely all zeros or not enough data).\n return defaultEncoding || 'utf-32le';\n}\n","\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152\n// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3\n\nexports.utf7 = Utf7Codec;\nexports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7\nfunction Utf7Codec(codecOptions, iconv) {\n this.iconv = iconv;\n};\n\nUtf7Codec.prototype.encoder = Utf7Encoder;\nUtf7Codec.prototype.decoder = Utf7Decoder;\nUtf7Codec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nvar nonDirectChars = /[^A-Za-z0-9'\\(\\),-\\.\\/:\\? \\n\\r\\t]+/g;\n\nfunction Utf7Encoder(options, codec) {\n this.iconv = codec.iconv;\n}\n\nUtf7Encoder.prototype.write = function(str) {\n // Naive implementation.\n // Non-direct chars are encoded as \"+-\"; single \"+\" char is encoded as \"+-\".\n return Buffer.from(str.replace(nonDirectChars, function(chunk) {\n return \"+\" + (chunk === '+' ? '' : \n this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) \n + \"-\";\n }.bind(this)));\n}\n\nUtf7Encoder.prototype.end = function() {\n}\n\n\n// -- Decoding\n\nfunction Utf7Decoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = '';\n}\n\nvar base64Regex = /[A-Za-z0-9\\/+]/;\nvar base64Chars = [];\nfor (var i = 0; i < 256; i++)\n base64Chars[i] = base64Regex.test(String.fromCharCode(i));\n\nvar plusChar = '+'.charCodeAt(0), \n minusChar = '-'.charCodeAt(0),\n andChar = '&'.charCodeAt(0);\n\nUtf7Decoder.prototype.write = function(buf) {\n var res = \"\", lastI = 0,\n inBase64 = this.inBase64,\n base64Accum = this.base64Accum;\n\n // The decoder is more involved as we must handle chunks in stream.\n\n for (var i = 0; i < buf.length; i++) {\n if (!inBase64) { // We're in direct mode.\n // Write direct chars until '+'\n if (buf[i] == plusChar) {\n res += this.iconv.decode(buf.slice(lastI, i), \"ascii\"); // Write direct chars.\n lastI = i+1;\n inBase64 = true;\n }\n } else { // We decode base64.\n if (!base64Chars[buf[i]]) { // Base64 ended.\n if (i == lastI && buf[i] == minusChar) {// \"+-\" -> \"+\"\n res += \"+\";\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), \"ascii\");\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n if (buf[i] != minusChar) // Minus is absorbed after base64.\n i--;\n\n lastI = i+1;\n inBase64 = false;\n base64Accum = '';\n }\n }\n }\n\n if (!inBase64) {\n res += this.iconv.decode(buf.slice(lastI), \"ascii\"); // Write direct chars.\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), \"ascii\");\n\n var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.\n base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.\n b64str = b64str.slice(0, canBeDecoded);\n\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n this.inBase64 = inBase64;\n this.base64Accum = base64Accum;\n\n return res;\n}\n\nUtf7Decoder.prototype.end = function() {\n var res = \"\";\n if (this.inBase64 && this.base64Accum.length > 0)\n res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), \"utf16-be\");\n\n this.inBase64 = false;\n this.base64Accum = '';\n return res;\n}\n\n\n// UTF-7-IMAP codec.\n// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)\n// Differences:\n// * Base64 part is started by \"&\" instead of \"+\"\n// * Direct characters are 0x20-0x7E, except \"&\" (0x26)\n// * In Base64, \",\" is used instead of \"/\"\n// * Base64 must not be used to represent direct characters.\n// * No implicit shift back from Base64 (should always end with '-')\n// * String must end in non-shifted position.\n// * \"-&\" while in base64 is not allowed.\n\n\nexports.utf7imap = Utf7IMAPCodec;\nfunction Utf7IMAPCodec(codecOptions, iconv) {\n this.iconv = iconv;\n};\n\nUtf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;\nUtf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;\nUtf7IMAPCodec.prototype.bomAware = true;\n\n\n// -- Encoding\n\nfunction Utf7IMAPEncoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = Buffer.alloc(6);\n this.base64AccumIdx = 0;\n}\n\nUtf7IMAPEncoder.prototype.write = function(str) {\n var inBase64 = this.inBase64,\n base64Accum = this.base64Accum,\n base64AccumIdx = this.base64AccumIdx,\n buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0;\n\n for (var i = 0; i < str.length; i++) {\n var uChar = str.charCodeAt(i);\n if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.\n if (inBase64) {\n if (base64AccumIdx > 0) {\n bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\\//g, ',').replace(/=+$/, ''), bufIdx);\n base64AccumIdx = 0;\n }\n\n buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.\n inBase64 = false;\n }\n\n if (!inBase64) {\n buf[bufIdx++] = uChar; // Write direct character\n\n if (uChar === andChar) // Ampersand -> '&-'\n buf[bufIdx++] = minusChar;\n }\n\n } else { // Non-direct character\n if (!inBase64) {\n buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.\n inBase64 = true;\n }\n if (inBase64) {\n base64Accum[base64AccumIdx++] = uChar >> 8;\n base64Accum[base64AccumIdx++] = uChar & 0xFF;\n\n if (base64AccumIdx == base64Accum.length) {\n bufIdx += buf.write(base64Accum.toString('base64').replace(/\\//g, ','), bufIdx);\n base64AccumIdx = 0;\n }\n }\n }\n }\n\n this.inBase64 = inBase64;\n this.base64AccumIdx = base64AccumIdx;\n\n return buf.slice(0, bufIdx);\n}\n\nUtf7IMAPEncoder.prototype.end = function() {\n var buf = Buffer.alloc(10), bufIdx = 0;\n if (this.inBase64) {\n if (this.base64AccumIdx > 0) {\n bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\\//g, ',').replace(/=+$/, ''), bufIdx);\n this.base64AccumIdx = 0;\n }\n\n buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.\n this.inBase64 = false;\n }\n\n return buf.slice(0, bufIdx);\n}\n\n\n// -- Decoding\n\nfunction Utf7IMAPDecoder(options, codec) {\n this.iconv = codec.iconv;\n this.inBase64 = false;\n this.base64Accum = '';\n}\n\nvar base64IMAPChars = base64Chars.slice();\nbase64IMAPChars[','.charCodeAt(0)] = true;\n\nUtf7IMAPDecoder.prototype.write = function(buf) {\n var res = \"\", lastI = 0,\n inBase64 = this.inBase64,\n base64Accum = this.base64Accum;\n\n // The decoder is more involved as we must handle chunks in stream.\n // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).\n\n for (var i = 0; i < buf.length; i++) {\n if (!inBase64) { // We're in direct mode.\n // Write direct chars until '&'\n if (buf[i] == andChar) {\n res += this.iconv.decode(buf.slice(lastI, i), \"ascii\"); // Write direct chars.\n lastI = i+1;\n inBase64 = true;\n }\n } else { // We decode base64.\n if (!base64IMAPChars[buf[i]]) { // Base64 ended.\n if (i == lastI && buf[i] == minusChar) { // \"&-\" -> \"&\"\n res += \"&\";\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), \"ascii\").replace(/,/g, '/');\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n if (buf[i] != minusChar) // Minus may be absorbed after base64.\n i--;\n\n lastI = i+1;\n inBase64 = false;\n base64Accum = '';\n }\n }\n }\n\n if (!inBase64) {\n res += this.iconv.decode(buf.slice(lastI), \"ascii\"); // Write direct chars.\n } else {\n var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), \"ascii\").replace(/,/g, '/');\n\n var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.\n base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.\n b64str = b64str.slice(0, canBeDecoded);\n\n res += this.iconv.decode(Buffer.from(b64str, 'base64'), \"utf16-be\");\n }\n\n this.inBase64 = inBase64;\n this.base64Accum = base64Accum;\n\n return res;\n}\n\nUtf7IMAPDecoder.prototype.end = function() {\n var res = \"\";\n if (this.inBase64 && this.base64Accum.length > 0)\n res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), \"utf16-be\");\n\n this.inBase64 = false;\n this.base64Accum = '';\n return res;\n}\n\n\n","\"use strict\";\n\nvar BOMChar = '\\uFEFF';\n\nexports.PrependBOM = PrependBOMWrapper\nfunction PrependBOMWrapper(encoder, options) {\n this.encoder = encoder;\n this.addBOM = true;\n}\n\nPrependBOMWrapper.prototype.write = function(str) {\n if (this.addBOM) {\n str = BOMChar + str;\n this.addBOM = false;\n }\n\n return this.encoder.write(str);\n}\n\nPrependBOMWrapper.prototype.end = function() {\n return this.encoder.end();\n}\n\n\n//------------------------------------------------------------------------------\n\nexports.StripBOM = StripBOMWrapper;\nfunction StripBOMWrapper(decoder, options) {\n this.decoder = decoder;\n this.pass = false;\n this.options = options || {};\n}\n\nStripBOMWrapper.prototype.write = function(buf) {\n var res = this.decoder.write(buf);\n if (this.pass || !res)\n return res;\n\n if (res[0] === BOMChar) {\n res = res.slice(1);\n if (typeof this.options.stripBOM === 'function')\n this.options.stripBOM();\n }\n\n this.pass = true;\n return res;\n}\n\nStripBOMWrapper.prototype.end = function() {\n return this.decoder.end();\n}\n\n","\"use strict\";\n\nvar Buffer = require(\"safer-buffer\").Buffer;\n\nvar bomHandling = require(\"./bom-handling\"),\n iconv = module.exports;\n\n// All codecs and aliases are kept here, keyed by encoding name/alias.\n// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.\niconv.encodings = null;\n\n// Characters emitted in case of error.\niconv.defaultCharUnicode = '�';\niconv.defaultCharSingleByte = '?';\n\n// Public API.\niconv.encode = function encode(str, encoding, options) {\n str = \"\" + (str || \"\"); // Ensure string.\n\n var encoder = iconv.getEncoder(encoding, options);\n\n var res = encoder.write(str);\n var trail = encoder.end();\n \n return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;\n}\n\niconv.decode = function decode(buf, encoding, options) {\n if (typeof buf === 'string') {\n if (!iconv.skipDecodeWarning) {\n console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');\n iconv.skipDecodeWarning = true;\n }\n\n buf = Buffer.from(\"\" + (buf || \"\"), \"binary\"); // Ensure buffer.\n }\n\n var decoder = iconv.getDecoder(encoding, options);\n\n var res = decoder.write(buf);\n var trail = decoder.end();\n\n return trail ? (res + trail) : res;\n}\n\niconv.encodingExists = function encodingExists(enc) {\n try {\n iconv.getCodec(enc);\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// Legacy aliases to convert functions\niconv.toEncoding = iconv.encode;\niconv.fromEncoding = iconv.decode;\n\n// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.\niconv._codecDataCache = {};\niconv.getCodec = function getCodec(encoding) {\n if (!iconv.encodings)\n iconv.encodings = require(\"../encodings\"); // Lazy load all encoding definitions.\n \n // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.\n var enc = iconv._canonicalizeEncoding(encoding);\n\n // Traverse iconv.encodings to find actual codec.\n var codecOptions = {};\n while (true) {\n var codec = iconv._codecDataCache[enc];\n if (codec)\n return codec;\n\n var codecDef = iconv.encodings[enc];\n\n switch (typeof codecDef) {\n case \"string\": // Direct alias to other encoding.\n enc = codecDef;\n break;\n\n case \"object\": // Alias with options. Can be layered.\n for (var key in codecDef)\n codecOptions[key] = codecDef[key];\n\n if (!codecOptions.encodingName)\n codecOptions.encodingName = enc;\n \n enc = codecDef.type;\n break;\n\n case \"function\": // Codec itself.\n if (!codecOptions.encodingName)\n codecOptions.encodingName = enc;\n\n // The codec function must load all tables and return object with .encoder and .decoder methods.\n // It'll be called only once (for each different options object).\n codec = new codecDef(codecOptions, iconv);\n\n iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.\n return codec;\n\n default:\n throw new Error(\"Encoding not recognized: '\" + encoding + \"' (searched as: '\"+enc+\"')\");\n }\n }\n}\n\niconv._canonicalizeEncoding = function(encoding) {\n // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.\n return (''+encoding).toLowerCase().replace(/:\\d{4}$|[^0-9a-z]/g, \"\");\n}\n\niconv.getEncoder = function getEncoder(encoding, options) {\n var codec = iconv.getCodec(encoding),\n encoder = new codec.encoder(options, codec);\n\n if (codec.bomAware && options && options.addBOM)\n encoder = new bomHandling.PrependBOM(encoder, options);\n\n return encoder;\n}\n\niconv.getDecoder = function getDecoder(encoding, options) {\n var codec = iconv.getCodec(encoding),\n decoder = new codec.decoder(options, codec);\n\n if (codec.bomAware && !(options && options.stripBOM === false))\n decoder = new bomHandling.StripBOM(decoder, options);\n\n return decoder;\n}\n\n// Streaming API\n// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add\n// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default.\n// If you would like to enable it explicitly, please add the following code to your app:\n// > iconv.enableStreamingAPI(require('stream'));\niconv.enableStreamingAPI = function enableStreamingAPI(stream_module) {\n if (iconv.supportsStreams)\n return;\n\n // Dependency-inject stream module to create IconvLite stream classes.\n var streams = require(\"./streams\")(stream_module);\n\n // Not public API yet, but expose the stream classes.\n iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;\n iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;\n\n // Streaming API.\n iconv.encodeStream = function encodeStream(encoding, options) {\n return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);\n }\n\n iconv.decodeStream = function decodeStream(encoding, options) {\n return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);\n }\n\n iconv.supportsStreams = true;\n}\n\n// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments).\nvar stream_module;\ntry {\n stream_module = require(\"stream\");\n} catch (e) {}\n\nif (stream_module && stream_module.Transform) {\n iconv.enableStreamingAPI(stream_module);\n\n} else {\n // In rare cases where 'stream' module is not available by default, throw a helpful exception.\n iconv.encodeStream = iconv.decodeStream = function() {\n throw new Error(\"iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.\");\n };\n}\n\nif (\"Ā\" != \"\\u0100\") {\n console.error(\"iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.\");\n}\n","\"use strict\";\n\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), \n// we opt to dependency-inject it instead of creating a hard dependency.\nmodule.exports = function(stream_module) {\n var Transform = stream_module.Transform;\n\n // == Encoder stream =======================================================\n\n function IconvLiteEncoderStream(conv, options) {\n this.conv = conv;\n options = options || {};\n options.decodeStrings = false; // We accept only strings, so we don't need to decode them.\n Transform.call(this, options);\n }\n\n IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {\n constructor: { value: IconvLiteEncoderStream }\n });\n\n IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {\n if (typeof chunk != 'string')\n return done(new Error(\"Iconv encoding stream needs strings as its input.\"));\n try {\n var res = this.conv.write(chunk);\n if (res && res.length) this.push(res);\n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteEncoderStream.prototype._flush = function(done) {\n try {\n var res = this.conv.end();\n if (res && res.length) this.push(res);\n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteEncoderStream.prototype.collect = function(cb) {\n var chunks = [];\n this.on('error', cb);\n this.on('data', function(chunk) { chunks.push(chunk); });\n this.on('end', function() {\n cb(null, Buffer.concat(chunks));\n });\n return this;\n }\n\n\n // == Decoder stream =======================================================\n\n function IconvLiteDecoderStream(conv, options) {\n this.conv = conv;\n options = options || {};\n options.encoding = this.encoding = 'utf8'; // We output strings.\n Transform.call(this, options);\n }\n\n IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {\n constructor: { value: IconvLiteDecoderStream }\n });\n\n IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {\n if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array))\n return done(new Error(\"Iconv decoding stream needs buffers as its input.\"));\n try {\n var res = this.conv.write(chunk);\n if (res && res.length) this.push(res, this.encoding);\n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteDecoderStream.prototype._flush = function(done) {\n try {\n var res = this.conv.end();\n if (res && res.length) this.push(res, this.encoding); \n done();\n }\n catch (e) {\n done(e);\n }\n }\n\n IconvLiteDecoderStream.prototype.collect = function(cb) {\n var res = '';\n this.on('error', cb);\n this.on('data', function(chunk) { res += chunk; });\n this.on('end', function() {\n cb(null, res);\n });\n return this;\n }\n\n return {\n IconvLiteEncoderStream: IconvLiteEncoderStream,\n IconvLiteDecoderStream: IconvLiteDecoderStream,\n };\n};\n","/*!\n * mime-db\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015-2022 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n/**\n * Module exports.\n */\n\nmodule.exports = require('./db.json')\n","/*!\n * mime-types\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar db = require('mime-db')\nvar extname = require('path').extname\n\n/**\n * Module variables.\n * @private\n */\n\nvar EXTRACT_TYPE_REGEXP = /^\\s*([^;\\s]*)(?:;|\\s|$)/\nvar TEXT_TYPE_REGEXP = /^text\\//i\n\n/**\n * Module exports.\n * @public\n */\n\nexports.charset = charset\nexports.charsets = { lookup: charset }\nexports.contentType = contentType\nexports.extension = extension\nexports.extensions = Object.create(null)\nexports.lookup = lookup\nexports.types = Object.create(null)\n\n// Populate the extensions/types maps\npopulateMaps(exports.extensions, exports.types)\n\n/**\n * Get the default charset for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction charset (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n var mime = match && db[match[1].toLowerCase()]\n\n if (mime && mime.charset) {\n return mime.charset\n }\n\n // default text/* to utf-8\n if (match && TEXT_TYPE_REGEXP.test(match[1])) {\n return 'UTF-8'\n }\n\n return false\n}\n\n/**\n * Create a full Content-Type header given a MIME type or extension.\n *\n * @param {string} str\n * @return {boolean|string}\n */\n\nfunction contentType (str) {\n // TODO: should this even be in this module?\n if (!str || typeof str !== 'string') {\n return false\n }\n\n var mime = str.indexOf('/') === -1\n ? exports.lookup(str)\n : str\n\n if (!mime) {\n return false\n }\n\n // TODO: use content-type or other module\n if (mime.indexOf('charset') === -1) {\n var charset = exports.charset(mime)\n if (charset) mime += '; charset=' + charset.toLowerCase()\n }\n\n return mime\n}\n\n/**\n * Get the default extension for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction extension (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n\n // get extensions\n var exts = match && exports.extensions[match[1].toLowerCase()]\n\n if (!exts || !exts.length) {\n return false\n }\n\n return exts[0]\n}\n\n/**\n * Lookup the MIME type for a file path/extension.\n *\n * @param {string} path\n * @return {boolean|string}\n */\n\nfunction lookup (path) {\n if (!path || typeof path !== 'string') {\n return false\n }\n\n // get the extension (\"ext\" or \".ext\" or full path)\n var extension = extname('x.' + path)\n .toLowerCase()\n .substr(1)\n\n if (!extension) {\n return false\n }\n\n return exports.types[extension] || false\n}\n\n/**\n * Populate the extensions and types maps.\n * @private\n */\n\nfunction populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar Stream = _interopDefault(require('stream'));\nvar http = _interopDefault(require('http'));\nvar Url = _interopDefault(require('url'));\nvar whatwgUrl = _interopDefault(require('whatwg-url'));\nvar https = _interopDefault(require('https'));\nvar zlib = _interopDefault(require('zlib'));\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * isSameProtocol reports whether the two provided URLs use the same protocol.\n *\n * Both domains must already be in canonical form.\n * @param {string|URL} original\n * @param {string|URL} destination\n */\nconst isSameProtocol = function isSameProtocol(destination, original) {\n\tconst orig = new URL$1(original).protocol;\n\tconst dest = new URL$1(destination).protocol;\n\n\treturn orig === dest;\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\tdestroyStream(request.body, error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(req, function (err) {\n\t\t\tif (signal && signal.aborted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (parseInt(process.version.substring(1)) < 14) {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\treq.on('socket', function (s) {\n\t\t\t\ts.addListener('close', function (hadError) {\n\t\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\t\tconst hasDataListener = s.listenerCount('data') > 0;\n\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && hasDataListener && !hadError && !(signal && signal.aborted)) {\n\t\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.on('end', function () {\n\t\t\t\t\t// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tlet socket;\n\n\trequest.on('socket', function (s) {\n\t\tsocket = s;\n\t});\n\n\trequest.on('response', function (response) {\n\t\tconst headers = response.headers;\n\n\t\tif (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {\n\t\t\tresponse.once('close', function (hadError) {\n\t\t\t\t// tests for socket presence, as in some situations the\n\t\t\t\t// the 'socket' event is not triggered for the request\n\t\t\t\t// (happens in deno), avoids `TypeError`\n\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\tconst hasDataListener = socket && socket.listenerCount('data') > 0;\n\n\t\t\t\tif (hasDataListener && !hadError) {\n\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\terrorCallback(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction destroyStream(stream, err) {\n\tif (stream.destroy) {\n\t\tstream.destroy(err);\n\t} else {\n\t\t// node < 8\n\t\tstream.emit('error', err);\n\t\tstream.end();\n\t}\n}\n\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nmodule.exports = exports = fetch;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = exports;\nexports.Headers = Headers;\nexports.Request = Request;\nexports.Response = Response;\nexports.FetchError = FetchError;\nexports.AbortError = AbortError;\n","'use strict';\n\n/**\n * Converts tokens for a single address into an address object\n *\n * @param {Array} tokens Tokens object\n * @return {Object} Address object\n */\nfunction _handleAddress(tokens) {\n let token;\n let isGroup = false;\n let state = 'text';\n let address;\n let addresses = [];\n let data = {\n address: [],\n comment: [],\n group: [],\n text: []\n };\n let i;\n let len;\n\n // Filter out , (comments) and regular text\n for (i = 0, len = tokens.length; i < len; i++) {\n token = tokens[i];\n if (token.type === 'operator') {\n switch (token.value) {\n case '<':\n state = 'address';\n break;\n case '(':\n state = 'comment';\n break;\n case ':':\n state = 'group';\n isGroup = true;\n break;\n default:\n state = 'text';\n }\n } else if (token.value) {\n if (state === 'address') {\n // handle use case where unquoted name includes a \"<\"\n // Apple Mail truncates everything between an unexpected < and an address\n // and so will we\n token.value = token.value.replace(/^[^<]*<\\s*/, '');\n }\n data[state].push(token.value);\n }\n }\n\n // If there is no text but a comment, replace the two\n if (!data.text.length && data.comment.length) {\n data.text = data.comment;\n data.comment = [];\n }\n\n if (isGroup) {\n // http://tools.ietf.org/html/rfc2822#appendix-A.1.3\n data.text = data.text.join(' ');\n addresses.push({\n name: data.text || (address && address.name),\n group: data.group.length ? addressparser(data.group.join(',')) : []\n });\n } else {\n // If no address was found, try to detect one from regular text\n if (!data.address.length && data.text.length) {\n for (i = data.text.length - 1; i >= 0; i--) {\n if (data.text[i].match(/^[^@\\s]+@[^@\\s]+$/)) {\n data.address = data.text.splice(i, 1);\n break;\n }\n }\n\n let _regexHandler = function (address) {\n if (!data.address.length) {\n data.address = [address.trim()];\n return ' ';\n } else {\n return address;\n }\n };\n\n // still no address\n if (!data.address.length) {\n for (i = data.text.length - 1; i >= 0; i--) {\n // fixed the regex to parse email address correctly when email address has more than one @\n data.text[i] = data.text[i].replace(/\\s*\\b[^@\\s]+@[^\\s]+\\b\\s*/, _regexHandler).trim();\n if (data.address.length) {\n break;\n }\n }\n }\n }\n\n // If there's still is no text but a comment exixts, replace the two\n if (!data.text.length && data.comment.length) {\n data.text = data.comment;\n data.comment = [];\n }\n\n // Keep only the first address occurence, push others to regular text\n if (data.address.length > 1) {\n data.text = data.text.concat(data.address.splice(1));\n }\n\n // Join values with spaces\n data.text = data.text.join(' ');\n data.address = data.address.join(' ');\n\n if (!data.address && isGroup) {\n return [];\n } else {\n address = {\n address: data.address || data.text || '',\n name: data.text || data.address || ''\n };\n\n if (address.address === address.name) {\n if ((address.address || '').match(/@/)) {\n address.name = '';\n } else {\n address.address = '';\n }\n }\n\n addresses.push(address);\n }\n }\n\n return addresses;\n}\n\n/**\n * Creates a Tokenizer object for tokenizing address field strings\n *\n * @constructor\n * @param {String} str Address field string\n */\nclass Tokenizer {\n constructor(str) {\n this.str = (str || '').toString();\n this.operatorCurrent = '';\n this.operatorExpecting = '';\n this.node = null;\n this.escaped = false;\n\n this.list = [];\n /**\n * Operator tokens and which tokens are expected to end the sequence\n */\n this.operators = {\n '\"': '\"',\n '(': ')',\n '<': '>',\n ',': '',\n ':': ';',\n // Semicolons are not a legal delimiter per the RFC2822 grammar other\n // than for terminating a group, but they are also not valid for any\n // other use in this context. Given that some mail clients have\n // historically allowed the semicolon as a delimiter equivalent to the\n // comma in their UI, it makes sense to treat them the same as a comma\n // when used outside of a group.\n ';': ''\n };\n }\n\n /**\n * Tokenizes the original input string\n *\n * @return {Array} An array of operator|text tokens\n */\n tokenize() {\n let chr,\n list = [];\n for (let i = 0, len = this.str.length; i < len; i++) {\n chr = this.str.charAt(i);\n this.checkChar(chr);\n }\n\n this.list.forEach(node => {\n node.value = (node.value || '').toString().trim();\n if (node.value) {\n list.push(node);\n }\n });\n\n return list;\n }\n\n /**\n * Checks if a character is an operator or text and acts accordingly\n *\n * @param {String} chr Character from the address field\n */\n checkChar(chr) {\n if (this.escaped) {\n // ignore next condition blocks\n } else if (chr === this.operatorExpecting) {\n this.node = {\n type: 'operator',\n value: chr\n };\n this.list.push(this.node);\n this.node = null;\n this.operatorExpecting = '';\n this.escaped = false;\n return;\n } else if (!this.operatorExpecting && chr in this.operators) {\n this.node = {\n type: 'operator',\n value: chr\n };\n this.list.push(this.node);\n this.node = null;\n this.operatorExpecting = this.operators[chr];\n this.escaped = false;\n return;\n } else if (['\"', \"'\"].includes(this.operatorExpecting) && chr === '\\\\') {\n this.escaped = true;\n return;\n }\n\n if (!this.node) {\n this.node = {\n type: 'text',\n value: ''\n };\n this.list.push(this.node);\n }\n\n if (chr === '\\n') {\n // Convert newlines to spaces. Carriage return is ignored as \\r and \\n usually\n // go together anyway and there already is a WS for \\n. Lone \\r means something is fishy.\n chr = ' ';\n }\n\n if (chr.charCodeAt(0) >= 0x21 || [' ', '\\t'].includes(chr)) {\n // skip command bytes\n this.node.value += chr;\n }\n\n this.escaped = false;\n }\n}\n\n/**\n * Parses structured e-mail addresses from an address field\n *\n * Example:\n *\n * 'Name '\n *\n * will be converted to\n *\n * [{name: 'Name', address: 'address@domain'}]\n *\n * @param {String} str Address field\n * @return {Array} An array of address objects\n */\nfunction addressparser(str, options) {\n options = options || {};\n\n let tokenizer = new Tokenizer(str);\n let tokens = tokenizer.tokenize();\n\n let addresses = [];\n let address = [];\n let parsedAddresses = [];\n\n tokens.forEach(token => {\n if (token.type === 'operator' && (token.value === ',' || token.value === ';')) {\n if (address.length) {\n addresses.push(address);\n }\n address = [];\n } else {\n address.push(token);\n }\n });\n\n if (address.length) {\n addresses.push(address);\n }\n\n addresses.forEach(address => {\n address = _handleAddress(address);\n if (address.length) {\n parsedAddresses = parsedAddresses.concat(address);\n }\n });\n\n if (options.flatten) {\n let addresses = [];\n let walkAddressList = list => {\n list.forEach(address => {\n if (address.group) {\n return walkAddressList(address.group);\n } else {\n addresses.push(address);\n }\n });\n };\n walkAddressList(parsedAddresses);\n return addresses;\n }\n\n return parsedAddresses;\n}\n\n// expose to the world\nmodule.exports = addressparser;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\n/**\n * Encodes a Buffer into a base64 encoded string\n *\n * @param {Buffer} buffer Buffer to convert\n * @returns {String} base64 encoded string\n */\nfunction encode(buffer) {\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer, 'utf-8');\n }\n\n return buffer.toString('base64');\n}\n\n/**\n * Adds soft line breaks to a base64 string\n *\n * @param {String} str base64 encoded string that might need line wrapping\n * @param {Number} [lineLength=76] Maximum allowed length for a line\n * @returns {String} Soft-wrapped base64 encoded string\n */\nfunction wrap(str, lineLength) {\n str = (str || '').toString();\n lineLength = lineLength || 76;\n\n if (str.length <= lineLength) {\n return str;\n }\n\n let result = [];\n let pos = 0;\n let chunkLength = lineLength * 1024;\n while (pos < str.length) {\n let wrappedLines = str\n .substr(pos, chunkLength)\n .replace(new RegExp('.{' + lineLength + '}', 'g'), '$&\\r\\n')\n .trim();\n result.push(wrappedLines);\n pos += chunkLength;\n }\n\n return result.join('\\r\\n').trim();\n}\n\n/**\n * Creates a transform stream for encoding data to base64 encoding\n *\n * @constructor\n * @param {Object} options Stream options\n * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping\n */\nclass Encoder extends Transform {\n constructor(options) {\n super();\n // init Transform\n this.options = options || {};\n\n if (this.options.lineLength !== false) {\n this.options.lineLength = this.options.lineLength || 76;\n }\n\n this._curLine = '';\n this._remainingBytes = false;\n\n this.inputBytes = 0;\n this.outputBytes = 0;\n }\n\n _transform(chunk, encoding, done) {\n if (encoding !== 'buffer') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (!chunk || !chunk.length) {\n return setImmediate(done);\n }\n\n this.inputBytes += chunk.length;\n\n if (this._remainingBytes && this._remainingBytes.length) {\n chunk = Buffer.concat([this._remainingBytes, chunk], this._remainingBytes.length + chunk.length);\n this._remainingBytes = false;\n }\n\n if (chunk.length % 3) {\n this._remainingBytes = chunk.slice(chunk.length - (chunk.length % 3));\n chunk = chunk.slice(0, chunk.length - (chunk.length % 3));\n } else {\n this._remainingBytes = false;\n }\n\n let b64 = this._curLine + encode(chunk);\n\n if (this.options.lineLength) {\n b64 = wrap(b64, this.options.lineLength);\n\n // remove last line as it is still most probably incomplete\n let lastLF = b64.lastIndexOf('\\n');\n if (lastLF < 0) {\n this._curLine = b64;\n b64 = '';\n } else if (lastLF === b64.length - 1) {\n this._curLine = '';\n } else {\n this._curLine = b64.substr(lastLF + 1);\n b64 = b64.substr(0, lastLF + 1);\n }\n }\n\n if (b64) {\n this.outputBytes += b64.length;\n this.push(Buffer.from(b64, 'ascii'));\n }\n\n setImmediate(done);\n }\n\n _flush(done) {\n if (this._remainingBytes && this._remainingBytes.length) {\n this._curLine += encode(this._remainingBytes);\n }\n\n if (this._curLine) {\n this._curLine = wrap(this._curLine, this.options.lineLength);\n this.outputBytes += this._curLine.length;\n this.push(this._curLine, 'ascii');\n this._curLine = '';\n }\n done();\n }\n}\n\n// expose to the world\nmodule.exports = {\n encode,\n wrap,\n Encoder\n};\n","'use strict';\n\n// FIXME:\n// replace this Transform mess with a method that pipes input argument to output argument\n\nconst MessageParser = require('./message-parser');\nconst RelaxedBody = require('./relaxed-body');\nconst sign = require('./sign');\nconst PassThrough = require('stream').PassThrough;\nconst fs = require('fs');\nconst path = require('path');\nconst crypto = require('crypto');\n\nconst DKIM_ALGO = 'sha256';\nconst MAX_MESSAGE_SIZE = 128 * 1024; // buffer messages larger than this to disk\n\n/*\n// Usage:\n\nlet dkim = new DKIM({\n domainName: 'example.com',\n keySelector: 'key-selector',\n privateKey,\n cacheDir: '/tmp'\n});\ndkim.sign(input).pipe(process.stdout);\n\n// Where inputStream is a rfc822 message (either a stream, string or Buffer)\n// and outputStream is a DKIM signed rfc822 message\n*/\n\nclass DKIMSigner {\n constructor(options, keys, input, output) {\n this.options = options || {};\n this.keys = keys;\n\n this.cacheTreshold = Number(this.options.cacheTreshold) || MAX_MESSAGE_SIZE;\n this.hashAlgo = this.options.hashAlgo || DKIM_ALGO;\n\n this.cacheDir = this.options.cacheDir || false;\n\n this.chunks = [];\n this.chunklen = 0;\n this.readPos = 0;\n this.cachePath = this.cacheDir ? path.join(this.cacheDir, 'message.' + Date.now() + '-' + crypto.randomBytes(14).toString('hex')) : false;\n this.cache = false;\n\n this.headers = false;\n this.bodyHash = false;\n this.parser = false;\n this.relaxedBody = false;\n\n this.input = input;\n this.output = output;\n this.output.usingCache = false;\n\n this.hasErrored = false;\n\n this.input.on('error', err => {\n this.hasErrored = true;\n this.cleanup();\n output.emit('error', err);\n });\n }\n\n cleanup() {\n if (!this.cache || !this.cachePath) {\n return;\n }\n fs.unlink(this.cachePath, () => false);\n }\n\n createReadCache() {\n // pipe remainings to cache file\n this.cache = fs.createReadStream(this.cachePath);\n this.cache.once('error', err => {\n this.cleanup();\n this.output.emit('error', err);\n });\n this.cache.once('close', () => {\n this.cleanup();\n });\n this.cache.pipe(this.output);\n }\n\n sendNextChunk() {\n if (this.hasErrored) {\n return;\n }\n\n if (this.readPos >= this.chunks.length) {\n if (!this.cache) {\n return this.output.end();\n }\n return this.createReadCache();\n }\n let chunk = this.chunks[this.readPos++];\n if (this.output.write(chunk) === false) {\n return this.output.once('drain', () => {\n this.sendNextChunk();\n });\n }\n setImmediate(() => this.sendNextChunk());\n }\n\n sendSignedOutput() {\n let keyPos = 0;\n let signNextKey = () => {\n if (keyPos >= this.keys.length) {\n this.output.write(this.parser.rawHeaders);\n return setImmediate(() => this.sendNextChunk());\n }\n let key = this.keys[keyPos++];\n let dkimField = sign(this.headers, this.hashAlgo, this.bodyHash, {\n domainName: key.domainName,\n keySelector: key.keySelector,\n privateKey: key.privateKey,\n headerFieldNames: this.options.headerFieldNames,\n skipFields: this.options.skipFields\n });\n if (dkimField) {\n this.output.write(Buffer.from(dkimField + '\\r\\n'));\n }\n return setImmediate(signNextKey);\n };\n\n if (this.bodyHash && this.headers) {\n return signNextKey();\n }\n\n this.output.write(this.parser.rawHeaders);\n this.sendNextChunk();\n }\n\n createWriteCache() {\n this.output.usingCache = true;\n // pipe remainings to cache file\n this.cache = fs.createWriteStream(this.cachePath);\n this.cache.once('error', err => {\n this.cleanup();\n // drain input\n this.relaxedBody.unpipe(this.cache);\n this.relaxedBody.on('readable', () => {\n while (this.relaxedBody.read() !== null) {\n // do nothing\n }\n });\n this.hasErrored = true;\n // emit error\n this.output.emit('error', err);\n });\n this.cache.once('close', () => {\n this.sendSignedOutput();\n });\n this.relaxedBody.removeAllListeners('readable');\n this.relaxedBody.pipe(this.cache);\n }\n\n signStream() {\n this.parser = new MessageParser();\n this.relaxedBody = new RelaxedBody({\n hashAlgo: this.hashAlgo\n });\n\n this.parser.on('headers', value => {\n this.headers = value;\n });\n\n this.relaxedBody.on('hash', value => {\n this.bodyHash = value;\n });\n\n this.relaxedBody.on('readable', () => {\n let chunk;\n if (this.cache) {\n return;\n }\n while ((chunk = this.relaxedBody.read()) !== null) {\n this.chunks.push(chunk);\n this.chunklen += chunk.length;\n if (this.chunklen >= this.cacheTreshold && this.cachePath) {\n return this.createWriteCache();\n }\n }\n });\n\n this.relaxedBody.on('end', () => {\n if (this.cache) {\n return;\n }\n this.sendSignedOutput();\n });\n\n this.parser.pipe(this.relaxedBody);\n setImmediate(() => this.input.pipe(this.parser));\n }\n}\n\nclass DKIM {\n constructor(options) {\n this.options = options || {};\n this.keys = [].concat(\n this.options.keys || {\n domainName: options.domainName,\n keySelector: options.keySelector,\n privateKey: options.privateKey\n }\n );\n }\n\n sign(input, extraOptions) {\n let output = new PassThrough();\n let inputStream = input;\n let writeValue = false;\n\n if (Buffer.isBuffer(input)) {\n writeValue = input;\n inputStream = new PassThrough();\n } else if (typeof input === 'string') {\n writeValue = Buffer.from(input);\n inputStream = new PassThrough();\n }\n\n let options = this.options;\n if (extraOptions && Object.keys(extraOptions).length) {\n options = {};\n Object.keys(this.options || {}).forEach(key => {\n options[key] = this.options[key];\n });\n Object.keys(extraOptions || {}).forEach(key => {\n if (!(key in options)) {\n options[key] = extraOptions[key];\n }\n });\n }\n\n let signer = new DKIMSigner(options, this.keys, inputStream, output);\n setImmediate(() => {\n signer.signStream();\n if (writeValue) {\n setImmediate(() => {\n inputStream.end(writeValue);\n });\n }\n });\n\n return output;\n }\n}\n\nmodule.exports = DKIM;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\n/**\n * MessageParser instance is a transform stream that separates message headers\n * from the rest of the body. Headers are emitted with the 'headers' event. Message\n * body is passed on as the resulting stream.\n */\nclass MessageParser extends Transform {\n constructor(options) {\n super(options);\n this.lastBytes = Buffer.alloc(4);\n this.headersParsed = false;\n this.headerBytes = 0;\n this.headerChunks = [];\n this.rawHeaders = false;\n this.bodySize = 0;\n }\n\n /**\n * Keeps count of the last 4 bytes in order to detect line breaks on chunk boundaries\n *\n * @param {Buffer} data Next data chunk from the stream\n */\n updateLastBytes(data) {\n let lblen = this.lastBytes.length;\n let nblen = Math.min(data.length, lblen);\n\n // shift existing bytes\n for (let i = 0, len = lblen - nblen; i < len; i++) {\n this.lastBytes[i] = this.lastBytes[i + nblen];\n }\n\n // add new bytes\n for (let i = 1; i <= nblen; i++) {\n this.lastBytes[lblen - i] = data[data.length - i];\n }\n }\n\n /**\n * Finds and removes message headers from the remaining body. We want to keep\n * headers separated until final delivery to be able to modify these\n *\n * @param {Buffer} data Next chunk of data\n * @return {Boolean} Returns true if headers are already found or false otherwise\n */\n checkHeaders(data) {\n if (this.headersParsed) {\n return true;\n }\n\n let lblen = this.lastBytes.length;\n let headerPos = 0;\n this.curLinePos = 0;\n for (let i = 0, len = this.lastBytes.length + data.length; i < len; i++) {\n let chr;\n if (i < lblen) {\n chr = this.lastBytes[i];\n } else {\n chr = data[i - lblen];\n }\n if (chr === 0x0a && i) {\n let pr1 = i - 1 < lblen ? this.lastBytes[i - 1] : data[i - 1 - lblen];\n let pr2 = i > 1 ? (i - 2 < lblen ? this.lastBytes[i - 2] : data[i - 2 - lblen]) : false;\n if (pr1 === 0x0a) {\n this.headersParsed = true;\n headerPos = i - lblen + 1;\n this.headerBytes += headerPos;\n break;\n } else if (pr1 === 0x0d && pr2 === 0x0a) {\n this.headersParsed = true;\n headerPos = i - lblen + 1;\n this.headerBytes += headerPos;\n break;\n }\n }\n }\n\n if (this.headersParsed) {\n this.headerChunks.push(data.slice(0, headerPos));\n this.rawHeaders = Buffer.concat(this.headerChunks, this.headerBytes);\n this.headerChunks = null;\n this.emit('headers', this.parseHeaders());\n if (data.length - 1 > headerPos) {\n let chunk = data.slice(headerPos);\n this.bodySize += chunk.length;\n // this would be the first chunk of data sent downstream\n setImmediate(() => this.push(chunk));\n }\n return false;\n } else {\n this.headerBytes += data.length;\n this.headerChunks.push(data);\n }\n\n // store last 4 bytes to catch header break\n this.updateLastBytes(data);\n\n return false;\n }\n\n _transform(chunk, encoding, callback) {\n if (!chunk || !chunk.length) {\n return callback();\n }\n\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n let headersFound;\n\n try {\n headersFound = this.checkHeaders(chunk);\n } catch (E) {\n return callback(E);\n }\n\n if (headersFound) {\n this.bodySize += chunk.length;\n this.push(chunk);\n }\n\n setImmediate(callback);\n }\n\n _flush(callback) {\n if (this.headerChunks) {\n let chunk = Buffer.concat(this.headerChunks, this.headerBytes);\n this.bodySize += chunk.length;\n this.push(chunk);\n this.headerChunks = null;\n }\n callback();\n }\n\n parseHeaders() {\n let lines = (this.rawHeaders || '').toString().split(/\\r?\\n/);\n for (let i = lines.length - 1; i > 0; i--) {\n if (/^\\s/.test(lines[i])) {\n lines[i - 1] += '\\n' + lines[i];\n lines.splice(i, 1);\n }\n }\n return lines\n .filter(line => line.trim())\n .map(line => ({\n key: line.substr(0, line.indexOf(':')).trim().toLowerCase(),\n line\n }));\n }\n}\n\nmodule.exports = MessageParser;\n","'use strict';\n\n// streams through a message body and calculates relaxed body hash\n\nconst Transform = require('stream').Transform;\nconst crypto = require('crypto');\n\nclass RelaxedBody extends Transform {\n constructor(options) {\n super();\n options = options || {};\n this.chunkBuffer = [];\n this.chunkBufferLen = 0;\n this.bodyHash = crypto.createHash(options.hashAlgo || 'sha1');\n this.remainder = '';\n this.byteLength = 0;\n\n this.debug = options.debug;\n this._debugBody = options.debug ? [] : false;\n }\n\n updateHash(chunk) {\n let bodyStr;\n\n // find next remainder\n let nextRemainder = '';\n\n // This crux finds and removes the spaces from the last line and the newline characters after the last non-empty line\n // If we get another chunk that does not match this description then we can restore the previously processed data\n let state = 'file';\n for (let i = chunk.length - 1; i >= 0; i--) {\n let c = chunk[i];\n\n if (state === 'file' && (c === 0x0a || c === 0x0d)) {\n // do nothing, found \\n or \\r at the end of chunk, stil end of file\n } else if (state === 'file' && (c === 0x09 || c === 0x20)) {\n // switch to line ending mode, this is the last non-empty line\n state = 'line';\n } else if (state === 'line' && (c === 0x09 || c === 0x20)) {\n // do nothing, found ' ' or \\t at the end of line, keep processing the last non-empty line\n } else if (state === 'file' || state === 'line') {\n // non line/file ending character found, switch to body mode\n state = 'body';\n if (i === chunk.length - 1) {\n // final char is not part of line end or file end, so do nothing\n break;\n }\n }\n\n if (i === 0) {\n // reached to the beginning of the chunk, check if it is still about the ending\n // and if the remainder also matches\n if (\n (state === 'file' && (!this.remainder || /[\\r\\n]$/.test(this.remainder))) ||\n (state === 'line' && (!this.remainder || /[ \\t]$/.test(this.remainder)))\n ) {\n // keep everything\n this.remainder += chunk.toString('binary');\n return;\n } else if (state === 'line' || state === 'file') {\n // process existing remainder as normal line but store the current chunk\n nextRemainder = chunk.toString('binary');\n chunk = false;\n break;\n }\n }\n\n if (state !== 'body') {\n continue;\n }\n\n // reached first non ending byte\n nextRemainder = chunk.slice(i + 1).toString('binary');\n chunk = chunk.slice(0, i + 1);\n break;\n }\n\n let needsFixing = !!this.remainder;\n if (chunk && !needsFixing) {\n // check if we even need to change anything\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (i && chunk[i] === 0x0a && chunk[i - 1] !== 0x0d) {\n // missing \\r before \\n\n needsFixing = true;\n break;\n } else if (i && chunk[i] === 0x0d && chunk[i - 1] === 0x20) {\n // trailing WSP found\n needsFixing = true;\n break;\n } else if (i && chunk[i] === 0x20 && chunk[i - 1] === 0x20) {\n // multiple spaces found, needs to be replaced with just one\n needsFixing = true;\n break;\n } else if (chunk[i] === 0x09) {\n // TAB found, needs to be replaced with a space\n needsFixing = true;\n break;\n }\n }\n }\n\n if (needsFixing) {\n bodyStr = this.remainder + (chunk ? chunk.toString('binary') : '');\n this.remainder = nextRemainder;\n bodyStr = bodyStr\n .replace(/\\r?\\n/g, '\\n') // use js line endings\n .replace(/[ \\t]*$/gm, '') // remove line endings, rtrim\n .replace(/[ \\t]+/gm, ' ') // single spaces\n .replace(/\\n/g, '\\r\\n'); // restore rfc822 line endings\n chunk = Buffer.from(bodyStr, 'binary');\n } else if (nextRemainder) {\n this.remainder = nextRemainder;\n }\n\n if (this.debug) {\n this._debugBody.push(chunk);\n }\n this.bodyHash.update(chunk);\n }\n\n _transform(chunk, encoding, callback) {\n if (!chunk || !chunk.length) {\n return callback();\n }\n\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n this.updateHash(chunk);\n\n this.byteLength += chunk.length;\n this.push(chunk);\n callback();\n }\n\n _flush(callback) {\n // generate final hash and emit it\n if (/[\\r\\n]$/.test(this.remainder) && this.byteLength > 2) {\n // add terminating line end\n this.bodyHash.update(Buffer.from('\\r\\n'));\n }\n if (!this.byteLength) {\n // emit empty line buffer to keep the stream flowing\n this.push(Buffer.from('\\r\\n'));\n // this.bodyHash.update(Buffer.from('\\r\\n'));\n }\n\n this.emit('hash', this.bodyHash.digest('base64'), this.debug ? Buffer.concat(this._debugBody) : false);\n callback();\n }\n}\n\nmodule.exports = RelaxedBody;\n","'use strict';\n\nconst punycode = require('../punycode');\nconst mimeFuncs = require('../mime-funcs');\nconst crypto = require('crypto');\n\n/**\n * Returns DKIM signature header line\n *\n * @param {Object} headers Parsed headers object from MessageParser\n * @param {String} bodyHash Base64 encoded hash of the message\n * @param {Object} options DKIM options\n * @param {String} options.domainName Domain name to be signed for\n * @param {String} options.keySelector DKIM key selector to use\n * @param {String} options.privateKey DKIM private key to use\n * @return {String} Complete header line\n */\n\nmodule.exports = (headers, hashAlgo, bodyHash, options) => {\n options = options || {};\n\n // all listed fields from RFC4871 #5.5\n let defaultFieldNames =\n 'From:Sender:Reply-To:Subject:Date:Message-ID:To:' +\n 'Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:' +\n 'Content-Description:Resent-Date:Resent-From:Resent-Sender:' +\n 'Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:' +\n 'List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:' +\n 'List-Owner:List-Archive';\n\n let fieldNames = options.headerFieldNames || defaultFieldNames;\n\n let canonicalizedHeaderData = relaxedHeaders(headers, fieldNames, options.skipFields);\n let dkimHeader = generateDKIMHeader(options.domainName, options.keySelector, canonicalizedHeaderData.fieldNames, hashAlgo, bodyHash);\n\n let signer, signature;\n\n canonicalizedHeaderData.headers += 'dkim-signature:' + relaxedHeaderLine(dkimHeader);\n\n signer = crypto.createSign(('rsa-' + hashAlgo).toUpperCase());\n signer.update(canonicalizedHeaderData.headers);\n try {\n signature = signer.sign(options.privateKey, 'base64');\n } catch (E) {\n return false;\n }\n\n return dkimHeader + signature.replace(/(^.{73}|.{75}(?!\\r?\\n|\\r))/g, '$&\\r\\n ').trim();\n};\n\nmodule.exports.relaxedHeaders = relaxedHeaders;\n\nfunction generateDKIMHeader(domainName, keySelector, fieldNames, hashAlgo, bodyHash) {\n let dkim = [\n 'v=1',\n 'a=rsa-' + hashAlgo,\n 'c=relaxed/relaxed',\n 'd=' + punycode.toASCII(domainName),\n 'q=dns/txt',\n 's=' + keySelector,\n 'bh=' + bodyHash,\n 'h=' + fieldNames\n ].join('; ');\n\n return mimeFuncs.foldLines('DKIM-Signature: ' + dkim, 76) + ';\\r\\n b=';\n}\n\nfunction relaxedHeaders(headers, fieldNames, skipFields) {\n let includedFields = new Set();\n let skip = new Set();\n let headerFields = new Map();\n\n (skipFields || '')\n .toLowerCase()\n .split(':')\n .forEach(field => {\n skip.add(field.trim());\n });\n\n (fieldNames || '')\n .toLowerCase()\n .split(':')\n .filter(field => !skip.has(field.trim()))\n .forEach(field => {\n includedFields.add(field.trim());\n });\n\n for (let i = headers.length - 1; i >= 0; i--) {\n let line = headers[i];\n // only include the first value from bottom to top\n if (includedFields.has(line.key) && !headerFields.has(line.key)) {\n headerFields.set(line.key, relaxedHeaderLine(line.line));\n }\n }\n\n let headersList = [];\n let fields = [];\n includedFields.forEach(field => {\n if (headerFields.has(field)) {\n fields.push(field);\n headersList.push(field + ':' + headerFields.get(field));\n }\n });\n\n return {\n headers: headersList.join('\\r\\n') + '\\r\\n',\n fieldNames: fields.join(':')\n };\n}\n\nfunction relaxedHeaderLine(line) {\n return line\n .substr(line.indexOf(':') + 1)\n .replace(/\\r?\\n/g, '')\n .replace(/\\s+/g, ' ')\n .trim();\n}\n","'use strict';\n\n// module to handle cookies\n\nconst urllib = require('url');\n\nconst SESSION_TIMEOUT = 1800; // 30 min\n\n/**\n * Creates a biskviit cookie jar for managing cookie values in memory\n *\n * @constructor\n * @param {Object} [options] Optional options object\n */\nclass Cookies {\n constructor(options) {\n this.options = options || {};\n this.cookies = [];\n }\n\n /**\n * Stores a cookie string to the cookie storage\n *\n * @param {String} cookieStr Value from the 'Set-Cookie:' header\n * @param {String} url Current URL\n */\n set(cookieStr, url) {\n let urlparts = urllib.parse(url || '');\n let cookie = this.parse(cookieStr);\n let domain;\n\n if (cookie.domain) {\n domain = cookie.domain.replace(/^\\./, '');\n\n // do not allow cross origin cookies\n if (\n // can't be valid if the requested domain is shorter than current hostname\n urlparts.hostname.length < domain.length ||\n // prefix domains with dot to be sure that partial matches are not used\n ('.' + urlparts.hostname).substr(-domain.length + 1) !== '.' + domain\n ) {\n cookie.domain = urlparts.hostname;\n }\n } else {\n cookie.domain = urlparts.hostname;\n }\n\n if (!cookie.path) {\n cookie.path = this.getPath(urlparts.pathname);\n }\n\n // if no expire date, then use sessionTimeout value\n if (!cookie.expires) {\n cookie.expires = new Date(Date.now() + (Number(this.options.sessionTimeout || SESSION_TIMEOUT) || SESSION_TIMEOUT) * 1000);\n }\n\n return this.add(cookie);\n }\n\n /**\n * Returns cookie string for the 'Cookie:' header.\n *\n * @param {String} url URL to check for\n * @returns {String} Cookie header or empty string if no matches were found\n */\n get(url) {\n return this.list(url)\n .map(cookie => cookie.name + '=' + cookie.value)\n .join('; ');\n }\n\n /**\n * Lists all valied cookie objects for the specified URL\n *\n * @param {String} url URL to check for\n * @returns {Array} An array of cookie objects\n */\n list(url) {\n let result = [];\n let i;\n let cookie;\n\n for (i = this.cookies.length - 1; i >= 0; i--) {\n cookie = this.cookies[i];\n\n if (this.isExpired(cookie)) {\n this.cookies.splice(i, i);\n continue;\n }\n\n if (this.match(cookie, url)) {\n result.unshift(cookie);\n }\n }\n\n return result;\n }\n\n /**\n * Parses cookie string from the 'Set-Cookie:' header\n *\n * @param {String} cookieStr String from the 'Set-Cookie:' header\n * @returns {Object} Cookie object\n */\n parse(cookieStr) {\n let cookie = {};\n\n (cookieStr || '')\n .toString()\n .split(';')\n .forEach(cookiePart => {\n let valueParts = cookiePart.split('=');\n let key = valueParts.shift().trim().toLowerCase();\n let value = valueParts.join('=').trim();\n let domain;\n\n if (!key) {\n // skip empty parts\n return;\n }\n\n switch (key) {\n case 'expires':\n value = new Date(value);\n // ignore date if can not parse it\n if (value.toString() !== 'Invalid Date') {\n cookie.expires = value;\n }\n break;\n\n case 'path':\n cookie.path = value;\n break;\n\n case 'domain':\n domain = value.toLowerCase();\n if (domain.length && domain.charAt(0) !== '.') {\n domain = '.' + domain; // ensure preceeding dot for user set domains\n }\n cookie.domain = domain;\n break;\n\n case 'max-age':\n cookie.expires = new Date(Date.now() + (Number(value) || 0) * 1000);\n break;\n\n case 'secure':\n cookie.secure = true;\n break;\n\n case 'httponly':\n cookie.httponly = true;\n break;\n\n default:\n if (!cookie.name) {\n cookie.name = key;\n cookie.value = value;\n }\n }\n });\n\n return cookie;\n }\n\n /**\n * Checks if a cookie object is valid for a specified URL\n *\n * @param {Object} cookie Cookie object\n * @param {String} url URL to check for\n * @returns {Boolean} true if cookie is valid for specifiec URL\n */\n match(cookie, url) {\n let urlparts = urllib.parse(url || '');\n\n // check if hostname matches\n // .foo.com also matches subdomains, foo.com does not\n if (\n urlparts.hostname !== cookie.domain &&\n (cookie.domain.charAt(0) !== '.' || ('.' + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)\n ) {\n return false;\n }\n\n // check if path matches\n let path = this.getPath(urlparts.pathname);\n if (path.substr(0, cookie.path.length) !== cookie.path) {\n return false;\n }\n\n // check secure argument\n if (cookie.secure && urlparts.protocol !== 'https:') {\n return false;\n }\n\n return true;\n }\n\n /**\n * Adds (or updates/removes if needed) a cookie object to the cookie storage\n *\n * @param {Object} cookie Cookie value to be stored\n */\n add(cookie) {\n let i;\n let len;\n\n // nothing to do here\n if (!cookie || !cookie.name) {\n return false;\n }\n\n // overwrite if has same params\n for (i = 0, len = this.cookies.length; i < len; i++) {\n if (this.compare(this.cookies[i], cookie)) {\n // check if the cookie needs to be removed instead\n if (this.isExpired(cookie)) {\n this.cookies.splice(i, 1); // remove expired/unset cookie\n return false;\n }\n\n this.cookies[i] = cookie;\n return true;\n }\n }\n\n // add as new if not already expired\n if (!this.isExpired(cookie)) {\n this.cookies.push(cookie);\n }\n\n return true;\n }\n\n /**\n * Checks if two cookie objects are the same\n *\n * @param {Object} a Cookie to check against\n * @param {Object} b Cookie to check against\n * @returns {Boolean} True, if the cookies are the same\n */\n compare(a, b) {\n return a.name === b.name && a.path === b.path && a.domain === b.domain && a.secure === b.secure && a.httponly === a.httponly;\n }\n\n /**\n * Checks if a cookie is expired\n *\n * @param {Object} cookie Cookie object to check against\n * @returns {Boolean} True, if the cookie is expired\n */\n isExpired(cookie) {\n return (cookie.expires && cookie.expires < new Date()) || !cookie.value;\n }\n\n /**\n * Returns normalized cookie path for an URL path argument\n *\n * @param {String} pathname\n * @returns {String} Normalized path\n */\n getPath(pathname) {\n let path = (pathname || '/').split('/');\n path.pop(); // remove filename part\n path = path.join('/').trim();\n\n // ensure path prefix /\n if (path.charAt(0) !== '/') {\n path = '/' + path;\n }\n\n // ensure path suffix /\n if (path.substr(-1) !== '/') {\n path += '/';\n }\n\n return path;\n }\n}\n\nmodule.exports = Cookies;\n","'use strict';\n\nconst http = require('http');\nconst https = require('https');\nconst urllib = require('url');\nconst zlib = require('zlib');\nconst PassThrough = require('stream').PassThrough;\nconst Cookies = require('./cookies');\nconst packageData = require('../../package.json');\nconst net = require('net');\n\nconst MAX_REDIRECTS = 5;\n\nmodule.exports = function (url, options) {\n return nmfetch(url, options);\n};\n\nmodule.exports.Cookies = Cookies;\n\nfunction nmfetch(url, options) {\n options = options || {};\n\n options.fetchRes = options.fetchRes || new PassThrough();\n options.cookies = options.cookies || new Cookies();\n options.redirects = options.redirects || 0;\n options.maxRedirects = isNaN(options.maxRedirects) ? MAX_REDIRECTS : options.maxRedirects;\n\n if (options.cookie) {\n [].concat(options.cookie || []).forEach(cookie => {\n options.cookies.set(cookie, url);\n });\n options.cookie = false;\n }\n\n let fetchRes = options.fetchRes;\n let parsed = urllib.parse(url);\n let method = (options.method || '').toString().trim().toUpperCase() || 'GET';\n let finished = false;\n let cookies;\n let body;\n\n let handler = parsed.protocol === 'https:' ? https : http;\n\n let headers = {\n 'accept-encoding': 'gzip,deflate',\n 'user-agent': 'nodemailer/' + packageData.version\n };\n\n Object.keys(options.headers || {}).forEach(key => {\n headers[key.toLowerCase().trim()] = options.headers[key];\n });\n\n if (options.userAgent) {\n headers['user-agent'] = options.userAgent;\n }\n\n if (parsed.auth) {\n headers.Authorization = 'Basic ' + Buffer.from(parsed.auth).toString('base64');\n }\n\n if ((cookies = options.cookies.get(url))) {\n headers.cookie = cookies;\n }\n\n if (options.body) {\n if (options.contentType !== false) {\n headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';\n }\n\n if (typeof options.body.pipe === 'function') {\n // it's a stream\n headers['Transfer-Encoding'] = 'chunked';\n body = options.body;\n body.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n } else {\n if (options.body instanceof Buffer) {\n body = options.body;\n } else if (typeof options.body === 'object') {\n try {\n // encodeURIComponent can fail on invalid input (partial emoji etc.)\n body = Buffer.from(\n Object.keys(options.body)\n .map(key => {\n let value = options.body[key].toString().trim();\n return encodeURIComponent(key) + '=' + encodeURIComponent(value);\n })\n .join('&')\n );\n } catch (E) {\n if (finished) {\n return;\n }\n finished = true;\n E.type = 'FETCH';\n E.sourceUrl = url;\n fetchRes.emit('error', E);\n return;\n }\n } else {\n body = Buffer.from(options.body.toString().trim());\n }\n\n headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';\n headers['Content-Length'] = body.length;\n }\n // if method is not provided, use POST instead of GET\n method = (options.method || '').toString().trim().toUpperCase() || 'POST';\n }\n\n let req;\n let reqOptions = {\n method,\n host: parsed.hostname,\n path: parsed.path,\n port: parsed.port ? parsed.port : parsed.protocol === 'https:' ? 443 : 80,\n headers,\n rejectUnauthorized: false,\n agent: false\n };\n\n if (options.tls) {\n Object.keys(options.tls).forEach(key => {\n reqOptions[key] = options.tls[key];\n });\n }\n\n if (parsed.protocol === 'https:' && parsed.hostname && parsed.hostname !== reqOptions.host && !net.isIP(parsed.hostname) && !reqOptions.servername) {\n reqOptions.servername = parsed.hostname;\n }\n\n try {\n req = handler.request(reqOptions);\n } catch (E) {\n finished = true;\n setImmediate(() => {\n E.type = 'FETCH';\n E.sourceUrl = url;\n fetchRes.emit('error', E);\n });\n return fetchRes;\n }\n\n if (options.timeout) {\n req.setTimeout(options.timeout, () => {\n if (finished) {\n return;\n }\n finished = true;\n req.abort();\n let err = new Error('Request Timeout');\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n }\n\n req.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n\n req.on('response', res => {\n let inflate;\n\n if (finished) {\n return;\n }\n\n switch (res.headers['content-encoding']) {\n case 'gzip':\n case 'deflate':\n inflate = zlib.createUnzip();\n break;\n }\n\n if (res.headers['set-cookie']) {\n [].concat(res.headers['set-cookie'] || []).forEach(cookie => {\n options.cookies.set(cookie, url);\n });\n }\n\n if ([301, 302, 303, 307, 308].includes(res.statusCode) && res.headers.location) {\n // redirect\n options.redirects++;\n if (options.redirects > options.maxRedirects) {\n finished = true;\n let err = new Error('Maximum redirect count exceeded');\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n return;\n }\n // redirect does not include POST body\n options.method = 'GET';\n options.body = false;\n return nmfetch(urllib.resolve(url, res.headers.location), options);\n }\n\n fetchRes.statusCode = res.statusCode;\n fetchRes.headers = res.headers;\n\n if (res.statusCode >= 300 && !options.allowErrorResponse) {\n finished = true;\n let err = new Error('Invalid status code ' + res.statusCode);\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n return;\n }\n\n res.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n });\n\n if (inflate) {\n res.pipe(inflate).pipe(fetchRes);\n inflate.on('error', err => {\n if (finished) {\n return;\n }\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n req.abort();\n });\n } else {\n res.pipe(fetchRes);\n }\n });\n\n setImmediate(() => {\n if (body) {\n try {\n if (typeof body.pipe === 'function') {\n return body.pipe(req);\n } else {\n req.write(body);\n }\n } catch (err) {\n finished = true;\n err.type = 'FETCH';\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n return;\n }\n }\n req.end();\n });\n\n return fetchRes;\n}\n","'use strict';\n\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\n\n/**\n * Generates a Transport object to generate JSON output\n *\n * @constructor\n * @param {Object} optional config parameter\n */\nclass JSONTransport {\n constructor(options) {\n options = options || {};\n\n this.options = options || {};\n\n this.name = 'JSONTransport';\n this.version = packageData.version;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'json-transport'\n });\n }\n\n /**\n *

Compiles a mailcomposer message and forwards it to handler that sends it.

\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, done) {\n // Sendmail strips this header line by itself\n mail.message.keepBcc = true;\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Composing JSON structure of %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n setImmediate(() => {\n mail.normalize((err, data) => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed building JSON structure for %s. %s',\n messageId,\n err.message\n );\n return done(err);\n }\n\n delete data.envelope;\n delete data.normalizedHeaders;\n\n return done(null, {\n envelope,\n messageId,\n message: this.options.skipEncoding ? data : JSON.stringify(data)\n });\n });\n });\n }\n}\n\nmodule.exports = JSONTransport;\n","/* eslint no-undefined: 0 */\n\n'use strict';\n\nconst MimeNode = require('../mime-node');\nconst mimeFuncs = require('../mime-funcs');\nconst parseDataURI = require('../shared').parseDataURI;\n\n/**\n * Creates the object for composing a MimeNode instance out from the mail options\n *\n * @constructor\n * @param {Object} mail Mail options\n */\nclass MailComposer {\n constructor(mail) {\n this.mail = mail || {};\n this.message = false;\n }\n\n /**\n * Builds MimeNode instance\n */\n compile() {\n this._alternatives = this.getAlternatives();\n this._htmlNode = this._alternatives.filter(alternative => /^text\\/html\\b/i.test(alternative.contentType)).pop();\n this._attachments = this.getAttachments(!!this._htmlNode);\n\n this._useRelated = !!(this._htmlNode && this._attachments.related.length);\n this._useAlternative = this._alternatives.length > 1;\n this._useMixed = this._attachments.attached.length > 1 || (this._alternatives.length && this._attachments.attached.length === 1);\n\n // Compose MIME tree\n if (this.mail.raw) {\n this.message = new MimeNode('message/rfc822', { newline: this.mail.newline }).setRaw(this.mail.raw);\n } else if (this._useMixed) {\n this.message = this._createMixed();\n } else if (this._useAlternative) {\n this.message = this._createAlternative();\n } else if (this._useRelated) {\n this.message = this._createRelated();\n } else {\n this.message = this._createContentNode(\n false,\n []\n .concat(this._alternatives || [])\n .concat(this._attachments.attached || [])\n .shift() || {\n contentType: 'text/plain',\n content: ''\n }\n );\n }\n\n // Add custom headers\n if (this.mail.headers) {\n this.message.addHeader(this.mail.headers);\n }\n\n // Add headers to the root node, always overrides custom headers\n ['from', 'sender', 'to', 'cc', 'bcc', 'reply-to', 'in-reply-to', 'references', 'subject', 'message-id', 'date'].forEach(header => {\n let key = header.replace(/-(\\w)/g, (o, c) => c.toUpperCase());\n if (this.mail[key]) {\n this.message.setHeader(header, this.mail[key]);\n }\n });\n\n // Sets custom envelope\n if (this.mail.envelope) {\n this.message.setEnvelope(this.mail.envelope);\n }\n\n // ensure Message-Id value\n this.message.messageId();\n\n return this.message;\n }\n\n /**\n * List all attachments. Resulting attachment objects can be used as input for MimeNode nodes\n *\n * @param {Boolean} findRelated If true separate related attachments from attached ones\n * @returns {Object} An object of arrays (`related` and `attached`)\n */\n getAttachments(findRelated) {\n let icalEvent, eventObject;\n let attachments = [].concat(this.mail.attachments || []).map((attachment, i) => {\n let data;\n let isMessageNode = /^message\\//i.test(attachment.contentType);\n\n if (/^data:/i.test(attachment.path || attachment.href)) {\n attachment = this._processDataUrl(attachment);\n }\n\n let contentType = attachment.contentType || mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');\n let isImage = /^image\\//i.test(contentType);\n let contentDisposition = attachment.contentDisposition || (isMessageNode || (isImage && attachment.cid) ? 'inline' : 'attachment');\n\n data = {\n contentType,\n contentDisposition,\n contentTransferEncoding: 'contentTransferEncoding' in attachment ? attachment.contentTransferEncoding : 'base64'\n };\n\n if (attachment.filename) {\n data.filename = attachment.filename;\n } else if (!isMessageNode && attachment.filename !== false) {\n data.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);\n if (data.filename.indexOf('.') < 0) {\n data.filename += '.' + mimeFuncs.detectExtension(data.contentType);\n }\n }\n\n if (/^https?:\\/\\//i.test(attachment.path)) {\n attachment.href = attachment.path;\n attachment.path = undefined;\n }\n\n if (attachment.cid) {\n data.cid = attachment.cid;\n }\n\n if (attachment.raw) {\n data.raw = attachment.raw;\n } else if (attachment.path) {\n data.content = {\n path: attachment.path\n };\n } else if (attachment.href) {\n data.content = {\n href: attachment.href,\n httpHeaders: attachment.httpHeaders\n };\n } else {\n data.content = attachment.content || '';\n }\n\n if (attachment.encoding) {\n data.encoding = attachment.encoding;\n }\n\n if (attachment.headers) {\n data.headers = attachment.headers;\n }\n\n return data;\n });\n\n if (this.mail.icalEvent) {\n if (\n typeof this.mail.icalEvent === 'object' &&\n (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)\n ) {\n icalEvent = this.mail.icalEvent;\n } else {\n icalEvent = {\n content: this.mail.icalEvent\n };\n }\n\n eventObject = {};\n Object.keys(icalEvent).forEach(key => {\n eventObject[key] = icalEvent[key];\n });\n\n eventObject.contentType = 'application/ics';\n if (!eventObject.headers) {\n eventObject.headers = {};\n }\n eventObject.filename = eventObject.filename || 'invite.ics';\n eventObject.headers['Content-Disposition'] = 'attachment';\n eventObject.headers['Content-Transfer-Encoding'] = 'base64';\n }\n\n if (!findRelated) {\n return {\n attached: attachments.concat(eventObject || []),\n related: []\n };\n } else {\n return {\n attached: attachments.filter(attachment => !attachment.cid).concat(eventObject || []),\n related: attachments.filter(attachment => !!attachment.cid)\n };\n }\n }\n\n /**\n * List alternatives. Resulting objects can be used as input for MimeNode nodes\n *\n * @returns {Array} An array of alternative elements. Includes the `text` and `html` values as well\n */\n getAlternatives() {\n let alternatives = [],\n text,\n html,\n watchHtml,\n amp,\n icalEvent,\n eventObject;\n\n if (this.mail.text) {\n if (typeof this.mail.text === 'object' && (this.mail.text.content || this.mail.text.path || this.mail.text.href || this.mail.text.raw)) {\n text = this.mail.text;\n } else {\n text = {\n content: this.mail.text\n };\n }\n text.contentType = 'text/plain; charset=utf-8';\n }\n\n if (this.mail.watchHtml) {\n if (\n typeof this.mail.watchHtml === 'object' &&\n (this.mail.watchHtml.content || this.mail.watchHtml.path || this.mail.watchHtml.href || this.mail.watchHtml.raw)\n ) {\n watchHtml = this.mail.watchHtml;\n } else {\n watchHtml = {\n content: this.mail.watchHtml\n };\n }\n watchHtml.contentType = 'text/watch-html; charset=utf-8';\n }\n\n if (this.mail.amp) {\n if (typeof this.mail.amp === 'object' && (this.mail.amp.content || this.mail.amp.path || this.mail.amp.href || this.mail.amp.raw)) {\n amp = this.mail.amp;\n } else {\n amp = {\n content: this.mail.amp\n };\n }\n amp.contentType = 'text/x-amp-html; charset=utf-8';\n }\n\n // NB! when including attachments with a calendar alternative you might end up in a blank screen on some clients\n if (this.mail.icalEvent) {\n if (\n typeof this.mail.icalEvent === 'object' &&\n (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)\n ) {\n icalEvent = this.mail.icalEvent;\n } else {\n icalEvent = {\n content: this.mail.icalEvent\n };\n }\n\n eventObject = {};\n Object.keys(icalEvent).forEach(key => {\n eventObject[key] = icalEvent[key];\n });\n\n if (eventObject.content && typeof eventObject.content === 'object') {\n // we are going to have the same attachment twice, so mark this to be\n // resolved just once\n eventObject.content._resolve = true;\n }\n\n eventObject.filename = false;\n eventObject.contentType = 'text/calendar; charset=utf-8; method=' + (eventObject.method || 'PUBLISH').toString().trim().toUpperCase();\n if (!eventObject.headers) {\n eventObject.headers = {};\n }\n }\n\n if (this.mail.html) {\n if (typeof this.mail.html === 'object' && (this.mail.html.content || this.mail.html.path || this.mail.html.href || this.mail.html.raw)) {\n html = this.mail.html;\n } else {\n html = {\n content: this.mail.html\n };\n }\n html.contentType = 'text/html; charset=utf-8';\n }\n\n []\n .concat(text || [])\n .concat(watchHtml || [])\n .concat(amp || [])\n .concat(html || [])\n .concat(eventObject || [])\n .concat(this.mail.alternatives || [])\n .forEach(alternative => {\n let data;\n\n if (/^data:/i.test(alternative.path || alternative.href)) {\n alternative = this._processDataUrl(alternative);\n }\n\n data = {\n contentType: alternative.contentType || mimeFuncs.detectMimeType(alternative.filename || alternative.path || alternative.href || 'txt'),\n contentTransferEncoding: alternative.contentTransferEncoding\n };\n\n if (alternative.filename) {\n data.filename = alternative.filename;\n }\n\n if (/^https?:\\/\\//i.test(alternative.path)) {\n alternative.href = alternative.path;\n alternative.path = undefined;\n }\n\n if (alternative.raw) {\n data.raw = alternative.raw;\n } else if (alternative.path) {\n data.content = {\n path: alternative.path\n };\n } else if (alternative.href) {\n data.content = {\n href: alternative.href\n };\n } else {\n data.content = alternative.content || '';\n }\n\n if (alternative.encoding) {\n data.encoding = alternative.encoding;\n }\n\n if (alternative.headers) {\n data.headers = alternative.headers;\n }\n\n alternatives.push(data);\n });\n\n return alternatives;\n }\n\n /**\n * Builds multipart/mixed node. It should always contain different type of elements on the same level\n * eg. text + attachments\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @returns {Object} MimeNode node element\n */\n _createMixed(parentNode) {\n let node;\n\n if (!parentNode) {\n node = new MimeNode('multipart/mixed', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild('multipart/mixed', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n if (this._useAlternative) {\n this._createAlternative(node);\n } else if (this._useRelated) {\n this._createRelated(node);\n }\n\n []\n .concat((!this._useAlternative && this._alternatives) || [])\n .concat(this._attachments.attached || [])\n .forEach(element => {\n // if the element is a html node from related subpart then ignore it\n if (!this._useRelated || element !== this._htmlNode) {\n this._createContentNode(node, element);\n }\n });\n\n return node;\n }\n\n /**\n * Builds multipart/alternative node. It should always contain same type of elements on the same level\n * eg. text + html view of the same data\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @returns {Object} MimeNode node element\n */\n _createAlternative(parentNode) {\n let node;\n\n if (!parentNode) {\n node = new MimeNode('multipart/alternative', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild('multipart/alternative', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n this._alternatives.forEach(alternative => {\n if (this._useRelated && this._htmlNode === alternative) {\n this._createRelated(node);\n } else {\n this._createContentNode(node, alternative);\n }\n });\n\n return node;\n }\n\n /**\n * Builds multipart/related node. It should always contain html node with related attachments\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @returns {Object} MimeNode node element\n */\n _createRelated(parentNode) {\n let node;\n\n if (!parentNode) {\n node = new MimeNode('multipart/related; type=\"text/html\"', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild('multipart/related; type=\"text/html\"', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n this._createContentNode(node, this._htmlNode);\n\n this._attachments.related.forEach(alternative => this._createContentNode(node, alternative));\n\n return node;\n }\n\n /**\n * Creates a regular node with contents\n *\n * @param {Object} parentNode Parent for this note. If it does not exist, a root node is created\n * @param {Object} element Node data\n * @returns {Object} MimeNode node element\n */\n _createContentNode(parentNode, element) {\n element = element || {};\n element.content = element.content || '';\n\n let node;\n let encoding = (element.encoding || 'utf8')\n .toString()\n .toLowerCase()\n .replace(/[-_\\s]/g, '');\n\n if (!parentNode) {\n node = new MimeNode(element.contentType, {\n filename: element.filename,\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n } else {\n node = parentNode.createChild(element.contentType, {\n filename: element.filename,\n textEncoding: this.mail.textEncoding,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n }\n\n // add custom headers\n if (element.headers) {\n node.addHeader(element.headers);\n }\n\n if (element.cid) {\n node.setHeader('Content-Id', '<' + element.cid.replace(/[<>]/g, '') + '>');\n }\n\n if (element.contentTransferEncoding) {\n node.setHeader('Content-Transfer-Encoding', element.contentTransferEncoding);\n } else if (this.mail.encoding && /^text\\//i.test(element.contentType)) {\n node.setHeader('Content-Transfer-Encoding', this.mail.encoding);\n }\n\n if (!/^text\\//i.test(element.contentType) || element.contentDisposition) {\n node.setHeader(\n 'Content-Disposition',\n element.contentDisposition || (element.cid && /^image\\//i.test(element.contentType) ? 'inline' : 'attachment')\n );\n }\n\n if (typeof element.content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {\n element.content = Buffer.from(element.content, encoding);\n }\n\n // prefer pregenerated raw content\n if (element.raw) {\n node.setRaw(element.raw);\n } else {\n node.setContent(element.content);\n }\n\n return node;\n }\n\n /**\n * Parses data uri and converts it to a Buffer\n *\n * @param {Object} element Content element\n * @return {Object} Parsed element\n */\n _processDataUrl(element) {\n let parsedDataUri;\n if ((element.path || element.href).match(/^data:/)) {\n parsedDataUri = parseDataURI(element.path || element.href);\n }\n\n if (!parsedDataUri) {\n return element;\n }\n\n element.content = parsedDataUri.data;\n element.contentType = element.contentType || parsedDataUri.contentType;\n\n if ('path' in element) {\n element.path = false;\n }\n\n if ('href' in element) {\n element.href = false;\n }\n\n return element;\n }\n}\n\nmodule.exports = MailComposer;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst shared = require('../shared');\nconst mimeTypes = require('../mime-funcs/mime-types');\nconst MailComposer = require('../mail-composer');\nconst DKIM = require('../dkim');\nconst httpProxyClient = require('../smtp-connection/http-proxy-client');\nconst util = require('util');\nconst urllib = require('url');\nconst packageData = require('../../package.json');\nconst MailMessage = require('./mail-message');\nconst net = require('net');\nconst dns = require('dns');\nconst crypto = require('crypto');\n\n/**\n * Creates an object for exposing the Mail API\n *\n * @constructor\n * @param {Object} transporter Transport object instance to pass the mails to\n */\nclass Mail extends EventEmitter {\n constructor(transporter, options, defaults) {\n super();\n\n this.options = options || {};\n this._defaults = defaults || {};\n\n this._defaultPlugins = {\n compile: [(...args) => this._convertDataImages(...args)],\n stream: []\n };\n\n this._userPlugins = {\n compile: [],\n stream: []\n };\n\n this.meta = new Map();\n\n this.dkim = this.options.dkim ? new DKIM(this.options.dkim) : false;\n\n this.transporter = transporter;\n this.transporter.mailer = this;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'mail'\n });\n\n this.logger.debug(\n {\n tnx: 'create'\n },\n 'Creating transport: %s',\n this.getVersionString()\n );\n\n // setup emit handlers for the transporter\n if (typeof this.transporter.on === 'function') {\n // deprecated log interface\n this.transporter.on('log', log => {\n this.logger.debug(\n {\n tnx: 'transport'\n },\n '%s: %s',\n log.type,\n log.message\n );\n });\n\n // transporter errors\n this.transporter.on('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'transport'\n },\n 'Transport Error: %s',\n err.message\n );\n this.emit('error', err);\n });\n\n // indicates if the sender has became idle\n this.transporter.on('idle', (...args) => {\n this.emit('idle', ...args);\n });\n }\n\n /**\n * Optional methods passed to the underlying transport object\n */\n ['close', 'isIdle', 'verify'].forEach(method => {\n this[method] = (...args) => {\n if (typeof this.transporter[method] === 'function') {\n if (method === 'verify' && typeof this.getSocket === 'function') {\n this.transporter.getSocket = this.getSocket;\n this.getSocket = false;\n }\n return this.transporter[method](...args);\n } else {\n this.logger.warn(\n {\n tnx: 'transport',\n methodName: method\n },\n 'Non existing method %s called for transport',\n method\n );\n return false;\n }\n };\n });\n\n // setup proxy handling\n if (this.options.proxy && typeof this.options.proxy === 'string') {\n this.setupProxy(this.options.proxy);\n }\n }\n\n use(step, plugin) {\n step = (step || '').toString();\n if (!this._userPlugins.hasOwnProperty(step)) {\n this._userPlugins[step] = [plugin];\n } else {\n this._userPlugins[step].push(plugin);\n }\n\n return this;\n }\n\n /**\n * Sends an email using the preselected transport object\n *\n * @param {Object} data E-data description\n * @param {Function?} callback Callback to run once the sending succeeded or failed\n */\n sendMail(data, callback = null) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n if (typeof this.getSocket === 'function') {\n this.transporter.getSocket = this.getSocket;\n this.getSocket = false;\n }\n\n let mail = new MailMessage(this, data);\n\n this.logger.debug(\n {\n tnx: 'transport',\n name: this.transporter.name,\n version: this.transporter.version,\n action: 'send'\n },\n 'Sending mail using %s/%s',\n this.transporter.name,\n this.transporter.version\n );\n\n this._processPlugins('compile', mail, err => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'plugin',\n action: 'compile'\n },\n 'PluginCompile Error: %s',\n err.message\n );\n return callback(err);\n }\n\n mail.message = new MailComposer(mail.data).compile();\n\n mail.setMailerHeader();\n mail.setPriorityHeaders();\n mail.setListHeaders();\n\n this._processPlugins('stream', mail, err => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'plugin',\n action: 'stream'\n },\n 'PluginStream Error: %s',\n err.message\n );\n return callback(err);\n }\n\n if (mail.data.dkim || this.dkim) {\n mail.message.processFunc(input => {\n let dkim = mail.data.dkim ? new DKIM(mail.data.dkim) : this.dkim;\n this.logger.debug(\n {\n tnx: 'DKIM',\n messageId: mail.message.messageId(),\n dkimDomains: dkim.keys.map(key => key.keySelector + '.' + key.domainName).join(', ')\n },\n 'Signing outgoing message with %s keys',\n dkim.keys.length\n );\n return dkim.sign(input, mail.data._dkim);\n });\n }\n\n this.transporter.send(mail, (...args) => {\n if (args[0]) {\n this.logger.error(\n {\n err: args[0],\n tnx: 'transport',\n action: 'send'\n },\n 'Send Error: %s',\n args[0].message\n );\n }\n callback(...args);\n });\n });\n });\n\n return promise;\n }\n\n getVersionString() {\n return util.format('%s (%s; +%s; %s/%s)', packageData.name, packageData.version, packageData.homepage, this.transporter.name, this.transporter.version);\n }\n\n _processPlugins(step, mail, callback) {\n step = (step || '').toString();\n\n if (!this._userPlugins.hasOwnProperty(step)) {\n return callback();\n }\n\n let userPlugins = this._userPlugins[step] || [];\n let defaultPlugins = this._defaultPlugins[step] || [];\n\n if (userPlugins.length) {\n this.logger.debug(\n {\n tnx: 'transaction',\n pluginCount: userPlugins.length,\n step\n },\n 'Using %s plugins for %s',\n userPlugins.length,\n step\n );\n }\n\n if (userPlugins.length + defaultPlugins.length === 0) {\n return callback();\n }\n\n let pos = 0;\n let block = 'default';\n let processPlugins = () => {\n let curplugins = block === 'default' ? defaultPlugins : userPlugins;\n if (pos >= curplugins.length) {\n if (block === 'default' && userPlugins.length) {\n block = 'user';\n pos = 0;\n curplugins = userPlugins;\n } else {\n return callback();\n }\n }\n let plugin = curplugins[pos++];\n plugin(mail, err => {\n if (err) {\n return callback(err);\n }\n processPlugins();\n });\n };\n\n processPlugins();\n }\n\n /**\n * Sets up proxy handler for a Nodemailer object\n *\n * @param {String} proxyUrl Proxy configuration url\n */\n setupProxy(proxyUrl) {\n let proxy = urllib.parse(proxyUrl);\n\n // setup socket handler for the mailer object\n this.getSocket = (options, callback) => {\n let protocol = proxy.protocol.replace(/:$/, '').toLowerCase();\n\n if (this.meta.has('proxy_handler_' + protocol)) {\n return this.meta.get('proxy_handler_' + protocol)(proxy, options, callback);\n }\n\n switch (protocol) {\n // Connect using a HTTP CONNECT method\n case 'http':\n case 'https':\n httpProxyClient(proxy.href, options.port, options.host, (err, socket) => {\n if (err) {\n return callback(err);\n }\n return callback(null, {\n connection: socket\n });\n });\n return;\n case 'socks':\n case 'socks5':\n case 'socks4':\n case 'socks4a': {\n if (!this.meta.has('proxy_socks_module')) {\n return callback(new Error('Socks module not loaded'));\n }\n let connect = ipaddress => {\n let proxyV2 = !!this.meta.get('proxy_socks_module').SocksClient;\n let socksClient = proxyV2 ? this.meta.get('proxy_socks_module').SocksClient : this.meta.get('proxy_socks_module');\n let proxyType = Number(proxy.protocol.replace(/\\D/g, '')) || 5;\n let connectionOpts = {\n proxy: {\n ipaddress,\n port: Number(proxy.port),\n type: proxyType\n },\n [proxyV2 ? 'destination' : 'target']: {\n host: options.host,\n port: options.port\n },\n command: 'connect'\n };\n\n if (proxy.auth) {\n let username = decodeURIComponent(proxy.auth.split(':').shift());\n let password = decodeURIComponent(proxy.auth.split(':').pop());\n if (proxyV2) {\n connectionOpts.proxy.userId = username;\n connectionOpts.proxy.password = password;\n } else if (proxyType === 4) {\n connectionOpts.userid = username;\n } else {\n connectionOpts.authentication = {\n username,\n password\n };\n }\n }\n\n socksClient.createConnection(connectionOpts, (err, info) => {\n if (err) {\n return callback(err);\n }\n return callback(null, {\n connection: info.socket || info\n });\n });\n };\n\n if (net.isIP(proxy.hostname)) {\n return connect(proxy.hostname);\n }\n\n return dns.resolve(proxy.hostname, (err, address) => {\n if (err) {\n return callback(err);\n }\n connect(Array.isArray(address) ? address[0] : address);\n });\n }\n }\n callback(new Error('Unknown proxy configuration'));\n };\n }\n\n _convertDataImages(mail, callback) {\n if ((!this.options.attachDataUrls && !mail.data.attachDataUrls) || !mail.data.html) {\n return callback();\n }\n mail.resolveContent(mail.data, 'html', (err, html) => {\n if (err) {\n return callback(err);\n }\n let cidCounter = 0;\n html = (html || '')\n .toString()\n .replace(/(]{0,1024} src\\s{0,20}=[\\s\"']{0,20})(data:([^;]+);[^\"'>\\s]+)/gi, (match, prefix, dataUri, mimeType) => {\n let cid = crypto.randomBytes(10).toString('hex') + '@localhost';\n if (!mail.data.attachments) {\n mail.data.attachments = [];\n }\n if (!Array.isArray(mail.data.attachments)) {\n mail.data.attachments = [].concat(mail.data.attachments || []);\n }\n mail.data.attachments.push({\n path: dataUri,\n cid,\n filename: 'image-' + ++cidCounter + '.' + mimeTypes.detectExtension(mimeType)\n });\n return prefix + 'cid:' + cid;\n });\n mail.data.html = html;\n callback();\n });\n }\n\n set(key, value) {\n return this.meta.set(key, value);\n }\n\n get(key) {\n return this.meta.get(key);\n }\n}\n\nmodule.exports = Mail;\n","'use strict';\n\nconst shared = require('../shared');\nconst MimeNode = require('../mime-node');\nconst mimeFuncs = require('../mime-funcs');\n\nclass MailMessage {\n constructor(mailer, data) {\n this.mailer = mailer;\n this.data = {};\n this.message = null;\n\n data = data || {};\n let options = mailer.options || {};\n let defaults = mailer._defaults || {};\n\n Object.keys(data).forEach(key => {\n this.data[key] = data[key];\n });\n\n this.data.headers = this.data.headers || {};\n\n // apply defaults\n Object.keys(defaults).forEach(key => {\n if (!(key in this.data)) {\n this.data[key] = defaults[key];\n } else if (key === 'headers') {\n // headers is a special case. Allow setting individual default headers\n Object.keys(defaults.headers).forEach(key => {\n if (!(key in this.data.headers)) {\n this.data.headers[key] = defaults.headers[key];\n }\n });\n }\n });\n\n // force specific keys from transporter options\n ['disableFileAccess', 'disableUrlAccess', 'normalizeHeaderKey'].forEach(key => {\n if (key in options) {\n this.data[key] = options[key];\n }\n });\n }\n\n resolveContent(...args) {\n return shared.resolveContent(...args);\n }\n\n resolveAll(callback) {\n let keys = [\n [this.data, 'html'],\n [this.data, 'text'],\n [this.data, 'watchHtml'],\n [this.data, 'amp'],\n [this.data, 'icalEvent']\n ];\n\n if (this.data.alternatives && this.data.alternatives.length) {\n this.data.alternatives.forEach((alternative, i) => {\n keys.push([this.data.alternatives, i]);\n });\n }\n\n if (this.data.attachments && this.data.attachments.length) {\n this.data.attachments.forEach((attachment, i) => {\n if (!attachment.filename) {\n attachment.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);\n if (attachment.filename.indexOf('.') < 0) {\n attachment.filename += '.' + mimeFuncs.detectExtension(attachment.contentType);\n }\n }\n\n if (!attachment.contentType) {\n attachment.contentType = mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');\n }\n\n keys.push([this.data.attachments, i]);\n });\n }\n\n let mimeNode = new MimeNode();\n\n let addressKeys = ['from', 'to', 'cc', 'bcc', 'sender', 'replyTo'];\n\n addressKeys.forEach(address => {\n let value;\n if (this.message) {\n value = [].concat(mimeNode._parseAddresses(this.message.getHeader(address === 'replyTo' ? 'reply-to' : address)) || []);\n } else if (this.data[address]) {\n value = [].concat(mimeNode._parseAddresses(this.data[address]) || []);\n }\n if (value && value.length) {\n this.data[address] = value;\n } else if (address in this.data) {\n this.data[address] = null;\n }\n });\n\n let singleKeys = ['from', 'sender'];\n singleKeys.forEach(address => {\n if (this.data[address]) {\n this.data[address] = this.data[address].shift();\n }\n });\n\n let pos = 0;\n let resolveNext = () => {\n if (pos >= keys.length) {\n return callback(null, this.data);\n }\n let args = keys[pos++];\n if (!args[0] || !args[0][args[1]]) {\n return resolveNext();\n }\n shared.resolveContent(...args, (err, value) => {\n if (err) {\n return callback(err);\n }\n\n let node = {\n content: value\n };\n if (args[0][args[1]] && typeof args[0][args[1]] === 'object' && !Buffer.isBuffer(args[0][args[1]])) {\n Object.keys(args[0][args[1]]).forEach(key => {\n if (!(key in node) && !['content', 'path', 'href', 'raw'].includes(key)) {\n node[key] = args[0][args[1]][key];\n }\n });\n }\n\n args[0][args[1]] = node;\n resolveNext();\n });\n };\n\n setImmediate(() => resolveNext());\n }\n\n normalize(callback) {\n let envelope = this.data.envelope || this.message.getEnvelope();\n let messageId = this.message.messageId();\n\n this.resolveAll((err, data) => {\n if (err) {\n return callback(err);\n }\n\n data.envelope = envelope;\n data.messageId = messageId;\n\n ['html', 'text', 'watchHtml', 'amp'].forEach(key => {\n if (data[key] && data[key].content) {\n if (typeof data[key].content === 'string') {\n data[key] = data[key].content;\n } else if (Buffer.isBuffer(data[key].content)) {\n data[key] = data[key].content.toString();\n }\n }\n });\n\n if (data.icalEvent && Buffer.isBuffer(data.icalEvent.content)) {\n data.icalEvent.content = data.icalEvent.content.toString('base64');\n data.icalEvent.encoding = 'base64';\n }\n\n if (data.alternatives && data.alternatives.length) {\n data.alternatives.forEach(alternative => {\n if (alternative && alternative.content && Buffer.isBuffer(alternative.content)) {\n alternative.content = alternative.content.toString('base64');\n alternative.encoding = 'base64';\n }\n });\n }\n\n if (data.attachments && data.attachments.length) {\n data.attachments.forEach(attachment => {\n if (attachment && attachment.content && Buffer.isBuffer(attachment.content)) {\n attachment.content = attachment.content.toString('base64');\n attachment.encoding = 'base64';\n }\n });\n }\n\n data.normalizedHeaders = {};\n Object.keys(data.headers || {}).forEach(key => {\n let value = [].concat(data.headers[key] || []).shift();\n value = (value && value.value) || value;\n if (value) {\n if (['references', 'in-reply-to', 'message-id', 'content-id'].includes(key)) {\n value = this.message._encodeHeaderValue(key, value);\n }\n data.normalizedHeaders[key] = value;\n }\n });\n\n if (data.list && typeof data.list === 'object') {\n let listHeaders = this._getListHeaders(data.list);\n listHeaders.forEach(entry => {\n data.normalizedHeaders[entry.key] = entry.value.map(val => (val && val.value) || val).join(', ');\n });\n }\n\n if (data.references) {\n data.normalizedHeaders.references = this.message._encodeHeaderValue('references', data.references);\n }\n\n if (data.inReplyTo) {\n data.normalizedHeaders['in-reply-to'] = this.message._encodeHeaderValue('in-reply-to', data.inReplyTo);\n }\n\n return callback(null, data);\n });\n }\n\n setMailerHeader() {\n if (!this.message || !this.data.xMailer) {\n return;\n }\n this.message.setHeader('X-Mailer', this.data.xMailer);\n }\n\n setPriorityHeaders() {\n if (!this.message || !this.data.priority) {\n return;\n }\n switch ((this.data.priority || '').toString().toLowerCase()) {\n case 'high':\n this.message.setHeader('X-Priority', '1 (Highest)');\n this.message.setHeader('X-MSMail-Priority', 'High');\n this.message.setHeader('Importance', 'High');\n break;\n case 'low':\n this.message.setHeader('X-Priority', '5 (Lowest)');\n this.message.setHeader('X-MSMail-Priority', 'Low');\n this.message.setHeader('Importance', 'Low');\n break;\n default:\n // do not add anything, since all messages are 'Normal' by default\n }\n }\n\n setListHeaders() {\n if (!this.message || !this.data.list || typeof this.data.list !== 'object') {\n return;\n }\n // add optional List-* headers\n if (this.data.list && typeof this.data.list === 'object') {\n this._getListHeaders(this.data.list).forEach(listHeader => {\n listHeader.value.forEach(value => {\n this.message.addHeader(listHeader.key, value);\n });\n });\n }\n }\n\n _getListHeaders(listData) {\n // make sure an url looks like \n return Object.keys(listData).map(key => ({\n key: 'list-' + key.toLowerCase().trim(),\n value: [].concat(listData[key] || []).map(value => ({\n prepared: true,\n foldLines: true,\n value: []\n .concat(value || [])\n .map(value => {\n if (typeof value === 'string') {\n value = {\n url: value\n };\n }\n\n if (value && value.url) {\n if (key.toLowerCase().trim() === 'id') {\n // List-ID: \"comment\" \n let comment = value.comment || '';\n if (mimeFuncs.isPlainText(comment)) {\n comment = '\"' + comment + '\"';\n } else {\n comment = mimeFuncs.encodeWord(comment);\n }\n\n return (value.comment ? comment + ' ' : '') + this._formatListUrl(value.url).replace(/^<[^:]+\\/{,2}/, '');\n }\n\n // List-*: (comment)\n let comment = value.comment || '';\n if (!mimeFuncs.isPlainText(comment)) {\n comment = mimeFuncs.encodeWord(comment);\n }\n\n return this._formatListUrl(value.url) + (value.comment ? ' (' + comment + ')' : '');\n }\n\n return '';\n })\n .filter(value => value)\n .join(', ')\n }))\n }));\n }\n\n _formatListUrl(url) {\n url = url.replace(/[\\s<]+|[\\s>]+/g, '');\n if (/^(https?|mailto|ftp):/.test(url)) {\n return '<' + url + '>';\n }\n if (/^[^@]+@[^@]+$/.test(url)) {\n return '';\n }\n\n return '';\n }\n}\n\nmodule.exports = MailMessage;\n","/* eslint no-control-regex:0 */\n\n'use strict';\n\nconst base64 = require('../base64');\nconst qp = require('../qp');\nconst mimeTypes = require('./mime-types');\n\nmodule.exports = {\n /**\n * Checks if a value is plaintext string (uses only printable 7bit chars)\n *\n * @param {String} value String to be tested\n * @returns {Boolean} true if it is a plaintext string\n */\n isPlainText(value, isParam) {\n const re = isParam ? /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\"\\u0080-\\uFFFF]/ : /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\u0080-\\uFFFF]/;\n if (typeof value !== 'string' || re.test(value)) {\n return false;\n } else {\n return true;\n }\n },\n\n /**\n * Checks if a multi line string containes lines longer than the selected value.\n *\n * Useful when detecting if a mail message needs any processing at all –\n * if only plaintext characters are used and lines are short, then there is\n * no need to encode the values in any way. If the value is plaintext but has\n * longer lines then allowed, then use format=flowed\n *\n * @param {Number} lineLength Max line length to check for\n * @returns {Boolean} Returns true if there is at least one line longer than lineLength chars\n */\n hasLongerLines(str, lineLength) {\n if (str.length > 128 * 1024) {\n // do not test strings longer than 128kB\n return true;\n }\n return new RegExp('^.{' + (lineLength + 1) + ',}', 'm').test(str);\n },\n\n /**\n * Encodes a string or an Buffer to an UTF-8 MIME Word (rfc2047)\n *\n * @param {String|Buffer} data String to be encoded\n * @param {String} mimeWordEncoding='Q' Encoding for the mime word, either Q or B\n * @param {Number} [maxLength=0] If set, split mime words into several chunks if needed\n * @return {String} Single or several mime words joined together\n */\n encodeWord(data, mimeWordEncoding, maxLength) {\n mimeWordEncoding = (mimeWordEncoding || 'Q').toString().toUpperCase().trim().charAt(0);\n maxLength = maxLength || 0;\n\n let encodedStr;\n let toCharset = 'UTF-8';\n\n if (maxLength && maxLength > 7 + toCharset.length) {\n maxLength -= 7 + toCharset.length;\n }\n\n if (mimeWordEncoding === 'Q') {\n // https://tools.ietf.org/html/rfc2047#section-5 rule (3)\n encodedStr = qp.encode(data).replace(/[^a-z0-9!*+\\-/=]/gi, chr => {\n let ord = chr.charCodeAt(0).toString(16).toUpperCase();\n if (chr === ' ') {\n return '_';\n } else {\n return '=' + (ord.length === 1 ? '0' + ord : ord);\n }\n });\n } else if (mimeWordEncoding === 'B') {\n encodedStr = typeof data === 'string' ? data : base64.encode(data);\n maxLength = maxLength ? Math.max(3, ((maxLength - (maxLength % 4)) / 4) * 3) : 0;\n }\n\n if (maxLength && (mimeWordEncoding !== 'B' ? encodedStr : base64.encode(data)).length > maxLength) {\n if (mimeWordEncoding === 'Q') {\n encodedStr = this.splitMimeEncodedString(encodedStr, maxLength).join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');\n } else {\n // RFC2047 6.3 (2) states that encoded-word must include an integral number of characters, so no chopping unicode sequences\n let parts = [];\n let lpart = '';\n for (let i = 0, len = encodedStr.length; i < len; i++) {\n let chr = encodedStr.charAt(i);\n\n if (/[\\ud83c\\ud83d\\ud83e]/.test(chr) && i < len - 1) {\n // composite emoji byte, so add the next byte as well\n chr += encodedStr.charAt(++i);\n }\n\n // check if we can add this character to the existing string\n // without breaking byte length limit\n if (Buffer.byteLength(lpart + chr) <= maxLength || i === 0) {\n lpart += chr;\n } else {\n // we hit the length limit, so push the existing string and start over\n parts.push(base64.encode(lpart));\n lpart = chr;\n }\n }\n if (lpart) {\n parts.push(base64.encode(lpart));\n }\n\n if (parts.length > 1) {\n encodedStr = parts.join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');\n } else {\n encodedStr = parts.join('');\n }\n }\n } else if (mimeWordEncoding === 'B') {\n encodedStr = base64.encode(data);\n }\n\n return '=?' + toCharset + '?' + mimeWordEncoding + '?' + encodedStr + (encodedStr.substr(-2) === '?=' ? '' : '?=');\n },\n\n /**\n * Finds word sequences with non ascii text and converts these to mime words\n *\n * @param {String} value String to be encoded\n * @param {String} mimeWordEncoding='Q' Encoding for the mime word, either Q or B\n * @param {Number} [maxLength=0] If set, split mime words into several chunks if needed\n * @param {Boolean} [encodeAll=false] If true and the value needs encoding then encodes entire string, not just the smallest match\n * @return {String} String with possible mime words\n */\n encodeWords(value, mimeWordEncoding, maxLength, encodeAll) {\n maxLength = maxLength || 0;\n\n let encodedValue;\n\n // find first word with a non-printable ascii or special symbol in it\n let firstMatch = value.match(/(?:^|\\s)([^\\s]*[\"\\u0080-\\uFFFF])/);\n if (!firstMatch) {\n return value;\n }\n\n if (encodeAll) {\n // if it is requested to encode everything or the string contains something that resebles encoded word, then encode everything\n\n return this.encodeWord(value, mimeWordEncoding, maxLength);\n }\n\n // find the last word with a non-printable ascii in it\n let lastMatch = value.match(/([\"\\u0080-\\uFFFF][^\\s]*)[^\"\\u0080-\\uFFFF]*$/);\n if (!lastMatch) {\n // should not happen\n return value;\n }\n\n let startIndex =\n firstMatch.index +\n (\n firstMatch[0].match(/[^\\s]/) || {\n index: 0\n }\n ).index;\n let endIndex = lastMatch.index + (lastMatch[1] || '').length;\n\n encodedValue =\n (startIndex ? value.substr(0, startIndex) : '') +\n this.encodeWord(value.substring(startIndex, endIndex), mimeWordEncoding || 'Q', maxLength) +\n (endIndex < value.length ? value.substr(endIndex) : '');\n\n return encodedValue;\n },\n\n /**\n * Joins parsed header value together as 'value; param1=value1; param2=value2'\n * PS: We are following RFC 822 for the list of special characters that we need to keep in quotes.\n * Refer: https://www.w3.org/Protocols/rfc1341/4_Content-Type.html\n * @param {Object} structured Parsed header value\n * @return {String} joined header value\n */\n buildHeaderValue(structured) {\n let paramsArray = [];\n\n Object.keys(structured.params || {}).forEach(param => {\n // filename might include unicode characters so it is a special case\n // other values probably do not\n let value = structured.params[param];\n if (!this.isPlainText(value, true) || value.length >= 75) {\n this.buildHeaderParam(param, value, 50).forEach(encodedParam => {\n if (!/[\\s\"\\\\;:/=(),<>@[\\]?]|^[-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {\n paramsArray.push(encodedParam.key + '=' + encodedParam.value);\n } else {\n paramsArray.push(encodedParam.key + '=' + JSON.stringify(encodedParam.value));\n }\n });\n } else if (/[\\s'\"\\\\;:/=(),<>@[\\]?]|^-/.test(value)) {\n paramsArray.push(param + '=' + JSON.stringify(value));\n } else {\n paramsArray.push(param + '=' + value);\n }\n });\n\n return structured.value + (paramsArray.length ? '; ' + paramsArray.join('; ') : '');\n },\n\n /**\n * Encodes a string or an Buffer to an UTF-8 Parameter Value Continuation encoding (rfc2231)\n * Useful for splitting long parameter values.\n *\n * For example\n * title=\"unicode string\"\n * becomes\n * title*0*=utf-8''unicode\n * title*1*=%20string\n *\n * @param {String|Buffer} data String to be encoded\n * @param {Number} [maxLength=50] Max length for generated chunks\n * @param {String} [fromCharset='UTF-8'] Source sharacter set\n * @return {Array} A list of encoded keys and headers\n */\n buildHeaderParam(key, data, maxLength) {\n let list = [];\n let encodedStr = typeof data === 'string' ? data : (data || '').toString();\n let encodedStrArr;\n let chr, ord;\n let line;\n let startPos = 0;\n let i, len;\n\n maxLength = maxLength || 50;\n\n // process ascii only text\n if (this.isPlainText(data, true)) {\n // check if conversion is even needed\n if (encodedStr.length <= maxLength) {\n return [\n {\n key,\n value: encodedStr\n }\n ];\n }\n\n encodedStr = encodedStr.replace(new RegExp('.{' + maxLength + '}', 'g'), str => {\n list.push({\n line: str\n });\n return '';\n });\n\n if (encodedStr) {\n list.push({\n line: encodedStr\n });\n }\n } else {\n if (/[\\uD800-\\uDBFF]/.test(encodedStr)) {\n // string containts surrogate pairs, so normalize it to an array of bytes\n encodedStrArr = [];\n for (i = 0, len = encodedStr.length; i < len; i++) {\n chr = encodedStr.charAt(i);\n ord = chr.charCodeAt(0);\n if (ord >= 0xd800 && ord <= 0xdbff && i < len - 1) {\n chr += encodedStr.charAt(i + 1);\n encodedStrArr.push(chr);\n i++;\n } else {\n encodedStrArr.push(chr);\n }\n }\n encodedStr = encodedStrArr;\n }\n\n // first line includes the charset and language info and needs to be encoded\n // even if it does not contain any unicode characters\n line = 'utf-8\\x27\\x27';\n let encoded = true;\n startPos = 0;\n\n // process text with unicode or special chars\n for (i = 0, len = encodedStr.length; i < len; i++) {\n chr = encodedStr[i];\n\n if (encoded) {\n chr = this.safeEncodeURIComponent(chr);\n } else {\n // try to urlencode current char\n chr = chr === ' ' ? chr : this.safeEncodeURIComponent(chr);\n // By default it is not required to encode a line, the need\n // only appears when the string contains unicode or special chars\n // in this case we start processing the line over and encode all chars\n if (chr !== encodedStr[i]) {\n // Check if it is even possible to add the encoded char to the line\n // If not, there is no reason to use this line, just push it to the list\n // and start a new line with the char that needs encoding\n if ((this.safeEncodeURIComponent(line) + chr).length >= maxLength) {\n list.push({\n line,\n encoded\n });\n line = '';\n startPos = i - 1;\n } else {\n encoded = true;\n i = startPos;\n line = '';\n continue;\n }\n }\n }\n\n // if the line is already too long, push it to the list and start a new one\n if ((line + chr).length >= maxLength) {\n list.push({\n line,\n encoded\n });\n line = chr = encodedStr[i] === ' ' ? ' ' : this.safeEncodeURIComponent(encodedStr[i]);\n if (chr === encodedStr[i]) {\n encoded = false;\n startPos = i - 1;\n } else {\n encoded = true;\n }\n } else {\n line += chr;\n }\n }\n\n if (line) {\n list.push({\n line,\n encoded\n });\n }\n }\n\n return list.map((item, i) => ({\n // encoded lines: {name}*{part}*\n // unencoded lines: {name}*{part}\n // if any line needs to be encoded then the first line (part==0) is always encoded\n key: key + '*' + i + (item.encoded ? '*' : ''),\n value: item.line\n }));\n },\n\n /**\n * Parses a header value with key=value arguments into a structured\n * object.\n *\n * parseHeaderValue('content-type: text/plain; CHARSET='UTF-8'') ->\n * {\n * 'value': 'text/plain',\n * 'params': {\n * 'charset': 'UTF-8'\n * }\n * }\n *\n * @param {String} str Header value\n * @return {Object} Header value as a parsed structure\n */\n parseHeaderValue(str) {\n let response = {\n value: false,\n params: {}\n };\n let key = false;\n let value = '';\n let type = 'value';\n let quote = false;\n let escaped = false;\n let chr;\n\n for (let i = 0, len = str.length; i < len; i++) {\n chr = str.charAt(i);\n if (type === 'key') {\n if (chr === '=') {\n key = value.trim().toLowerCase();\n type = 'value';\n value = '';\n continue;\n }\n value += chr;\n } else {\n if (escaped) {\n value += chr;\n } else if (chr === '\\\\') {\n escaped = true;\n continue;\n } else if (quote && chr === quote) {\n quote = false;\n } else if (!quote && chr === '\"') {\n quote = chr;\n } else if (!quote && chr === ';') {\n if (key === false) {\n response.value = value.trim();\n } else {\n response.params[key] = value.trim();\n }\n type = 'key';\n value = '';\n } else {\n value += chr;\n }\n escaped = false;\n }\n }\n\n if (type === 'value') {\n if (key === false) {\n response.value = value.trim();\n } else {\n response.params[key] = value.trim();\n }\n } else if (value.trim()) {\n response.params[value.trim().toLowerCase()] = '';\n }\n\n // handle parameter value continuations\n // https://tools.ietf.org/html/rfc2231#section-3\n\n // preprocess values\n Object.keys(response.params).forEach(key => {\n let actualKey, nr, match, value;\n if ((match = key.match(/(\\*(\\d+)|\\*(\\d+)\\*|\\*)$/))) {\n actualKey = key.substr(0, match.index);\n nr = Number(match[2] || match[3]) || 0;\n\n if (!response.params[actualKey] || typeof response.params[actualKey] !== 'object') {\n response.params[actualKey] = {\n charset: false,\n values: []\n };\n }\n\n value = response.params[key];\n\n if (nr === 0 && match[0].substr(-1) === '*' && (match = value.match(/^([^']*)'[^']*'(.*)$/))) {\n response.params[actualKey].charset = match[1] || 'iso-8859-1';\n value = match[2];\n }\n\n response.params[actualKey].values[nr] = value;\n\n // remove the old reference\n delete response.params[key];\n }\n });\n\n // concatenate split rfc2231 strings and convert encoded strings to mime encoded words\n Object.keys(response.params).forEach(key => {\n let value;\n if (response.params[key] && Array.isArray(response.params[key].values)) {\n value = response.params[key].values.map(val => val || '').join('');\n\n if (response.params[key].charset) {\n // convert \"%AB\" to \"=?charset?Q?=AB?=\"\n response.params[key] =\n '=?' +\n response.params[key].charset +\n '?Q?' +\n value\n // fix invalidly encoded chars\n .replace(/[=?_\\s]/g, s => {\n let c = s.charCodeAt(0).toString(16);\n if (s === ' ') {\n return '_';\n } else {\n return '%' + (c.length < 2 ? '0' : '') + c;\n }\n })\n // change from urlencoding to percent encoding\n .replace(/%/g, '=') +\n '?=';\n } else {\n response.params[key] = value;\n }\n }\n });\n\n return response;\n },\n\n /**\n * Returns file extension for a content type string. If no suitable extensions\n * are found, 'bin' is used as the default extension\n *\n * @param {String} mimeType Content type to be checked for\n * @return {String} File extension\n */\n detectExtension: mimeType => mimeTypes.detectExtension(mimeType),\n\n /**\n * Returns content type for a file extension. If no suitable content types\n * are found, 'application/octet-stream' is used as the default content type\n *\n * @param {String} extension Extension to be checked for\n * @return {String} File extension\n */\n detectMimeType: extension => mimeTypes.detectMimeType(extension),\n\n /**\n * Folds long lines, useful for folding header lines (afterSpace=false) and\n * flowed text (afterSpace=true)\n *\n * @param {String} str String to be folded\n * @param {Number} [lineLength=76] Maximum length of a line\n * @param {Boolean} afterSpace If true, leave a space in th end of a line\n * @return {String} String with folded lines\n */\n foldLines(str, lineLength, afterSpace) {\n str = (str || '').toString();\n lineLength = lineLength || 76;\n\n let pos = 0,\n len = str.length,\n result = '',\n line,\n match;\n\n while (pos < len) {\n line = str.substr(pos, lineLength);\n if (line.length < lineLength) {\n result += line;\n break;\n }\n if ((match = line.match(/^[^\\n\\r]*(\\r?\\n|\\r)/))) {\n line = match[0];\n result += line;\n pos += line.length;\n continue;\n } else if ((match = line.match(/(\\s+)[^\\s]*$/)) && match[0].length - (afterSpace ? (match[1] || '').length : 0) < line.length) {\n line = line.substr(0, line.length - (match[0].length - (afterSpace ? (match[1] || '').length : 0)));\n } else if ((match = str.substr(pos + line.length).match(/^[^\\s]+(\\s*)/))) {\n line = line + match[0].substr(0, match[0].length - (!afterSpace ? (match[1] || '').length : 0));\n }\n\n result += line;\n pos += line.length;\n if (pos < len) {\n result += '\\r\\n';\n }\n }\n\n return result;\n },\n\n /**\n * Splits a mime encoded string. Needed for dividing mime words into smaller chunks\n *\n * @param {String} str Mime encoded string to be split up\n * @param {Number} maxlen Maximum length of characters for one part (minimum 12)\n * @return {Array} Split string\n */\n splitMimeEncodedString: (str, maxlen) => {\n let curLine,\n match,\n chr,\n done,\n lines = [];\n\n // require at least 12 symbols to fit possible 4 octet UTF-8 sequences\n maxlen = Math.max(maxlen || 0, 12);\n\n while (str.length) {\n curLine = str.substr(0, maxlen);\n\n // move incomplete escaped char back to main\n if ((match = curLine.match(/[=][0-9A-F]?$/i))) {\n curLine = curLine.substr(0, match.index);\n }\n\n done = false;\n while (!done) {\n done = true;\n // check if not middle of a unicode char sequence\n if ((match = str.substr(curLine.length).match(/^[=]([0-9A-F]{2})/i))) {\n chr = parseInt(match[1], 16);\n // invalid sequence, move one char back anc recheck\n if (chr < 0xc2 && chr > 0x7f) {\n curLine = curLine.substr(0, curLine.length - 3);\n done = false;\n }\n }\n }\n\n if (curLine.length) {\n lines.push(curLine);\n }\n str = str.substr(curLine.length);\n }\n\n return lines;\n },\n\n encodeURICharComponent: chr => {\n let res = '';\n let ord = chr.charCodeAt(0).toString(16).toUpperCase();\n\n if (ord.length % 2) {\n ord = '0' + ord;\n }\n\n if (ord.length > 2) {\n for (let i = 0, len = ord.length / 2; i < len; i++) {\n res += '%' + ord.substr(i, 2);\n }\n } else {\n res += '%' + ord;\n }\n\n return res;\n },\n\n safeEncodeURIComponent(str) {\n str = (str || '').toString();\n\n try {\n // might throw if we try to encode invalid sequences, eg. partial emoji\n str = encodeURIComponent(str);\n } catch (E) {\n // should never run\n return str.replace(/[^\\x00-\\x1F *'()<>@,;:\\\\\"[\\]?=\\u007F-\\uFFFF]+/g, '');\n }\n\n // ensure chars that are not handled by encodeURICompent are converted as well\n return str.replace(/[\\x00-\\x1F *'()<>@,;:\\\\\"[\\]?=\\u007F-\\uFFFF]/g, chr => this.encodeURICharComponent(chr));\n }\n};\n","/* eslint quote-props: 0 */\n\n'use strict';\n\nconst path = require('path');\n\nconst defaultMimeType = 'application/octet-stream';\nconst defaultExtension = 'bin';\n\nconst mimeTypes = new Map([\n ['application/acad', 'dwg'],\n ['application/applixware', 'aw'],\n ['application/arj', 'arj'],\n ['application/atom+xml', 'xml'],\n ['application/atomcat+xml', 'atomcat'],\n ['application/atomsvc+xml', 'atomsvc'],\n ['application/base64', ['mm', 'mme']],\n ['application/binhex', 'hqx'],\n ['application/binhex4', 'hqx'],\n ['application/book', ['book', 'boo']],\n ['application/ccxml+xml,', 'ccxml'],\n ['application/cdf', 'cdf'],\n ['application/cdmi-capability', 'cdmia'],\n ['application/cdmi-container', 'cdmic'],\n ['application/cdmi-domain', 'cdmid'],\n ['application/cdmi-object', 'cdmio'],\n ['application/cdmi-queue', 'cdmiq'],\n ['application/clariscad', 'ccad'],\n ['application/commonground', 'dp'],\n ['application/cu-seeme', 'cu'],\n ['application/davmount+xml', 'davmount'],\n ['application/drafting', 'drw'],\n ['application/dsptype', 'tsp'],\n ['application/dssc+der', 'dssc'],\n ['application/dssc+xml', 'xdssc'],\n ['application/dxf', 'dxf'],\n ['application/ecmascript', ['js', 'es']],\n ['application/emma+xml', 'emma'],\n ['application/envoy', 'evy'],\n ['application/epub+zip', 'epub'],\n ['application/excel', ['xls', 'xl', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],\n ['application/exi', 'exi'],\n ['application/font-tdpfr', 'pfr'],\n ['application/fractals', 'fif'],\n ['application/freeloader', 'frl'],\n ['application/futuresplash', 'spl'],\n ['application/gnutar', 'tgz'],\n ['application/groupwise', 'vew'],\n ['application/hlp', 'hlp'],\n ['application/hta', 'hta'],\n ['application/hyperstudio', 'stk'],\n ['application/i-deas', 'unv'],\n ['application/iges', ['iges', 'igs']],\n ['application/inf', 'inf'],\n ['application/internet-property-stream', 'acx'],\n ['application/ipfix', 'ipfix'],\n ['application/java', 'class'],\n ['application/java-archive', 'jar'],\n ['application/java-byte-code', 'class'],\n ['application/java-serialized-object', 'ser'],\n ['application/java-vm', 'class'],\n ['application/javascript', 'js'],\n ['application/json', 'json'],\n ['application/lha', 'lha'],\n ['application/lzx', 'lzx'],\n ['application/mac-binary', 'bin'],\n ['application/mac-binhex', 'hqx'],\n ['application/mac-binhex40', 'hqx'],\n ['application/mac-compactpro', 'cpt'],\n ['application/macbinary', 'bin'],\n ['application/mads+xml', 'mads'],\n ['application/marc', 'mrc'],\n ['application/marcxml+xml', 'mrcx'],\n ['application/mathematica', 'ma'],\n ['application/mathml+xml', 'mathml'],\n ['application/mbedlet', 'mbd'],\n ['application/mbox', 'mbox'],\n ['application/mcad', 'mcd'],\n ['application/mediaservercontrol+xml', 'mscml'],\n ['application/metalink4+xml', 'meta4'],\n ['application/mets+xml', 'mets'],\n ['application/mime', 'aps'],\n ['application/mods+xml', 'mods'],\n ['application/mp21', 'm21'],\n ['application/mp4', 'mp4'],\n ['application/mspowerpoint', ['ppt', 'pot', 'pps', 'ppz']],\n ['application/msword', ['doc', 'dot', 'w6w', 'wiz', 'word']],\n ['application/mswrite', 'wri'],\n ['application/mxf', 'mxf'],\n ['application/netmc', 'mcp'],\n ['application/octet-stream', ['*']],\n ['application/oda', 'oda'],\n ['application/oebps-package+xml', 'opf'],\n ['application/ogg', 'ogx'],\n ['application/olescript', 'axs'],\n ['application/onenote', 'onetoc'],\n ['application/patch-ops-error+xml', 'xer'],\n ['application/pdf', 'pdf'],\n ['application/pgp-encrypted', 'asc'],\n ['application/pgp-signature', 'pgp'],\n ['application/pics-rules', 'prf'],\n ['application/pkcs-12', 'p12'],\n ['application/pkcs-crl', 'crl'],\n ['application/pkcs10', 'p10'],\n ['application/pkcs7-mime', ['p7c', 'p7m']],\n ['application/pkcs7-signature', 'p7s'],\n ['application/pkcs8', 'p8'],\n ['application/pkix-attr-cert', 'ac'],\n ['application/pkix-cert', ['cer', 'crt']],\n ['application/pkix-crl', 'crl'],\n ['application/pkix-pkipath', 'pkipath'],\n ['application/pkixcmp', 'pki'],\n ['application/plain', 'text'],\n ['application/pls+xml', 'pls'],\n ['application/postscript', ['ps', 'ai', 'eps']],\n ['application/powerpoint', 'ppt'],\n ['application/pro_eng', ['part', 'prt']],\n ['application/prs.cww', 'cww'],\n ['application/pskc+xml', 'pskcxml'],\n ['application/rdf+xml', 'rdf'],\n ['application/reginfo+xml', 'rif'],\n ['application/relax-ng-compact-syntax', 'rnc'],\n ['application/resource-lists+xml', 'rl'],\n ['application/resource-lists-diff+xml', 'rld'],\n ['application/ringing-tones', 'rng'],\n ['application/rls-services+xml', 'rs'],\n ['application/rsd+xml', 'rsd'],\n ['application/rss+xml', 'xml'],\n ['application/rtf', ['rtf', 'rtx']],\n ['application/sbml+xml', 'sbml'],\n ['application/scvp-cv-request', 'scq'],\n ['application/scvp-cv-response', 'scs'],\n ['application/scvp-vp-request', 'spq'],\n ['application/scvp-vp-response', 'spp'],\n ['application/sdp', 'sdp'],\n ['application/sea', 'sea'],\n ['application/set', 'set'],\n ['application/set-payment-initiation', 'setpay'],\n ['application/set-registration-initiation', 'setreg'],\n ['application/shf+xml', 'shf'],\n ['application/sla', 'stl'],\n ['application/smil', ['smi', 'smil']],\n ['application/smil+xml', 'smi'],\n ['application/solids', 'sol'],\n ['application/sounder', 'sdr'],\n ['application/sparql-query', 'rq'],\n ['application/sparql-results+xml', 'srx'],\n ['application/srgs', 'gram'],\n ['application/srgs+xml', 'grxml'],\n ['application/sru+xml', 'sru'],\n ['application/ssml+xml', 'ssml'],\n ['application/step', ['step', 'stp']],\n ['application/streamingmedia', 'ssm'],\n ['application/tei+xml', 'tei'],\n ['application/thraud+xml', 'tfi'],\n ['application/timestamped-data', 'tsd'],\n ['application/toolbook', 'tbk'],\n ['application/vda', 'vda'],\n ['application/vnd.3gpp.pic-bw-large', 'plb'],\n ['application/vnd.3gpp.pic-bw-small', 'psb'],\n ['application/vnd.3gpp.pic-bw-var', 'pvb'],\n ['application/vnd.3gpp2.tcap', 'tcap'],\n ['application/vnd.3m.post-it-notes', 'pwn'],\n ['application/vnd.accpac.simply.aso', 'aso'],\n ['application/vnd.accpac.simply.imp', 'imp'],\n ['application/vnd.acucobol', 'acu'],\n ['application/vnd.acucorp', 'atc'],\n ['application/vnd.adobe.air-application-installer-package+zip', 'air'],\n ['application/vnd.adobe.fxp', 'fxp'],\n ['application/vnd.adobe.xdp+xml', 'xdp'],\n ['application/vnd.adobe.xfdf', 'xfdf'],\n ['application/vnd.ahead.space', 'ahead'],\n ['application/vnd.airzip.filesecure.azf', 'azf'],\n ['application/vnd.airzip.filesecure.azs', 'azs'],\n ['application/vnd.amazon.ebook', 'azw'],\n ['application/vnd.americandynamics.acc', 'acc'],\n ['application/vnd.amiga.ami', 'ami'],\n ['application/vnd.android.package-archive', 'apk'],\n ['application/vnd.anser-web-certificate-issue-initiation', 'cii'],\n ['application/vnd.anser-web-funds-transfer-initiation', 'fti'],\n ['application/vnd.antix.game-component', 'atx'],\n ['application/vnd.apple.installer+xml', 'mpkg'],\n ['application/vnd.apple.mpegurl', 'm3u8'],\n ['application/vnd.aristanetworks.swi', 'swi'],\n ['application/vnd.audiograph', 'aep'],\n ['application/vnd.blueice.multipass', 'mpm'],\n ['application/vnd.bmi', 'bmi'],\n ['application/vnd.businessobjects', 'rep'],\n ['application/vnd.chemdraw+xml', 'cdxml'],\n ['application/vnd.chipnuts.karaoke-mmd', 'mmd'],\n ['application/vnd.cinderella', 'cdy'],\n ['application/vnd.claymore', 'cla'],\n ['application/vnd.cloanto.rp9', 'rp9'],\n ['application/vnd.clonk.c4group', 'c4g'],\n ['application/vnd.cluetrust.cartomobile-config', 'c11amc'],\n ['application/vnd.cluetrust.cartomobile-config-pkg', 'c11amz'],\n ['application/vnd.commonspace', 'csp'],\n ['application/vnd.contact.cmsg', 'cdbcmsg'],\n ['application/vnd.cosmocaller', 'cmc'],\n ['application/vnd.crick.clicker', 'clkx'],\n ['application/vnd.crick.clicker.keyboard', 'clkk'],\n ['application/vnd.crick.clicker.palette', 'clkp'],\n ['application/vnd.crick.clicker.template', 'clkt'],\n ['application/vnd.crick.clicker.wordbank', 'clkw'],\n ['application/vnd.criticaltools.wbs+xml', 'wbs'],\n ['application/vnd.ctc-posml', 'pml'],\n ['application/vnd.cups-ppd', 'ppd'],\n ['application/vnd.curl.car', 'car'],\n ['application/vnd.curl.pcurl', 'pcurl'],\n ['application/vnd.data-vision.rdz', 'rdz'],\n ['application/vnd.denovo.fcselayout-link', 'fe_launch'],\n ['application/vnd.dna', 'dna'],\n ['application/vnd.dolby.mlp', 'mlp'],\n ['application/vnd.dpgraph', 'dpg'],\n ['application/vnd.dreamfactory', 'dfac'],\n ['application/vnd.dvb.ait', 'ait'],\n ['application/vnd.dvb.service', 'svc'],\n ['application/vnd.dynageo', 'geo'],\n ['application/vnd.ecowin.chart', 'mag'],\n ['application/vnd.enliven', 'nml'],\n ['application/vnd.epson.esf', 'esf'],\n ['application/vnd.epson.msf', 'msf'],\n ['application/vnd.epson.quickanime', 'qam'],\n ['application/vnd.epson.salt', 'slt'],\n ['application/vnd.epson.ssf', 'ssf'],\n ['application/vnd.eszigno3+xml', 'es3'],\n ['application/vnd.ezpix-album', 'ez2'],\n ['application/vnd.ezpix-package', 'ez3'],\n ['application/vnd.fdf', 'fdf'],\n ['application/vnd.fdsn.seed', 'seed'],\n ['application/vnd.flographit', 'gph'],\n ['application/vnd.fluxtime.clip', 'ftc'],\n ['application/vnd.framemaker', 'fm'],\n ['application/vnd.frogans.fnc', 'fnc'],\n ['application/vnd.frogans.ltf', 'ltf'],\n ['application/vnd.fsc.weblaunch', 'fsc'],\n ['application/vnd.fujitsu.oasys', 'oas'],\n ['application/vnd.fujitsu.oasys2', 'oa2'],\n ['application/vnd.fujitsu.oasys3', 'oa3'],\n ['application/vnd.fujitsu.oasysgp', 'fg5'],\n ['application/vnd.fujitsu.oasysprs', 'bh2'],\n ['application/vnd.fujixerox.ddd', 'ddd'],\n ['application/vnd.fujixerox.docuworks', 'xdw'],\n ['application/vnd.fujixerox.docuworks.binder', 'xbd'],\n ['application/vnd.fuzzysheet', 'fzs'],\n ['application/vnd.genomatix.tuxedo', 'txd'],\n ['application/vnd.geogebra.file', 'ggb'],\n ['application/vnd.geogebra.tool', 'ggt'],\n ['application/vnd.geometry-explorer', 'gex'],\n ['application/vnd.geonext', 'gxt'],\n ['application/vnd.geoplan', 'g2w'],\n ['application/vnd.geospace', 'g3w'],\n ['application/vnd.gmx', 'gmx'],\n ['application/vnd.google-earth.kml+xml', 'kml'],\n ['application/vnd.google-earth.kmz', 'kmz'],\n ['application/vnd.grafeq', 'gqf'],\n ['application/vnd.groove-account', 'gac'],\n ['application/vnd.groove-help', 'ghf'],\n ['application/vnd.groove-identity-message', 'gim'],\n ['application/vnd.groove-injector', 'grv'],\n ['application/vnd.groove-tool-message', 'gtm'],\n ['application/vnd.groove-tool-template', 'tpl'],\n ['application/vnd.groove-vcard', 'vcg'],\n ['application/vnd.hal+xml', 'hal'],\n ['application/vnd.handheld-entertainment+xml', 'zmm'],\n ['application/vnd.hbci', 'hbci'],\n ['application/vnd.hhe.lesson-player', 'les'],\n ['application/vnd.hp-hpgl', ['hgl', 'hpg', 'hpgl']],\n ['application/vnd.hp-hpid', 'hpid'],\n ['application/vnd.hp-hps', 'hps'],\n ['application/vnd.hp-jlyt', 'jlt'],\n ['application/vnd.hp-pcl', 'pcl'],\n ['application/vnd.hp-pclxl', 'pclxl'],\n ['application/vnd.hydrostatix.sof-data', 'sfd-hdstx'],\n ['application/vnd.hzn-3d-crossword', 'x3d'],\n ['application/vnd.ibm.minipay', 'mpy'],\n ['application/vnd.ibm.modcap', 'afp'],\n ['application/vnd.ibm.rights-management', 'irm'],\n ['application/vnd.ibm.secure-container', 'sc'],\n ['application/vnd.iccprofile', 'icc'],\n ['application/vnd.igloader', 'igl'],\n ['application/vnd.immervision-ivp', 'ivp'],\n ['application/vnd.immervision-ivu', 'ivu'],\n ['application/vnd.insors.igm', 'igm'],\n ['application/vnd.intercon.formnet', 'xpw'],\n ['application/vnd.intergeo', 'i2g'],\n ['application/vnd.intu.qbo', 'qbo'],\n ['application/vnd.intu.qfx', 'qfx'],\n ['application/vnd.ipunplugged.rcprofile', 'rcprofile'],\n ['application/vnd.irepository.package+xml', 'irp'],\n ['application/vnd.is-xpr', 'xpr'],\n ['application/vnd.isac.fcs', 'fcs'],\n ['application/vnd.jam', 'jam'],\n ['application/vnd.jcp.javame.midlet-rms', 'rms'],\n ['application/vnd.jisp', 'jisp'],\n ['application/vnd.joost.joda-archive', 'joda'],\n ['application/vnd.kahootz', 'ktz'],\n ['application/vnd.kde.karbon', 'karbon'],\n ['application/vnd.kde.kchart', 'chrt'],\n ['application/vnd.kde.kformula', 'kfo'],\n ['application/vnd.kde.kivio', 'flw'],\n ['application/vnd.kde.kontour', 'kon'],\n ['application/vnd.kde.kpresenter', 'kpr'],\n ['application/vnd.kde.kspread', 'ksp'],\n ['application/vnd.kde.kword', 'kwd'],\n ['application/vnd.kenameaapp', 'htke'],\n ['application/vnd.kidspiration', 'kia'],\n ['application/vnd.kinar', 'kne'],\n ['application/vnd.koan', 'skp'],\n ['application/vnd.kodak-descriptor', 'sse'],\n ['application/vnd.las.las+xml', 'lasxml'],\n ['application/vnd.llamagraphics.life-balance.desktop', 'lbd'],\n ['application/vnd.llamagraphics.life-balance.exchange+xml', 'lbe'],\n ['application/vnd.lotus-1-2-3', '123'],\n ['application/vnd.lotus-approach', 'apr'],\n ['application/vnd.lotus-freelance', 'pre'],\n ['application/vnd.lotus-notes', 'nsf'],\n ['application/vnd.lotus-organizer', 'org'],\n ['application/vnd.lotus-screencam', 'scm'],\n ['application/vnd.lotus-wordpro', 'lwp'],\n ['application/vnd.macports.portpkg', 'portpkg'],\n ['application/vnd.mcd', 'mcd'],\n ['application/vnd.medcalcdata', 'mc1'],\n ['application/vnd.mediastation.cdkey', 'cdkey'],\n ['application/vnd.mfer', 'mwf'],\n ['application/vnd.mfmp', 'mfm'],\n ['application/vnd.micrografx.flo', 'flo'],\n ['application/vnd.micrografx.igx', 'igx'],\n ['application/vnd.mif', 'mif'],\n ['application/vnd.mobius.daf', 'daf'],\n ['application/vnd.mobius.dis', 'dis'],\n ['application/vnd.mobius.mbk', 'mbk'],\n ['application/vnd.mobius.mqy', 'mqy'],\n ['application/vnd.mobius.msl', 'msl'],\n ['application/vnd.mobius.plc', 'plc'],\n ['application/vnd.mobius.txf', 'txf'],\n ['application/vnd.mophun.application', 'mpn'],\n ['application/vnd.mophun.certificate', 'mpc'],\n ['application/vnd.mozilla.xul+xml', 'xul'],\n ['application/vnd.ms-artgalry', 'cil'],\n ['application/vnd.ms-cab-compressed', 'cab'],\n ['application/vnd.ms-excel', ['xls', 'xla', 'xlc', 'xlm', 'xlt', 'xlw', 'xlb', 'xll']],\n ['application/vnd.ms-excel.addin.macroenabled.12', 'xlam'],\n ['application/vnd.ms-excel.sheet.binary.macroenabled.12', 'xlsb'],\n ['application/vnd.ms-excel.sheet.macroenabled.12', 'xlsm'],\n ['application/vnd.ms-excel.template.macroenabled.12', 'xltm'],\n ['application/vnd.ms-fontobject', 'eot'],\n ['application/vnd.ms-htmlhelp', 'chm'],\n ['application/vnd.ms-ims', 'ims'],\n ['application/vnd.ms-lrm', 'lrm'],\n ['application/vnd.ms-officetheme', 'thmx'],\n ['application/vnd.ms-outlook', 'msg'],\n ['application/vnd.ms-pki.certstore', 'sst'],\n ['application/vnd.ms-pki.pko', 'pko'],\n ['application/vnd.ms-pki.seccat', 'cat'],\n ['application/vnd.ms-pki.stl', 'stl'],\n ['application/vnd.ms-pkicertstore', 'sst'],\n ['application/vnd.ms-pkiseccat', 'cat'],\n ['application/vnd.ms-pkistl', 'stl'],\n ['application/vnd.ms-powerpoint', ['ppt', 'pot', 'pps', 'ppa', 'pwz']],\n ['application/vnd.ms-powerpoint.addin.macroenabled.12', 'ppam'],\n ['application/vnd.ms-powerpoint.presentation.macroenabled.12', 'pptm'],\n ['application/vnd.ms-powerpoint.slide.macroenabled.12', 'sldm'],\n ['application/vnd.ms-powerpoint.slideshow.macroenabled.12', 'ppsm'],\n ['application/vnd.ms-powerpoint.template.macroenabled.12', 'potm'],\n ['application/vnd.ms-project', 'mpp'],\n ['application/vnd.ms-word.document.macroenabled.12', 'docm'],\n ['application/vnd.ms-word.template.macroenabled.12', 'dotm'],\n ['application/vnd.ms-works', ['wks', 'wcm', 'wdb', 'wps']],\n ['application/vnd.ms-wpl', 'wpl'],\n ['application/vnd.ms-xpsdocument', 'xps'],\n ['application/vnd.mseq', 'mseq'],\n ['application/vnd.musician', 'mus'],\n ['application/vnd.muvee.style', 'msty'],\n ['application/vnd.neurolanguage.nlu', 'nlu'],\n ['application/vnd.noblenet-directory', 'nnd'],\n ['application/vnd.noblenet-sealer', 'nns'],\n ['application/vnd.noblenet-web', 'nnw'],\n ['application/vnd.nokia.configuration-message', 'ncm'],\n ['application/vnd.nokia.n-gage.data', 'ngdat'],\n ['application/vnd.nokia.n-gage.symbian.install', 'n-gage'],\n ['application/vnd.nokia.radio-preset', 'rpst'],\n ['application/vnd.nokia.radio-presets', 'rpss'],\n ['application/vnd.nokia.ringing-tone', 'rng'],\n ['application/vnd.novadigm.edm', 'edm'],\n ['application/vnd.novadigm.edx', 'edx'],\n ['application/vnd.novadigm.ext', 'ext'],\n ['application/vnd.oasis.opendocument.chart', 'odc'],\n ['application/vnd.oasis.opendocument.chart-template', 'otc'],\n ['application/vnd.oasis.opendocument.database', 'odb'],\n ['application/vnd.oasis.opendocument.formula', 'odf'],\n ['application/vnd.oasis.opendocument.formula-template', 'odft'],\n ['application/vnd.oasis.opendocument.graphics', 'odg'],\n ['application/vnd.oasis.opendocument.graphics-template', 'otg'],\n ['application/vnd.oasis.opendocument.image', 'odi'],\n ['application/vnd.oasis.opendocument.image-template', 'oti'],\n ['application/vnd.oasis.opendocument.presentation', 'odp'],\n ['application/vnd.oasis.opendocument.presentation-template', 'otp'],\n ['application/vnd.oasis.opendocument.spreadsheet', 'ods'],\n ['application/vnd.oasis.opendocument.spreadsheet-template', 'ots'],\n ['application/vnd.oasis.opendocument.text', 'odt'],\n ['application/vnd.oasis.opendocument.text-master', 'odm'],\n ['application/vnd.oasis.opendocument.text-template', 'ott'],\n ['application/vnd.oasis.opendocument.text-web', 'oth'],\n ['application/vnd.olpc-sugar', 'xo'],\n ['application/vnd.oma.dd2+xml', 'dd2'],\n ['application/vnd.openofficeorg.extension', 'oxt'],\n ['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.slide', 'sldx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.template', 'potx'],\n ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx'],\n ['application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltx'],\n ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx'],\n ['application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotx'],\n ['application/vnd.osgeo.mapguide.package', 'mgp'],\n ['application/vnd.osgi.dp', 'dp'],\n ['application/vnd.palm', 'pdb'],\n ['application/vnd.pawaafile', 'paw'],\n ['application/vnd.pg.format', 'str'],\n ['application/vnd.pg.osasli', 'ei6'],\n ['application/vnd.picsel', 'efif'],\n ['application/vnd.pmi.widget', 'wg'],\n ['application/vnd.pocketlearn', 'plf'],\n ['application/vnd.powerbuilder6', 'pbd'],\n ['application/vnd.previewsystems.box', 'box'],\n ['application/vnd.proteus.magazine', 'mgz'],\n ['application/vnd.publishare-delta-tree', 'qps'],\n ['application/vnd.pvi.ptid1', 'ptid'],\n ['application/vnd.quark.quarkxpress', 'qxd'],\n ['application/vnd.realvnc.bed', 'bed'],\n ['application/vnd.recordare.musicxml', 'mxl'],\n ['application/vnd.recordare.musicxml+xml', 'musicxml'],\n ['application/vnd.rig.cryptonote', 'cryptonote'],\n ['application/vnd.rim.cod', 'cod'],\n ['application/vnd.rn-realmedia', 'rm'],\n ['application/vnd.rn-realplayer', 'rnx'],\n ['application/vnd.route66.link66+xml', 'link66'],\n ['application/vnd.sailingtracker.track', 'st'],\n ['application/vnd.seemail', 'see'],\n ['application/vnd.sema', 'sema'],\n ['application/vnd.semd', 'semd'],\n ['application/vnd.semf', 'semf'],\n ['application/vnd.shana.informed.formdata', 'ifm'],\n ['application/vnd.shana.informed.formtemplate', 'itp'],\n ['application/vnd.shana.informed.interchange', 'iif'],\n ['application/vnd.shana.informed.package', 'ipk'],\n ['application/vnd.simtech-mindmapper', 'twd'],\n ['application/vnd.smaf', 'mmf'],\n ['application/vnd.smart.teacher', 'teacher'],\n ['application/vnd.solent.sdkm+xml', 'sdkm'],\n ['application/vnd.spotfire.dxp', 'dxp'],\n ['application/vnd.spotfire.sfs', 'sfs'],\n ['application/vnd.stardivision.calc', 'sdc'],\n ['application/vnd.stardivision.draw', 'sda'],\n ['application/vnd.stardivision.impress', 'sdd'],\n ['application/vnd.stardivision.math', 'smf'],\n ['application/vnd.stardivision.writer', 'sdw'],\n ['application/vnd.stardivision.writer-global', 'sgl'],\n ['application/vnd.stepmania.stepchart', 'sm'],\n ['application/vnd.sun.xml.calc', 'sxc'],\n ['application/vnd.sun.xml.calc.template', 'stc'],\n ['application/vnd.sun.xml.draw', 'sxd'],\n ['application/vnd.sun.xml.draw.template', 'std'],\n ['application/vnd.sun.xml.impress', 'sxi'],\n ['application/vnd.sun.xml.impress.template', 'sti'],\n ['application/vnd.sun.xml.math', 'sxm'],\n ['application/vnd.sun.xml.writer', 'sxw'],\n ['application/vnd.sun.xml.writer.global', 'sxg'],\n ['application/vnd.sun.xml.writer.template', 'stw'],\n ['application/vnd.sus-calendar', 'sus'],\n ['application/vnd.svd', 'svd'],\n ['application/vnd.symbian.install', 'sis'],\n ['application/vnd.syncml+xml', 'xsm'],\n ['application/vnd.syncml.dm+wbxml', 'bdm'],\n ['application/vnd.syncml.dm+xml', 'xdm'],\n ['application/vnd.tao.intent-module-archive', 'tao'],\n ['application/vnd.tmobile-livetv', 'tmo'],\n ['application/vnd.trid.tpt', 'tpt'],\n ['application/vnd.triscape.mxs', 'mxs'],\n ['application/vnd.trueapp', 'tra'],\n ['application/vnd.ufdl', 'ufd'],\n ['application/vnd.uiq.theme', 'utz'],\n ['application/vnd.umajin', 'umj'],\n ['application/vnd.unity', 'unityweb'],\n ['application/vnd.uoml+xml', 'uoml'],\n ['application/vnd.vcx', 'vcx'],\n ['application/vnd.visio', 'vsd'],\n ['application/vnd.visionary', 'vis'],\n ['application/vnd.vsf', 'vsf'],\n ['application/vnd.wap.wbxml', 'wbxml'],\n ['application/vnd.wap.wmlc', 'wmlc'],\n ['application/vnd.wap.wmlscriptc', 'wmlsc'],\n ['application/vnd.webturbo', 'wtb'],\n ['application/vnd.wolfram.player', 'nbp'],\n ['application/vnd.wordperfect', 'wpd'],\n ['application/vnd.wqd', 'wqd'],\n ['application/vnd.wt.stf', 'stf'],\n ['application/vnd.xara', ['web', 'xar']],\n ['application/vnd.xfdl', 'xfdl'],\n ['application/vnd.yamaha.hv-dic', 'hvd'],\n ['application/vnd.yamaha.hv-script', 'hvs'],\n ['application/vnd.yamaha.hv-voice', 'hvp'],\n ['application/vnd.yamaha.openscoreformat', 'osf'],\n ['application/vnd.yamaha.openscoreformat.osfpvg+xml', 'osfpvg'],\n ['application/vnd.yamaha.smaf-audio', 'saf'],\n ['application/vnd.yamaha.smaf-phrase', 'spf'],\n ['application/vnd.yellowriver-custom-menu', 'cmp'],\n ['application/vnd.zul', 'zir'],\n ['application/vnd.zzazz.deck+xml', 'zaz'],\n ['application/vocaltec-media-desc', 'vmd'],\n ['application/vocaltec-media-file', 'vmf'],\n ['application/voicexml+xml', 'vxml'],\n ['application/widget', 'wgt'],\n ['application/winhlp', 'hlp'],\n ['application/wordperfect', ['wp', 'wp5', 'wp6', 'wpd']],\n ['application/wordperfect6.0', ['w60', 'wp5']],\n ['application/wordperfect6.1', 'w61'],\n ['application/wsdl+xml', 'wsdl'],\n ['application/wspolicy+xml', 'wspolicy'],\n ['application/x-123', 'wk1'],\n ['application/x-7z-compressed', '7z'],\n ['application/x-abiword', 'abw'],\n ['application/x-ace-compressed', 'ace'],\n ['application/x-aim', 'aim'],\n ['application/x-authorware-bin', 'aab'],\n ['application/x-authorware-map', 'aam'],\n ['application/x-authorware-seg', 'aas'],\n ['application/x-bcpio', 'bcpio'],\n ['application/x-binary', 'bin'],\n ['application/x-binhex40', 'hqx'],\n ['application/x-bittorrent', 'torrent'],\n ['application/x-bsh', ['bsh', 'sh', 'shar']],\n ['application/x-bytecode.elisp', 'elc'],\n ['application/x-bytecode.python', 'pyc'],\n ['application/x-bzip', 'bz'],\n ['application/x-bzip2', ['boz', 'bz2']],\n ['application/x-cdf', 'cdf'],\n ['application/x-cdlink', 'vcd'],\n ['application/x-chat', ['cha', 'chat']],\n ['application/x-chess-pgn', 'pgn'],\n ['application/x-cmu-raster', 'ras'],\n ['application/x-cocoa', 'cco'],\n ['application/x-compactpro', 'cpt'],\n ['application/x-compress', 'z'],\n ['application/x-compressed', ['tgz', 'gz', 'z', 'zip']],\n ['application/x-conference', 'nsc'],\n ['application/x-cpio', 'cpio'],\n ['application/x-cpt', 'cpt'],\n ['application/x-csh', 'csh'],\n ['application/x-debian-package', 'deb'],\n ['application/x-deepv', 'deepv'],\n ['application/x-director', ['dir', 'dcr', 'dxr']],\n ['application/x-doom', 'wad'],\n ['application/x-dtbncx+xml', 'ncx'],\n ['application/x-dtbook+xml', 'dtb'],\n ['application/x-dtbresource+xml', 'res'],\n ['application/x-dvi', 'dvi'],\n ['application/x-elc', 'elc'],\n ['application/x-envoy', ['env', 'evy']],\n ['application/x-esrehber', 'es'],\n ['application/x-excel', ['xls', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],\n ['application/x-font-bdf', 'bdf'],\n ['application/x-font-ghostscript', 'gsf'],\n ['application/x-font-linux-psf', 'psf'],\n ['application/x-font-otf', 'otf'],\n ['application/x-font-pcf', 'pcf'],\n ['application/x-font-snf', 'snf'],\n ['application/x-font-ttf', 'ttf'],\n ['application/x-font-type1', 'pfa'],\n ['application/x-font-woff', 'woff'],\n ['application/x-frame', 'mif'],\n ['application/x-freelance', 'pre'],\n ['application/x-futuresplash', 'spl'],\n ['application/x-gnumeric', 'gnumeric'],\n ['application/x-gsp', 'gsp'],\n ['application/x-gss', 'gss'],\n ['application/x-gtar', 'gtar'],\n ['application/x-gzip', ['gz', 'gzip']],\n ['application/x-hdf', 'hdf'],\n ['application/x-helpfile', ['help', 'hlp']],\n ['application/x-httpd-imap', 'imap'],\n ['application/x-ima', 'ima'],\n ['application/x-internet-signup', ['ins', 'isp']],\n ['application/x-internett-signup', 'ins'],\n ['application/x-inventor', 'iv'],\n ['application/x-ip2', 'ip'],\n ['application/x-iphone', 'iii'],\n ['application/x-java-class', 'class'],\n ['application/x-java-commerce', 'jcm'],\n ['application/x-java-jnlp-file', 'jnlp'],\n ['application/x-javascript', 'js'],\n ['application/x-koan', ['skd', 'skm', 'skp', 'skt']],\n ['application/x-ksh', 'ksh'],\n ['application/x-latex', ['latex', 'ltx']],\n ['application/x-lha', 'lha'],\n ['application/x-lisp', 'lsp'],\n ['application/x-livescreen', 'ivy'],\n ['application/x-lotus', 'wq1'],\n ['application/x-lotusscreencam', 'scm'],\n ['application/x-lzh', 'lzh'],\n ['application/x-lzx', 'lzx'],\n ['application/x-mac-binhex40', 'hqx'],\n ['application/x-macbinary', 'bin'],\n ['application/x-magic-cap-package-1.0', 'mc$'],\n ['application/x-mathcad', 'mcd'],\n ['application/x-meme', 'mm'],\n ['application/x-midi', ['mid', 'midi']],\n ['application/x-mif', 'mif'],\n ['application/x-mix-transfer', 'nix'],\n ['application/x-mobipocket-ebook', 'prc'],\n ['application/x-mplayer2', 'asx'],\n ['application/x-ms-application', 'application'],\n ['application/x-ms-wmd', 'wmd'],\n ['application/x-ms-wmz', 'wmz'],\n ['application/x-ms-xbap', 'xbap'],\n ['application/x-msaccess', 'mdb'],\n ['application/x-msbinder', 'obd'],\n ['application/x-mscardfile', 'crd'],\n ['application/x-msclip', 'clp'],\n ['application/x-msdownload', ['exe', 'dll']],\n ['application/x-msexcel', ['xls', 'xla', 'xlw']],\n ['application/x-msmediaview', ['mvb', 'm13', 'm14']],\n ['application/x-msmetafile', 'wmf'],\n ['application/x-msmoney', 'mny'],\n ['application/x-mspowerpoint', 'ppt'],\n ['application/x-mspublisher', 'pub'],\n ['application/x-msschedule', 'scd'],\n ['application/x-msterminal', 'trm'],\n ['application/x-mswrite', 'wri'],\n ['application/x-navi-animation', 'ani'],\n ['application/x-navidoc', 'nvd'],\n ['application/x-navimap', 'map'],\n ['application/x-navistyle', 'stl'],\n ['application/x-netcdf', ['cdf', 'nc']],\n ['application/x-newton-compatible-pkg', 'pkg'],\n ['application/x-nokia-9000-communicator-add-on-software', 'aos'],\n ['application/x-omc', 'omc'],\n ['application/x-omcdatamaker', 'omcd'],\n ['application/x-omcregerator', 'omcr'],\n ['application/x-pagemaker', ['pm4', 'pm5']],\n ['application/x-pcl', 'pcl'],\n ['application/x-perfmon', ['pma', 'pmc', 'pml', 'pmr', 'pmw']],\n ['application/x-pixclscript', 'plx'],\n ['application/x-pkcs10', 'p10'],\n ['application/x-pkcs12', ['p12', 'pfx']],\n ['application/x-pkcs7-certificates', ['p7b', 'spc']],\n ['application/x-pkcs7-certreqresp', 'p7r'],\n ['application/x-pkcs7-mime', ['p7m', 'p7c']],\n ['application/x-pkcs7-signature', ['p7s', 'p7a']],\n ['application/x-pointplus', 'css'],\n ['application/x-portable-anymap', 'pnm'],\n ['application/x-project', ['mpc', 'mpt', 'mpv', 'mpx']],\n ['application/x-qpro', 'wb1'],\n ['application/x-rar-compressed', 'rar'],\n ['application/x-rtf', 'rtf'],\n ['application/x-sdp', 'sdp'],\n ['application/x-sea', 'sea'],\n ['application/x-seelogo', 'sl'],\n ['application/x-sh', 'sh'],\n ['application/x-shar', ['shar', 'sh']],\n ['application/x-shockwave-flash', 'swf'],\n ['application/x-silverlight-app', 'xap'],\n ['application/x-sit', 'sit'],\n ['application/x-sprite', ['spr', 'sprite']],\n ['application/x-stuffit', 'sit'],\n ['application/x-stuffitx', 'sitx'],\n ['application/x-sv4cpio', 'sv4cpio'],\n ['application/x-sv4crc', 'sv4crc'],\n ['application/x-tar', 'tar'],\n ['application/x-tbook', ['sbk', 'tbk']],\n ['application/x-tcl', 'tcl'],\n ['application/x-tex', 'tex'],\n ['application/x-tex-tfm', 'tfm'],\n ['application/x-texinfo', ['texi', 'texinfo']],\n ['application/x-troff', ['roff', 't', 'tr']],\n ['application/x-troff-man', 'man'],\n ['application/x-troff-me', 'me'],\n ['application/x-troff-ms', 'ms'],\n ['application/x-troff-msvideo', 'avi'],\n ['application/x-ustar', 'ustar'],\n ['application/x-visio', ['vsd', 'vst', 'vsw']],\n ['application/x-vnd.audioexplosion.mzz', 'mzz'],\n ['application/x-vnd.ls-xpix', 'xpix'],\n ['application/x-vrml', 'vrml'],\n ['application/x-wais-source', ['src', 'wsrc']],\n ['application/x-winhelp', 'hlp'],\n ['application/x-wintalk', 'wtk'],\n ['application/x-world', ['wrl', 'svr']],\n ['application/x-wpwin', 'wpd'],\n ['application/x-wri', 'wri'],\n ['application/x-x509-ca-cert', ['cer', 'crt', 'der']],\n ['application/x-x509-user-cert', 'crt'],\n ['application/x-xfig', 'fig'],\n ['application/x-xpinstall', 'xpi'],\n ['application/x-zip-compressed', 'zip'],\n ['application/xcap-diff+xml', 'xdf'],\n ['application/xenc+xml', 'xenc'],\n ['application/xhtml+xml', 'xhtml'],\n ['application/xml', 'xml'],\n ['application/xml-dtd', 'dtd'],\n ['application/xop+xml', 'xop'],\n ['application/xslt+xml', 'xslt'],\n ['application/xspf+xml', 'xspf'],\n ['application/xv+xml', 'mxml'],\n ['application/yang', 'yang'],\n ['application/yin+xml', 'yin'],\n ['application/ynd.ms-pkipko', 'pko'],\n ['application/zip', 'zip'],\n ['audio/adpcm', 'adp'],\n ['audio/aiff', ['aiff', 'aif', 'aifc']],\n ['audio/basic', ['snd', 'au']],\n ['audio/it', 'it'],\n ['audio/make', ['funk', 'my', 'pfunk']],\n ['audio/make.my.funk', 'pfunk'],\n ['audio/mid', ['mid', 'rmi']],\n ['audio/midi', ['midi', 'kar', 'mid']],\n ['audio/mod', 'mod'],\n ['audio/mp4', 'mp4a'],\n ['audio/mpeg', ['mpga', 'mp3', 'm2a', 'mp2', 'mpa', 'mpg']],\n ['audio/mpeg3', 'mp3'],\n ['audio/nspaudio', ['la', 'lma']],\n ['audio/ogg', 'oga'],\n ['audio/s3m', 's3m'],\n ['audio/tsp-audio', 'tsi'],\n ['audio/tsplayer', 'tsp'],\n ['audio/vnd.dece.audio', 'uva'],\n ['audio/vnd.digital-winds', 'eol'],\n ['audio/vnd.dra', 'dra'],\n ['audio/vnd.dts', 'dts'],\n ['audio/vnd.dts.hd', 'dtshd'],\n ['audio/vnd.lucent.voice', 'lvp'],\n ['audio/vnd.ms-playready.media.pya', 'pya'],\n ['audio/vnd.nuera.ecelp4800', 'ecelp4800'],\n ['audio/vnd.nuera.ecelp7470', 'ecelp7470'],\n ['audio/vnd.nuera.ecelp9600', 'ecelp9600'],\n ['audio/vnd.qcelp', 'qcp'],\n ['audio/vnd.rip', 'rip'],\n ['audio/voc', 'voc'],\n ['audio/voxware', 'vox'],\n ['audio/wav', 'wav'],\n ['audio/webm', 'weba'],\n ['audio/x-aac', 'aac'],\n ['audio/x-adpcm', 'snd'],\n ['audio/x-aiff', ['aiff', 'aif', 'aifc']],\n ['audio/x-au', 'au'],\n ['audio/x-gsm', ['gsd', 'gsm']],\n ['audio/x-jam', 'jam'],\n ['audio/x-liveaudio', 'lam'],\n ['audio/x-mid', ['mid', 'midi']],\n ['audio/x-midi', ['midi', 'mid']],\n ['audio/x-mod', 'mod'],\n ['audio/x-mpeg', 'mp2'],\n ['audio/x-mpeg-3', 'mp3'],\n ['audio/x-mpegurl', 'm3u'],\n ['audio/x-mpequrl', 'm3u'],\n ['audio/x-ms-wax', 'wax'],\n ['audio/x-ms-wma', 'wma'],\n ['audio/x-nspaudio', ['la', 'lma']],\n ['audio/x-pn-realaudio', ['ra', 'ram', 'rm', 'rmm', 'rmp']],\n ['audio/x-pn-realaudio-plugin', ['ra', 'rmp', 'rpm']],\n ['audio/x-psid', 'sid'],\n ['audio/x-realaudio', 'ra'],\n ['audio/x-twinvq', 'vqf'],\n ['audio/x-twinvq-plugin', ['vqe', 'vql']],\n ['audio/x-vnd.audioexplosion.mjuicemediafile', 'mjf'],\n ['audio/x-voc', 'voc'],\n ['audio/x-wav', 'wav'],\n ['audio/xm', 'xm'],\n ['chemical/x-cdx', 'cdx'],\n ['chemical/x-cif', 'cif'],\n ['chemical/x-cmdf', 'cmdf'],\n ['chemical/x-cml', 'cml'],\n ['chemical/x-csml', 'csml'],\n ['chemical/x-pdb', ['pdb', 'xyz']],\n ['chemical/x-xyz', 'xyz'],\n ['drawing/x-dwf', 'dwf'],\n ['i-world/i-vrml', 'ivr'],\n ['image/bmp', ['bmp', 'bm']],\n ['image/cgm', 'cgm'],\n ['image/cis-cod', 'cod'],\n ['image/cmu-raster', ['ras', 'rast']],\n ['image/fif', 'fif'],\n ['image/florian', ['flo', 'turbot']],\n ['image/g3fax', 'g3'],\n ['image/gif', 'gif'],\n ['image/ief', ['ief', 'iefs']],\n ['image/jpeg', ['jpeg', 'jpe', 'jpg', 'jfif', 'jfif-tbnl']],\n ['image/jutvision', 'jut'],\n ['image/ktx', 'ktx'],\n ['image/naplps', ['nap', 'naplps']],\n ['image/pict', ['pic', 'pict']],\n ['image/pipeg', 'jfif'],\n ['image/pjpeg', ['jfif', 'jpe', 'jpeg', 'jpg']],\n ['image/png', ['png', 'x-png']],\n ['image/prs.btif', 'btif'],\n ['image/svg+xml', 'svg'],\n ['image/tiff', ['tif', 'tiff']],\n ['image/vasa', 'mcf'],\n ['image/vnd.adobe.photoshop', 'psd'],\n ['image/vnd.dece.graphic', 'uvi'],\n ['image/vnd.djvu', 'djvu'],\n ['image/vnd.dvb.subtitle', 'sub'],\n ['image/vnd.dwg', ['dwg', 'dxf', 'svf']],\n ['image/vnd.dxf', 'dxf'],\n ['image/vnd.fastbidsheet', 'fbs'],\n ['image/vnd.fpx', 'fpx'],\n ['image/vnd.fst', 'fst'],\n ['image/vnd.fujixerox.edmics-mmr', 'mmr'],\n ['image/vnd.fujixerox.edmics-rlc', 'rlc'],\n ['image/vnd.ms-modi', 'mdi'],\n ['image/vnd.net-fpx', ['fpx', 'npx']],\n ['image/vnd.rn-realflash', 'rf'],\n ['image/vnd.rn-realpix', 'rp'],\n ['image/vnd.wap.wbmp', 'wbmp'],\n ['image/vnd.xiff', 'xif'],\n ['image/webp', 'webp'],\n ['image/x-cmu-raster', 'ras'],\n ['image/x-cmx', 'cmx'],\n ['image/x-dwg', ['dwg', 'dxf', 'svf']],\n ['image/x-freehand', 'fh'],\n ['image/x-icon', 'ico'],\n ['image/x-jg', 'art'],\n ['image/x-jps', 'jps'],\n ['image/x-niff', ['niff', 'nif']],\n ['image/x-pcx', 'pcx'],\n ['image/x-pict', ['pct', 'pic']],\n ['image/x-portable-anymap', 'pnm'],\n ['image/x-portable-bitmap', 'pbm'],\n ['image/x-portable-graymap', 'pgm'],\n ['image/x-portable-greymap', 'pgm'],\n ['image/x-portable-pixmap', 'ppm'],\n ['image/x-quicktime', ['qif', 'qti', 'qtif']],\n ['image/x-rgb', 'rgb'],\n ['image/x-tiff', ['tif', 'tiff']],\n ['image/x-windows-bmp', 'bmp'],\n ['image/x-xbitmap', 'xbm'],\n ['image/x-xbm', 'xbm'],\n ['image/x-xpixmap', ['xpm', 'pm']],\n ['image/x-xwd', 'xwd'],\n ['image/x-xwindowdump', 'xwd'],\n ['image/xbm', 'xbm'],\n ['image/xpm', 'xpm'],\n ['message/rfc822', ['eml', 'mht', 'mhtml', 'nws', 'mime']],\n ['model/iges', ['iges', 'igs']],\n ['model/mesh', 'msh'],\n ['model/vnd.collada+xml', 'dae'],\n ['model/vnd.dwf', 'dwf'],\n ['model/vnd.gdl', 'gdl'],\n ['model/vnd.gtw', 'gtw'],\n ['model/vnd.mts', 'mts'],\n ['model/vnd.vtu', 'vtu'],\n ['model/vrml', ['vrml', 'wrl', 'wrz']],\n ['model/x-pov', 'pov'],\n ['multipart/x-gzip', 'gzip'],\n ['multipart/x-ustar', 'ustar'],\n ['multipart/x-zip', 'zip'],\n ['music/crescendo', ['mid', 'midi']],\n ['music/x-karaoke', 'kar'],\n ['paleovu/x-pv', 'pvu'],\n ['text/asp', 'asp'],\n ['text/calendar', 'ics'],\n ['text/css', 'css'],\n ['text/csv', 'csv'],\n ['text/ecmascript', 'js'],\n ['text/h323', '323'],\n ['text/html', ['html', 'htm', 'stm', 'acgi', 'htmls', 'htx', 'shtml']],\n ['text/iuls', 'uls'],\n ['text/javascript', 'js'],\n ['text/mcf', 'mcf'],\n ['text/n3', 'n3'],\n ['text/pascal', 'pas'],\n [\n 'text/plain',\n [\n 'txt',\n 'bas',\n 'c',\n 'h',\n 'c++',\n 'cc',\n 'com',\n 'conf',\n 'cxx',\n 'def',\n 'f',\n 'f90',\n 'for',\n 'g',\n 'hh',\n 'idc',\n 'jav',\n 'java',\n 'list',\n 'log',\n 'lst',\n 'm',\n 'mar',\n 'pl',\n 'sdml',\n 'text'\n ]\n ],\n ['text/plain-bas', 'par'],\n ['text/prs.lines.tag', 'dsc'],\n ['text/richtext', ['rtx', 'rt', 'rtf']],\n ['text/scriplet', 'wsc'],\n ['text/scriptlet', 'sct'],\n ['text/sgml', ['sgm', 'sgml']],\n ['text/tab-separated-values', 'tsv'],\n ['text/troff', 't'],\n ['text/turtle', 'ttl'],\n ['text/uri-list', ['uni', 'unis', 'uri', 'uris']],\n ['text/vnd.abc', 'abc'],\n ['text/vnd.curl', 'curl'],\n ['text/vnd.curl.dcurl', 'dcurl'],\n ['text/vnd.curl.mcurl', 'mcurl'],\n ['text/vnd.curl.scurl', 'scurl'],\n ['text/vnd.fly', 'fly'],\n ['text/vnd.fmi.flexstor', 'flx'],\n ['text/vnd.graphviz', 'gv'],\n ['text/vnd.in3d.3dml', '3dml'],\n ['text/vnd.in3d.spot', 'spot'],\n ['text/vnd.rn-realtext', 'rt'],\n ['text/vnd.sun.j2me.app-descriptor', 'jad'],\n ['text/vnd.wap.wml', 'wml'],\n ['text/vnd.wap.wmlscript', 'wmls'],\n ['text/webviewhtml', 'htt'],\n ['text/x-asm', ['asm', 's']],\n ['text/x-audiosoft-intra', 'aip'],\n ['text/x-c', ['c', 'cc', 'cpp']],\n ['text/x-component', 'htc'],\n ['text/x-fortran', ['for', 'f', 'f77', 'f90']],\n ['text/x-h', ['h', 'hh']],\n ['text/x-java-source', ['java', 'jav']],\n ['text/x-java-source,java', 'java'],\n ['text/x-la-asf', 'lsx'],\n ['text/x-m', 'm'],\n ['text/x-pascal', 'p'],\n ['text/x-script', 'hlb'],\n ['text/x-script.csh', 'csh'],\n ['text/x-script.elisp', 'el'],\n ['text/x-script.guile', 'scm'],\n ['text/x-script.ksh', 'ksh'],\n ['text/x-script.lisp', 'lsp'],\n ['text/x-script.perl', 'pl'],\n ['text/x-script.perl-module', 'pm'],\n ['text/x-script.phyton', 'py'],\n ['text/x-script.rexx', 'rexx'],\n ['text/x-script.scheme', 'scm'],\n ['text/x-script.sh', 'sh'],\n ['text/x-script.tcl', 'tcl'],\n ['text/x-script.tcsh', 'tcsh'],\n ['text/x-script.zsh', 'zsh'],\n ['text/x-server-parsed-html', ['shtml', 'ssi']],\n ['text/x-setext', 'etx'],\n ['text/x-sgml', ['sgm', 'sgml']],\n ['text/x-speech', ['spc', 'talk']],\n ['text/x-uil', 'uil'],\n ['text/x-uuencode', ['uu', 'uue']],\n ['text/x-vcalendar', 'vcs'],\n ['text/x-vcard', 'vcf'],\n ['text/xml', 'xml'],\n ['video/3gpp', '3gp'],\n ['video/3gpp2', '3g2'],\n ['video/animaflex', 'afl'],\n ['video/avi', 'avi'],\n ['video/avs-video', 'avs'],\n ['video/dl', 'dl'],\n ['video/fli', 'fli'],\n ['video/gl', 'gl'],\n ['video/h261', 'h261'],\n ['video/h263', 'h263'],\n ['video/h264', 'h264'],\n ['video/jpeg', 'jpgv'],\n ['video/jpm', 'jpm'],\n ['video/mj2', 'mj2'],\n ['video/mp4', 'mp4'],\n ['video/mpeg', ['mpeg', 'mp2', 'mpa', 'mpe', 'mpg', 'mpv2', 'm1v', 'm2v', 'mp3']],\n ['video/msvideo', 'avi'],\n ['video/ogg', 'ogv'],\n ['video/quicktime', ['mov', 'qt', 'moov']],\n ['video/vdo', 'vdo'],\n ['video/vivo', ['viv', 'vivo']],\n ['video/vnd.dece.hd', 'uvh'],\n ['video/vnd.dece.mobile', 'uvm'],\n ['video/vnd.dece.pd', 'uvp'],\n ['video/vnd.dece.sd', 'uvs'],\n ['video/vnd.dece.video', 'uvv'],\n ['video/vnd.fvt', 'fvt'],\n ['video/vnd.mpegurl', 'mxu'],\n ['video/vnd.ms-playready.media.pyv', 'pyv'],\n ['video/vnd.rn-realvideo', 'rv'],\n ['video/vnd.uvvu.mp4', 'uvu'],\n ['video/vnd.vivo', ['viv', 'vivo']],\n ['video/vosaic', 'vos'],\n ['video/webm', 'webm'],\n ['video/x-amt-demorun', 'xdr'],\n ['video/x-amt-showrun', 'xsr'],\n ['video/x-atomic3d-feature', 'fmf'],\n ['video/x-dl', 'dl'],\n ['video/x-dv', ['dif', 'dv']],\n ['video/x-f4v', 'f4v'],\n ['video/x-fli', 'fli'],\n ['video/x-flv', 'flv'],\n ['video/x-gl', 'gl'],\n ['video/x-isvideo', 'isu'],\n ['video/x-la-asf', ['lsf', 'lsx']],\n ['video/x-m4v', 'm4v'],\n ['video/x-motion-jpeg', 'mjpg'],\n ['video/x-mpeg', ['mp3', 'mp2']],\n ['video/x-mpeq2a', 'mp2'],\n ['video/x-ms-asf', ['asf', 'asr', 'asx']],\n ['video/x-ms-asf-plugin', 'asx'],\n ['video/x-ms-wm', 'wm'],\n ['video/x-ms-wmv', 'wmv'],\n ['video/x-ms-wmx', 'wmx'],\n ['video/x-ms-wvx', 'wvx'],\n ['video/x-msvideo', 'avi'],\n ['video/x-qtc', 'qtc'],\n ['video/x-scm', 'scm'],\n ['video/x-sgi-movie', ['movie', 'mv']],\n ['windows/metafile', 'wmf'],\n ['www/mime', 'mime'],\n ['x-conference/x-cooltalk', 'ice'],\n ['x-music/x-midi', ['mid', 'midi']],\n ['x-world/x-3dmf', ['3dm', '3dmf', 'qd3', 'qd3d']],\n ['x-world/x-svr', 'svr'],\n ['x-world/x-vrml', ['flr', 'vrml', 'wrl', 'wrz', 'xaf', 'xof']],\n ['x-world/x-vrt', 'vrt'],\n ['xgl/drawing', 'xgz'],\n ['xgl/movie', 'xmz']\n]);\nconst extensions = new Map([\n ['123', 'application/vnd.lotus-1-2-3'],\n ['323', 'text/h323'],\n ['*', 'application/octet-stream'],\n ['3dm', 'x-world/x-3dmf'],\n ['3dmf', 'x-world/x-3dmf'],\n ['3dml', 'text/vnd.in3d.3dml'],\n ['3g2', 'video/3gpp2'],\n ['3gp', 'video/3gpp'],\n ['7z', 'application/x-7z-compressed'],\n ['a', 'application/octet-stream'],\n ['aab', 'application/x-authorware-bin'],\n ['aac', 'audio/x-aac'],\n ['aam', 'application/x-authorware-map'],\n ['aas', 'application/x-authorware-seg'],\n ['abc', 'text/vnd.abc'],\n ['abw', 'application/x-abiword'],\n ['ac', 'application/pkix-attr-cert'],\n ['acc', 'application/vnd.americandynamics.acc'],\n ['ace', 'application/x-ace-compressed'],\n ['acgi', 'text/html'],\n ['acu', 'application/vnd.acucobol'],\n ['acx', 'application/internet-property-stream'],\n ['adp', 'audio/adpcm'],\n ['aep', 'application/vnd.audiograph'],\n ['afl', 'video/animaflex'],\n ['afp', 'application/vnd.ibm.modcap'],\n ['ahead', 'application/vnd.ahead.space'],\n ['ai', 'application/postscript'],\n ['aif', ['audio/aiff', 'audio/x-aiff']],\n ['aifc', ['audio/aiff', 'audio/x-aiff']],\n ['aiff', ['audio/aiff', 'audio/x-aiff']],\n ['aim', 'application/x-aim'],\n ['aip', 'text/x-audiosoft-intra'],\n ['air', 'application/vnd.adobe.air-application-installer-package+zip'],\n ['ait', 'application/vnd.dvb.ait'],\n ['ami', 'application/vnd.amiga.ami'],\n ['ani', 'application/x-navi-animation'],\n ['aos', 'application/x-nokia-9000-communicator-add-on-software'],\n ['apk', 'application/vnd.android.package-archive'],\n ['application', 'application/x-ms-application'],\n ['apr', 'application/vnd.lotus-approach'],\n ['aps', 'application/mime'],\n ['arc', 'application/octet-stream'],\n ['arj', ['application/arj', 'application/octet-stream']],\n ['art', 'image/x-jg'],\n ['asf', 'video/x-ms-asf'],\n ['asm', 'text/x-asm'],\n ['aso', 'application/vnd.accpac.simply.aso'],\n ['asp', 'text/asp'],\n ['asr', 'video/x-ms-asf'],\n ['asx', ['video/x-ms-asf', 'application/x-mplayer2', 'video/x-ms-asf-plugin']],\n ['atc', 'application/vnd.acucorp'],\n ['atomcat', 'application/atomcat+xml'],\n ['atomsvc', 'application/atomsvc+xml'],\n ['atx', 'application/vnd.antix.game-component'],\n ['au', ['audio/basic', 'audio/x-au']],\n ['avi', ['video/avi', 'video/msvideo', 'application/x-troff-msvideo', 'video/x-msvideo']],\n ['avs', 'video/avs-video'],\n ['aw', 'application/applixware'],\n ['axs', 'application/olescript'],\n ['azf', 'application/vnd.airzip.filesecure.azf'],\n ['azs', 'application/vnd.airzip.filesecure.azs'],\n ['azw', 'application/vnd.amazon.ebook'],\n ['bas', 'text/plain'],\n ['bcpio', 'application/x-bcpio'],\n ['bdf', 'application/x-font-bdf'],\n ['bdm', 'application/vnd.syncml.dm+wbxml'],\n ['bed', 'application/vnd.realvnc.bed'],\n ['bh2', 'application/vnd.fujitsu.oasysprs'],\n ['bin', ['application/octet-stream', 'application/mac-binary', 'application/macbinary', 'application/x-macbinary', 'application/x-binary']],\n ['bm', 'image/bmp'],\n ['bmi', 'application/vnd.bmi'],\n ['bmp', ['image/bmp', 'image/x-windows-bmp']],\n ['boo', 'application/book'],\n ['book', 'application/book'],\n ['box', 'application/vnd.previewsystems.box'],\n ['boz', 'application/x-bzip2'],\n ['bsh', 'application/x-bsh'],\n ['btif', 'image/prs.btif'],\n ['bz', 'application/x-bzip'],\n ['bz2', 'application/x-bzip2'],\n ['c', ['text/plain', 'text/x-c']],\n ['c++', 'text/plain'],\n ['c11amc', 'application/vnd.cluetrust.cartomobile-config'],\n ['c11amz', 'application/vnd.cluetrust.cartomobile-config-pkg'],\n ['c4g', 'application/vnd.clonk.c4group'],\n ['cab', 'application/vnd.ms-cab-compressed'],\n ['car', 'application/vnd.curl.car'],\n ['cat', ['application/vnd.ms-pkiseccat', 'application/vnd.ms-pki.seccat']],\n ['cc', ['text/plain', 'text/x-c']],\n ['ccad', 'application/clariscad'],\n ['cco', 'application/x-cocoa'],\n ['ccxml', 'application/ccxml+xml,'],\n ['cdbcmsg', 'application/vnd.contact.cmsg'],\n ['cdf', ['application/cdf', 'application/x-cdf', 'application/x-netcdf']],\n ['cdkey', 'application/vnd.mediastation.cdkey'],\n ['cdmia', 'application/cdmi-capability'],\n ['cdmic', 'application/cdmi-container'],\n ['cdmid', 'application/cdmi-domain'],\n ['cdmio', 'application/cdmi-object'],\n ['cdmiq', 'application/cdmi-queue'],\n ['cdx', 'chemical/x-cdx'],\n ['cdxml', 'application/vnd.chemdraw+xml'],\n ['cdy', 'application/vnd.cinderella'],\n ['cer', ['application/pkix-cert', 'application/x-x509-ca-cert']],\n ['cgm', 'image/cgm'],\n ['cha', 'application/x-chat'],\n ['chat', 'application/x-chat'],\n ['chm', 'application/vnd.ms-htmlhelp'],\n ['chrt', 'application/vnd.kde.kchart'],\n ['cif', 'chemical/x-cif'],\n ['cii', 'application/vnd.anser-web-certificate-issue-initiation'],\n ['cil', 'application/vnd.ms-artgalry'],\n ['cla', 'application/vnd.claymore'],\n ['class', ['application/octet-stream', 'application/java', 'application/java-byte-code', 'application/java-vm', 'application/x-java-class']],\n ['clkk', 'application/vnd.crick.clicker.keyboard'],\n ['clkp', 'application/vnd.crick.clicker.palette'],\n ['clkt', 'application/vnd.crick.clicker.template'],\n ['clkw', 'application/vnd.crick.clicker.wordbank'],\n ['clkx', 'application/vnd.crick.clicker'],\n ['clp', 'application/x-msclip'],\n ['cmc', 'application/vnd.cosmocaller'],\n ['cmdf', 'chemical/x-cmdf'],\n ['cml', 'chemical/x-cml'],\n ['cmp', 'application/vnd.yellowriver-custom-menu'],\n ['cmx', 'image/x-cmx'],\n ['cod', ['image/cis-cod', 'application/vnd.rim.cod']],\n ['com', ['application/octet-stream', 'text/plain']],\n ['conf', 'text/plain'],\n ['cpio', 'application/x-cpio'],\n ['cpp', 'text/x-c'],\n ['cpt', ['application/mac-compactpro', 'application/x-compactpro', 'application/x-cpt']],\n ['crd', 'application/x-mscardfile'],\n ['crl', ['application/pkix-crl', 'application/pkcs-crl']],\n ['crt', ['application/pkix-cert', 'application/x-x509-user-cert', 'application/x-x509-ca-cert']],\n ['cryptonote', 'application/vnd.rig.cryptonote'],\n ['csh', ['text/x-script.csh', 'application/x-csh']],\n ['csml', 'chemical/x-csml'],\n ['csp', 'application/vnd.commonspace'],\n ['css', ['text/css', 'application/x-pointplus']],\n ['csv', 'text/csv'],\n ['cu', 'application/cu-seeme'],\n ['curl', 'text/vnd.curl'],\n ['cww', 'application/prs.cww'],\n ['cxx', 'text/plain'],\n ['dae', 'model/vnd.collada+xml'],\n ['daf', 'application/vnd.mobius.daf'],\n ['davmount', 'application/davmount+xml'],\n ['dcr', 'application/x-director'],\n ['dcurl', 'text/vnd.curl.dcurl'],\n ['dd2', 'application/vnd.oma.dd2+xml'],\n ['ddd', 'application/vnd.fujixerox.ddd'],\n ['deb', 'application/x-debian-package'],\n ['deepv', 'application/x-deepv'],\n ['def', 'text/plain'],\n ['der', 'application/x-x509-ca-cert'],\n ['dfac', 'application/vnd.dreamfactory'],\n ['dif', 'video/x-dv'],\n ['dir', 'application/x-director'],\n ['dis', 'application/vnd.mobius.dis'],\n ['djvu', 'image/vnd.djvu'],\n ['dl', ['video/dl', 'video/x-dl']],\n ['dll', 'application/x-msdownload'],\n ['dms', 'application/octet-stream'],\n ['dna', 'application/vnd.dna'],\n ['doc', 'application/msword'],\n ['docm', 'application/vnd.ms-word.document.macroenabled.12'],\n ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],\n ['dot', 'application/msword'],\n ['dotm', 'application/vnd.ms-word.template.macroenabled.12'],\n ['dotx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'],\n ['dp', ['application/commonground', 'application/vnd.osgi.dp']],\n ['dpg', 'application/vnd.dpgraph'],\n ['dra', 'audio/vnd.dra'],\n ['drw', 'application/drafting'],\n ['dsc', 'text/prs.lines.tag'],\n ['dssc', 'application/dssc+der'],\n ['dtb', 'application/x-dtbook+xml'],\n ['dtd', 'application/xml-dtd'],\n ['dts', 'audio/vnd.dts'],\n ['dtshd', 'audio/vnd.dts.hd'],\n ['dump', 'application/octet-stream'],\n ['dv', 'video/x-dv'],\n ['dvi', 'application/x-dvi'],\n ['dwf', ['model/vnd.dwf', 'drawing/x-dwf']],\n ['dwg', ['application/acad', 'image/vnd.dwg', 'image/x-dwg']],\n ['dxf', ['application/dxf', 'image/vnd.dwg', 'image/vnd.dxf', 'image/x-dwg']],\n ['dxp', 'application/vnd.spotfire.dxp'],\n ['dxr', 'application/x-director'],\n ['ecelp4800', 'audio/vnd.nuera.ecelp4800'],\n ['ecelp7470', 'audio/vnd.nuera.ecelp7470'],\n ['ecelp9600', 'audio/vnd.nuera.ecelp9600'],\n ['edm', 'application/vnd.novadigm.edm'],\n ['edx', 'application/vnd.novadigm.edx'],\n ['efif', 'application/vnd.picsel'],\n ['ei6', 'application/vnd.pg.osasli'],\n ['el', 'text/x-script.elisp'],\n ['elc', ['application/x-elc', 'application/x-bytecode.elisp']],\n ['eml', 'message/rfc822'],\n ['emma', 'application/emma+xml'],\n ['env', 'application/x-envoy'],\n ['eol', 'audio/vnd.digital-winds'],\n ['eot', 'application/vnd.ms-fontobject'],\n ['eps', 'application/postscript'],\n ['epub', 'application/epub+zip'],\n ['es', ['application/ecmascript', 'application/x-esrehber']],\n ['es3', 'application/vnd.eszigno3+xml'],\n ['esf', 'application/vnd.epson.esf'],\n ['etx', 'text/x-setext'],\n ['evy', ['application/envoy', 'application/x-envoy']],\n ['exe', ['application/octet-stream', 'application/x-msdownload']],\n ['exi', 'application/exi'],\n ['ext', 'application/vnd.novadigm.ext'],\n ['ez2', 'application/vnd.ezpix-album'],\n ['ez3', 'application/vnd.ezpix-package'],\n ['f', ['text/plain', 'text/x-fortran']],\n ['f4v', 'video/x-f4v'],\n ['f77', 'text/x-fortran'],\n ['f90', ['text/plain', 'text/x-fortran']],\n ['fbs', 'image/vnd.fastbidsheet'],\n ['fcs', 'application/vnd.isac.fcs'],\n ['fdf', 'application/vnd.fdf'],\n ['fe_launch', 'application/vnd.denovo.fcselayout-link'],\n ['fg5', 'application/vnd.fujitsu.oasysgp'],\n ['fh', 'image/x-freehand'],\n ['fif', ['application/fractals', 'image/fif']],\n ['fig', 'application/x-xfig'],\n ['fli', ['video/fli', 'video/x-fli']],\n ['flo', ['image/florian', 'application/vnd.micrografx.flo']],\n ['flr', 'x-world/x-vrml'],\n ['flv', 'video/x-flv'],\n ['flw', 'application/vnd.kde.kivio'],\n ['flx', 'text/vnd.fmi.flexstor'],\n ['fly', 'text/vnd.fly'],\n ['fm', 'application/vnd.framemaker'],\n ['fmf', 'video/x-atomic3d-feature'],\n ['fnc', 'application/vnd.frogans.fnc'],\n ['for', ['text/plain', 'text/x-fortran']],\n ['fpx', ['image/vnd.fpx', 'image/vnd.net-fpx']],\n ['frl', 'application/freeloader'],\n ['fsc', 'application/vnd.fsc.weblaunch'],\n ['fst', 'image/vnd.fst'],\n ['ftc', 'application/vnd.fluxtime.clip'],\n ['fti', 'application/vnd.anser-web-funds-transfer-initiation'],\n ['funk', 'audio/make'],\n ['fvt', 'video/vnd.fvt'],\n ['fxp', 'application/vnd.adobe.fxp'],\n ['fzs', 'application/vnd.fuzzysheet'],\n ['g', 'text/plain'],\n ['g2w', 'application/vnd.geoplan'],\n ['g3', 'image/g3fax'],\n ['g3w', 'application/vnd.geospace'],\n ['gac', 'application/vnd.groove-account'],\n ['gdl', 'model/vnd.gdl'],\n ['geo', 'application/vnd.dynageo'],\n ['gex', 'application/vnd.geometry-explorer'],\n ['ggb', 'application/vnd.geogebra.file'],\n ['ggt', 'application/vnd.geogebra.tool'],\n ['ghf', 'application/vnd.groove-help'],\n ['gif', 'image/gif'],\n ['gim', 'application/vnd.groove-identity-message'],\n ['gl', ['video/gl', 'video/x-gl']],\n ['gmx', 'application/vnd.gmx'],\n ['gnumeric', 'application/x-gnumeric'],\n ['gph', 'application/vnd.flographit'],\n ['gqf', 'application/vnd.grafeq'],\n ['gram', 'application/srgs'],\n ['grv', 'application/vnd.groove-injector'],\n ['grxml', 'application/srgs+xml'],\n ['gsd', 'audio/x-gsm'],\n ['gsf', 'application/x-font-ghostscript'],\n ['gsm', 'audio/x-gsm'],\n ['gsp', 'application/x-gsp'],\n ['gss', 'application/x-gss'],\n ['gtar', 'application/x-gtar'],\n ['gtm', 'application/vnd.groove-tool-message'],\n ['gtw', 'model/vnd.gtw'],\n ['gv', 'text/vnd.graphviz'],\n ['gxt', 'application/vnd.geonext'],\n ['gz', ['application/x-gzip', 'application/x-compressed']],\n ['gzip', ['multipart/x-gzip', 'application/x-gzip']],\n ['h', ['text/plain', 'text/x-h']],\n ['h261', 'video/h261'],\n ['h263', 'video/h263'],\n ['h264', 'video/h264'],\n ['hal', 'application/vnd.hal+xml'],\n ['hbci', 'application/vnd.hbci'],\n ['hdf', 'application/x-hdf'],\n ['help', 'application/x-helpfile'],\n ['hgl', 'application/vnd.hp-hpgl'],\n ['hh', ['text/plain', 'text/x-h']],\n ['hlb', 'text/x-script'],\n ['hlp', ['application/winhlp', 'application/hlp', 'application/x-helpfile', 'application/x-winhelp']],\n ['hpg', 'application/vnd.hp-hpgl'],\n ['hpgl', 'application/vnd.hp-hpgl'],\n ['hpid', 'application/vnd.hp-hpid'],\n ['hps', 'application/vnd.hp-hps'],\n [\n 'hqx',\n [\n 'application/mac-binhex40',\n 'application/binhex',\n 'application/binhex4',\n 'application/mac-binhex',\n 'application/x-binhex40',\n 'application/x-mac-binhex40'\n ]\n ],\n ['hta', 'application/hta'],\n ['htc', 'text/x-component'],\n ['htke', 'application/vnd.kenameaapp'],\n ['htm', 'text/html'],\n ['html', 'text/html'],\n ['htmls', 'text/html'],\n ['htt', 'text/webviewhtml'],\n ['htx', 'text/html'],\n ['hvd', 'application/vnd.yamaha.hv-dic'],\n ['hvp', 'application/vnd.yamaha.hv-voice'],\n ['hvs', 'application/vnd.yamaha.hv-script'],\n ['i2g', 'application/vnd.intergeo'],\n ['icc', 'application/vnd.iccprofile'],\n ['ice', 'x-conference/x-cooltalk'],\n ['ico', 'image/x-icon'],\n ['ics', 'text/calendar'],\n ['idc', 'text/plain'],\n ['ief', 'image/ief'],\n ['iefs', 'image/ief'],\n ['ifm', 'application/vnd.shana.informed.formdata'],\n ['iges', ['application/iges', 'model/iges']],\n ['igl', 'application/vnd.igloader'],\n ['igm', 'application/vnd.insors.igm'],\n ['igs', ['application/iges', 'model/iges']],\n ['igx', 'application/vnd.micrografx.igx'],\n ['iif', 'application/vnd.shana.informed.interchange'],\n ['iii', 'application/x-iphone'],\n ['ima', 'application/x-ima'],\n ['imap', 'application/x-httpd-imap'],\n ['imp', 'application/vnd.accpac.simply.imp'],\n ['ims', 'application/vnd.ms-ims'],\n ['inf', 'application/inf'],\n ['ins', ['application/x-internet-signup', 'application/x-internett-signup']],\n ['ip', 'application/x-ip2'],\n ['ipfix', 'application/ipfix'],\n ['ipk', 'application/vnd.shana.informed.package'],\n ['irm', 'application/vnd.ibm.rights-management'],\n ['irp', 'application/vnd.irepository.package+xml'],\n ['isp', 'application/x-internet-signup'],\n ['isu', 'video/x-isvideo'],\n ['it', 'audio/it'],\n ['itp', 'application/vnd.shana.informed.formtemplate'],\n ['iv', 'application/x-inventor'],\n ['ivp', 'application/vnd.immervision-ivp'],\n ['ivr', 'i-world/i-vrml'],\n ['ivu', 'application/vnd.immervision-ivu'],\n ['ivy', 'application/x-livescreen'],\n ['jad', 'text/vnd.sun.j2me.app-descriptor'],\n ['jam', ['application/vnd.jam', 'audio/x-jam']],\n ['jar', 'application/java-archive'],\n ['jav', ['text/plain', 'text/x-java-source']],\n ['java', ['text/plain', 'text/x-java-source,java', 'text/x-java-source']],\n ['jcm', 'application/x-java-commerce'],\n ['jfif', ['image/pipeg', 'image/jpeg', 'image/pjpeg']],\n ['jfif-tbnl', 'image/jpeg'],\n ['jisp', 'application/vnd.jisp'],\n ['jlt', 'application/vnd.hp-jlyt'],\n ['jnlp', 'application/x-java-jnlp-file'],\n ['joda', 'application/vnd.joost.joda-archive'],\n ['jpe', ['image/jpeg', 'image/pjpeg']],\n ['jpeg', ['image/jpeg', 'image/pjpeg']],\n ['jpg', ['image/jpeg', 'image/pjpeg']],\n ['jpgv', 'video/jpeg'],\n ['jpm', 'video/jpm'],\n ['jps', 'image/x-jps'],\n ['js', ['application/javascript', 'application/ecmascript', 'text/javascript', 'text/ecmascript', 'application/x-javascript']],\n ['json', 'application/json'],\n ['jut', 'image/jutvision'],\n ['kar', ['audio/midi', 'music/x-karaoke']],\n ['karbon', 'application/vnd.kde.karbon'],\n ['kfo', 'application/vnd.kde.kformula'],\n ['kia', 'application/vnd.kidspiration'],\n ['kml', 'application/vnd.google-earth.kml+xml'],\n ['kmz', 'application/vnd.google-earth.kmz'],\n ['kne', 'application/vnd.kinar'],\n ['kon', 'application/vnd.kde.kontour'],\n ['kpr', 'application/vnd.kde.kpresenter'],\n ['ksh', ['application/x-ksh', 'text/x-script.ksh']],\n ['ksp', 'application/vnd.kde.kspread'],\n ['ktx', 'image/ktx'],\n ['ktz', 'application/vnd.kahootz'],\n ['kwd', 'application/vnd.kde.kword'],\n ['la', ['audio/nspaudio', 'audio/x-nspaudio']],\n ['lam', 'audio/x-liveaudio'],\n ['lasxml', 'application/vnd.las.las+xml'],\n ['latex', 'application/x-latex'],\n ['lbd', 'application/vnd.llamagraphics.life-balance.desktop'],\n ['lbe', 'application/vnd.llamagraphics.life-balance.exchange+xml'],\n ['les', 'application/vnd.hhe.lesson-player'],\n ['lha', ['application/octet-stream', 'application/lha', 'application/x-lha']],\n ['lhx', 'application/octet-stream'],\n ['link66', 'application/vnd.route66.link66+xml'],\n ['list', 'text/plain'],\n ['lma', ['audio/nspaudio', 'audio/x-nspaudio']],\n ['log', 'text/plain'],\n ['lrm', 'application/vnd.ms-lrm'],\n ['lsf', 'video/x-la-asf'],\n ['lsp', ['application/x-lisp', 'text/x-script.lisp']],\n ['lst', 'text/plain'],\n ['lsx', ['video/x-la-asf', 'text/x-la-asf']],\n ['ltf', 'application/vnd.frogans.ltf'],\n ['ltx', 'application/x-latex'],\n ['lvp', 'audio/vnd.lucent.voice'],\n ['lwp', 'application/vnd.lotus-wordpro'],\n ['lzh', ['application/octet-stream', 'application/x-lzh']],\n ['lzx', ['application/lzx', 'application/octet-stream', 'application/x-lzx']],\n ['m', ['text/plain', 'text/x-m']],\n ['m13', 'application/x-msmediaview'],\n ['m14', 'application/x-msmediaview'],\n ['m1v', 'video/mpeg'],\n ['m21', 'application/mp21'],\n ['m2a', 'audio/mpeg'],\n ['m2v', 'video/mpeg'],\n ['m3u', ['audio/x-mpegurl', 'audio/x-mpequrl']],\n ['m3u8', 'application/vnd.apple.mpegurl'],\n ['m4v', 'video/x-m4v'],\n ['ma', 'application/mathematica'],\n ['mads', 'application/mads+xml'],\n ['mag', 'application/vnd.ecowin.chart'],\n ['man', 'application/x-troff-man'],\n ['map', 'application/x-navimap'],\n ['mar', 'text/plain'],\n ['mathml', 'application/mathml+xml'],\n ['mbd', 'application/mbedlet'],\n ['mbk', 'application/vnd.mobius.mbk'],\n ['mbox', 'application/mbox'],\n ['mc$', 'application/x-magic-cap-package-1.0'],\n ['mc1', 'application/vnd.medcalcdata'],\n ['mcd', ['application/mcad', 'application/vnd.mcd', 'application/x-mathcad']],\n ['mcf', ['image/vasa', 'text/mcf']],\n ['mcp', 'application/netmc'],\n ['mcurl', 'text/vnd.curl.mcurl'],\n ['mdb', 'application/x-msaccess'],\n ['mdi', 'image/vnd.ms-modi'],\n ['me', 'application/x-troff-me'],\n ['meta4', 'application/metalink4+xml'],\n ['mets', 'application/mets+xml'],\n ['mfm', 'application/vnd.mfmp'],\n ['mgp', 'application/vnd.osgeo.mapguide.package'],\n ['mgz', 'application/vnd.proteus.magazine'],\n ['mht', 'message/rfc822'],\n ['mhtml', 'message/rfc822'],\n ['mid', ['audio/mid', 'audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],\n ['midi', ['audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],\n ['mif', ['application/vnd.mif', 'application/x-mif', 'application/x-frame']],\n ['mime', ['message/rfc822', 'www/mime']],\n ['mj2', 'video/mj2'],\n ['mjf', 'audio/x-vnd.audioexplosion.mjuicemediafile'],\n ['mjpg', 'video/x-motion-jpeg'],\n ['mlp', 'application/vnd.dolby.mlp'],\n ['mm', ['application/base64', 'application/x-meme']],\n ['mmd', 'application/vnd.chipnuts.karaoke-mmd'],\n ['mme', 'application/base64'],\n ['mmf', 'application/vnd.smaf'],\n ['mmr', 'image/vnd.fujixerox.edmics-mmr'],\n ['mny', 'application/x-msmoney'],\n ['mod', ['audio/mod', 'audio/x-mod']],\n ['mods', 'application/mods+xml'],\n ['moov', 'video/quicktime'],\n ['mov', 'video/quicktime'],\n ['movie', 'video/x-sgi-movie'],\n ['mp2', ['video/mpeg', 'audio/mpeg', 'video/x-mpeg', 'audio/x-mpeg', 'video/x-mpeq2a']],\n ['mp3', ['audio/mpeg', 'audio/mpeg3', 'video/mpeg', 'audio/x-mpeg-3', 'video/x-mpeg']],\n ['mp4', ['video/mp4', 'application/mp4']],\n ['mp4a', 'audio/mp4'],\n ['mpa', ['video/mpeg', 'audio/mpeg']],\n ['mpc', ['application/vnd.mophun.certificate', 'application/x-project']],\n ['mpe', 'video/mpeg'],\n ['mpeg', 'video/mpeg'],\n ['mpg', ['video/mpeg', 'audio/mpeg']],\n ['mpga', 'audio/mpeg'],\n ['mpkg', 'application/vnd.apple.installer+xml'],\n ['mpm', 'application/vnd.blueice.multipass'],\n ['mpn', 'application/vnd.mophun.application'],\n ['mpp', 'application/vnd.ms-project'],\n ['mpt', 'application/x-project'],\n ['mpv', 'application/x-project'],\n ['mpv2', 'video/mpeg'],\n ['mpx', 'application/x-project'],\n ['mpy', 'application/vnd.ibm.minipay'],\n ['mqy', 'application/vnd.mobius.mqy'],\n ['mrc', 'application/marc'],\n ['mrcx', 'application/marcxml+xml'],\n ['ms', 'application/x-troff-ms'],\n ['mscml', 'application/mediaservercontrol+xml'],\n ['mseq', 'application/vnd.mseq'],\n ['msf', 'application/vnd.epson.msf'],\n ['msg', 'application/vnd.ms-outlook'],\n ['msh', 'model/mesh'],\n ['msl', 'application/vnd.mobius.msl'],\n ['msty', 'application/vnd.muvee.style'],\n ['mts', 'model/vnd.mts'],\n ['mus', 'application/vnd.musician'],\n ['musicxml', 'application/vnd.recordare.musicxml+xml'],\n ['mv', 'video/x-sgi-movie'],\n ['mvb', 'application/x-msmediaview'],\n ['mwf', 'application/vnd.mfer'],\n ['mxf', 'application/mxf'],\n ['mxl', 'application/vnd.recordare.musicxml'],\n ['mxml', 'application/xv+xml'],\n ['mxs', 'application/vnd.triscape.mxs'],\n ['mxu', 'video/vnd.mpegurl'],\n ['my', 'audio/make'],\n ['mzz', 'application/x-vnd.audioexplosion.mzz'],\n ['n-gage', 'application/vnd.nokia.n-gage.symbian.install'],\n ['n3', 'text/n3'],\n ['nap', 'image/naplps'],\n ['naplps', 'image/naplps'],\n ['nbp', 'application/vnd.wolfram.player'],\n ['nc', 'application/x-netcdf'],\n ['ncm', 'application/vnd.nokia.configuration-message'],\n ['ncx', 'application/x-dtbncx+xml'],\n ['ngdat', 'application/vnd.nokia.n-gage.data'],\n ['nif', 'image/x-niff'],\n ['niff', 'image/x-niff'],\n ['nix', 'application/x-mix-transfer'],\n ['nlu', 'application/vnd.neurolanguage.nlu'],\n ['nml', 'application/vnd.enliven'],\n ['nnd', 'application/vnd.noblenet-directory'],\n ['nns', 'application/vnd.noblenet-sealer'],\n ['nnw', 'application/vnd.noblenet-web'],\n ['npx', 'image/vnd.net-fpx'],\n ['nsc', 'application/x-conference'],\n ['nsf', 'application/vnd.lotus-notes'],\n ['nvd', 'application/x-navidoc'],\n ['nws', 'message/rfc822'],\n ['o', 'application/octet-stream'],\n ['oa2', 'application/vnd.fujitsu.oasys2'],\n ['oa3', 'application/vnd.fujitsu.oasys3'],\n ['oas', 'application/vnd.fujitsu.oasys'],\n ['obd', 'application/x-msbinder'],\n ['oda', 'application/oda'],\n ['odb', 'application/vnd.oasis.opendocument.database'],\n ['odc', 'application/vnd.oasis.opendocument.chart'],\n ['odf', 'application/vnd.oasis.opendocument.formula'],\n ['odft', 'application/vnd.oasis.opendocument.formula-template'],\n ['odg', 'application/vnd.oasis.opendocument.graphics'],\n ['odi', 'application/vnd.oasis.opendocument.image'],\n ['odm', 'application/vnd.oasis.opendocument.text-master'],\n ['odp', 'application/vnd.oasis.opendocument.presentation'],\n ['ods', 'application/vnd.oasis.opendocument.spreadsheet'],\n ['odt', 'application/vnd.oasis.opendocument.text'],\n ['oga', 'audio/ogg'],\n ['ogv', 'video/ogg'],\n ['ogx', 'application/ogg'],\n ['omc', 'application/x-omc'],\n ['omcd', 'application/x-omcdatamaker'],\n ['omcr', 'application/x-omcregerator'],\n ['onetoc', 'application/onenote'],\n ['opf', 'application/oebps-package+xml'],\n ['org', 'application/vnd.lotus-organizer'],\n ['osf', 'application/vnd.yamaha.openscoreformat'],\n ['osfpvg', 'application/vnd.yamaha.openscoreformat.osfpvg+xml'],\n ['otc', 'application/vnd.oasis.opendocument.chart-template'],\n ['otf', 'application/x-font-otf'],\n ['otg', 'application/vnd.oasis.opendocument.graphics-template'],\n ['oth', 'application/vnd.oasis.opendocument.text-web'],\n ['oti', 'application/vnd.oasis.opendocument.image-template'],\n ['otp', 'application/vnd.oasis.opendocument.presentation-template'],\n ['ots', 'application/vnd.oasis.opendocument.spreadsheet-template'],\n ['ott', 'application/vnd.oasis.opendocument.text-template'],\n ['oxt', 'application/vnd.openofficeorg.extension'],\n ['p', 'text/x-pascal'],\n ['p10', ['application/pkcs10', 'application/x-pkcs10']],\n ['p12', ['application/pkcs-12', 'application/x-pkcs12']],\n ['p7a', 'application/x-pkcs7-signature'],\n ['p7b', 'application/x-pkcs7-certificates'],\n ['p7c', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],\n ['p7m', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],\n ['p7r', 'application/x-pkcs7-certreqresp'],\n ['p7s', ['application/pkcs7-signature', 'application/x-pkcs7-signature']],\n ['p8', 'application/pkcs8'],\n ['par', 'text/plain-bas'],\n ['part', 'application/pro_eng'],\n ['pas', 'text/pascal'],\n ['paw', 'application/vnd.pawaafile'],\n ['pbd', 'application/vnd.powerbuilder6'],\n ['pbm', 'image/x-portable-bitmap'],\n ['pcf', 'application/x-font-pcf'],\n ['pcl', ['application/vnd.hp-pcl', 'application/x-pcl']],\n ['pclxl', 'application/vnd.hp-pclxl'],\n ['pct', 'image/x-pict'],\n ['pcurl', 'application/vnd.curl.pcurl'],\n ['pcx', 'image/x-pcx'],\n ['pdb', ['application/vnd.palm', 'chemical/x-pdb']],\n ['pdf', 'application/pdf'],\n ['pfa', 'application/x-font-type1'],\n ['pfr', 'application/font-tdpfr'],\n ['pfunk', ['audio/make', 'audio/make.my.funk']],\n ['pfx', 'application/x-pkcs12'],\n ['pgm', ['image/x-portable-graymap', 'image/x-portable-greymap']],\n ['pgn', 'application/x-chess-pgn'],\n ['pgp', 'application/pgp-signature'],\n ['pic', ['image/pict', 'image/x-pict']],\n ['pict', 'image/pict'],\n ['pkg', 'application/x-newton-compatible-pkg'],\n ['pki', 'application/pkixcmp'],\n ['pkipath', 'application/pkix-pkipath'],\n ['pko', ['application/ynd.ms-pkipko', 'application/vnd.ms-pki.pko']],\n ['pl', ['text/plain', 'text/x-script.perl']],\n ['plb', 'application/vnd.3gpp.pic-bw-large'],\n ['plc', 'application/vnd.mobius.plc'],\n ['plf', 'application/vnd.pocketlearn'],\n ['pls', 'application/pls+xml'],\n ['plx', 'application/x-pixclscript'],\n ['pm', ['text/x-script.perl-module', 'image/x-xpixmap']],\n ['pm4', 'application/x-pagemaker'],\n ['pm5', 'application/x-pagemaker'],\n ['pma', 'application/x-perfmon'],\n ['pmc', 'application/x-perfmon'],\n ['pml', ['application/vnd.ctc-posml', 'application/x-perfmon']],\n ['pmr', 'application/x-perfmon'],\n ['pmw', 'application/x-perfmon'],\n ['png', 'image/png'],\n ['pnm', ['application/x-portable-anymap', 'image/x-portable-anymap']],\n ['portpkg', 'application/vnd.macports.portpkg'],\n ['pot', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],\n ['potm', 'application/vnd.ms-powerpoint.template.macroenabled.12'],\n ['potx', 'application/vnd.openxmlformats-officedocument.presentationml.template'],\n ['pov', 'model/x-pov'],\n ['ppa', 'application/vnd.ms-powerpoint'],\n ['ppam', 'application/vnd.ms-powerpoint.addin.macroenabled.12'],\n ['ppd', 'application/vnd.cups-ppd'],\n ['ppm', 'image/x-portable-pixmap'],\n ['pps', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],\n ['ppsm', 'application/vnd.ms-powerpoint.slideshow.macroenabled.12'],\n ['ppsx', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow'],\n ['ppt', ['application/vnd.ms-powerpoint', 'application/mspowerpoint', 'application/powerpoint', 'application/x-mspowerpoint']],\n ['pptm', 'application/vnd.ms-powerpoint.presentation.macroenabled.12'],\n ['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],\n ['ppz', 'application/mspowerpoint'],\n ['prc', 'application/x-mobipocket-ebook'],\n ['pre', ['application/vnd.lotus-freelance', 'application/x-freelance']],\n ['prf', 'application/pics-rules'],\n ['prt', 'application/pro_eng'],\n ['ps', 'application/postscript'],\n ['psb', 'application/vnd.3gpp.pic-bw-small'],\n ['psd', ['application/octet-stream', 'image/vnd.adobe.photoshop']],\n ['psf', 'application/x-font-linux-psf'],\n ['pskcxml', 'application/pskc+xml'],\n ['ptid', 'application/vnd.pvi.ptid1'],\n ['pub', 'application/x-mspublisher'],\n ['pvb', 'application/vnd.3gpp.pic-bw-var'],\n ['pvu', 'paleovu/x-pv'],\n ['pwn', 'application/vnd.3m.post-it-notes'],\n ['pwz', 'application/vnd.ms-powerpoint'],\n ['py', 'text/x-script.phyton'],\n ['pya', 'audio/vnd.ms-playready.media.pya'],\n ['pyc', 'application/x-bytecode.python'],\n ['pyv', 'video/vnd.ms-playready.media.pyv'],\n ['qam', 'application/vnd.epson.quickanime'],\n ['qbo', 'application/vnd.intu.qbo'],\n ['qcp', 'audio/vnd.qcelp'],\n ['qd3', 'x-world/x-3dmf'],\n ['qd3d', 'x-world/x-3dmf'],\n ['qfx', 'application/vnd.intu.qfx'],\n ['qif', 'image/x-quicktime'],\n ['qps', 'application/vnd.publishare-delta-tree'],\n ['qt', 'video/quicktime'],\n ['qtc', 'video/x-qtc'],\n ['qti', 'image/x-quicktime'],\n ['qtif', 'image/x-quicktime'],\n ['qxd', 'application/vnd.quark.quarkxpress'],\n ['ra', ['audio/x-realaudio', 'audio/x-pn-realaudio', 'audio/x-pn-realaudio-plugin']],\n ['ram', 'audio/x-pn-realaudio'],\n ['rar', 'application/x-rar-compressed'],\n ['ras', ['image/cmu-raster', 'application/x-cmu-raster', 'image/x-cmu-raster']],\n ['rast', 'image/cmu-raster'],\n ['rcprofile', 'application/vnd.ipunplugged.rcprofile'],\n ['rdf', 'application/rdf+xml'],\n ['rdz', 'application/vnd.data-vision.rdz'],\n ['rep', 'application/vnd.businessobjects'],\n ['res', 'application/x-dtbresource+xml'],\n ['rexx', 'text/x-script.rexx'],\n ['rf', 'image/vnd.rn-realflash'],\n ['rgb', 'image/x-rgb'],\n ['rif', 'application/reginfo+xml'],\n ['rip', 'audio/vnd.rip'],\n ['rl', 'application/resource-lists+xml'],\n ['rlc', 'image/vnd.fujixerox.edmics-rlc'],\n ['rld', 'application/resource-lists-diff+xml'],\n ['rm', ['application/vnd.rn-realmedia', 'audio/x-pn-realaudio']],\n ['rmi', 'audio/mid'],\n ['rmm', 'audio/x-pn-realaudio'],\n ['rmp', ['audio/x-pn-realaudio-plugin', 'audio/x-pn-realaudio']],\n ['rms', 'application/vnd.jcp.javame.midlet-rms'],\n ['rnc', 'application/relax-ng-compact-syntax'],\n ['rng', ['application/ringing-tones', 'application/vnd.nokia.ringing-tone']],\n ['rnx', 'application/vnd.rn-realplayer'],\n ['roff', 'application/x-troff'],\n ['rp', 'image/vnd.rn-realpix'],\n ['rp9', 'application/vnd.cloanto.rp9'],\n ['rpm', 'audio/x-pn-realaudio-plugin'],\n ['rpss', 'application/vnd.nokia.radio-presets'],\n ['rpst', 'application/vnd.nokia.radio-preset'],\n ['rq', 'application/sparql-query'],\n ['rs', 'application/rls-services+xml'],\n ['rsd', 'application/rsd+xml'],\n ['rt', ['text/richtext', 'text/vnd.rn-realtext']],\n ['rtf', ['application/rtf', 'text/richtext', 'application/x-rtf']],\n ['rtx', ['text/richtext', 'application/rtf']],\n ['rv', 'video/vnd.rn-realvideo'],\n ['s', 'text/x-asm'],\n ['s3m', 'audio/s3m'],\n ['saf', 'application/vnd.yamaha.smaf-audio'],\n ['saveme', 'application/octet-stream'],\n ['sbk', 'application/x-tbook'],\n ['sbml', 'application/sbml+xml'],\n ['sc', 'application/vnd.ibm.secure-container'],\n ['scd', 'application/x-msschedule'],\n ['scm', ['application/vnd.lotus-screencam', 'video/x-scm', 'text/x-script.guile', 'application/x-lotusscreencam', 'text/x-script.scheme']],\n ['scq', 'application/scvp-cv-request'],\n ['scs', 'application/scvp-cv-response'],\n ['sct', 'text/scriptlet'],\n ['scurl', 'text/vnd.curl.scurl'],\n ['sda', 'application/vnd.stardivision.draw'],\n ['sdc', 'application/vnd.stardivision.calc'],\n ['sdd', 'application/vnd.stardivision.impress'],\n ['sdkm', 'application/vnd.solent.sdkm+xml'],\n ['sdml', 'text/plain'],\n ['sdp', ['application/sdp', 'application/x-sdp']],\n ['sdr', 'application/sounder'],\n ['sdw', 'application/vnd.stardivision.writer'],\n ['sea', ['application/sea', 'application/x-sea']],\n ['see', 'application/vnd.seemail'],\n ['seed', 'application/vnd.fdsn.seed'],\n ['sema', 'application/vnd.sema'],\n ['semd', 'application/vnd.semd'],\n ['semf', 'application/vnd.semf'],\n ['ser', 'application/java-serialized-object'],\n ['set', 'application/set'],\n ['setpay', 'application/set-payment-initiation'],\n ['setreg', 'application/set-registration-initiation'],\n ['sfd-hdstx', 'application/vnd.hydrostatix.sof-data'],\n ['sfs', 'application/vnd.spotfire.sfs'],\n ['sgl', 'application/vnd.stardivision.writer-global'],\n ['sgm', ['text/sgml', 'text/x-sgml']],\n ['sgml', ['text/sgml', 'text/x-sgml']],\n ['sh', ['application/x-shar', 'application/x-bsh', 'application/x-sh', 'text/x-script.sh']],\n ['shar', ['application/x-bsh', 'application/x-shar']],\n ['shf', 'application/shf+xml'],\n ['shtml', ['text/html', 'text/x-server-parsed-html']],\n ['sid', 'audio/x-psid'],\n ['sis', 'application/vnd.symbian.install'],\n ['sit', ['application/x-stuffit', 'application/x-sit']],\n ['sitx', 'application/x-stuffitx'],\n ['skd', 'application/x-koan'],\n ['skm', 'application/x-koan'],\n ['skp', ['application/vnd.koan', 'application/x-koan']],\n ['skt', 'application/x-koan'],\n ['sl', 'application/x-seelogo'],\n ['sldm', 'application/vnd.ms-powerpoint.slide.macroenabled.12'],\n ['sldx', 'application/vnd.openxmlformats-officedocument.presentationml.slide'],\n ['slt', 'application/vnd.epson.salt'],\n ['sm', 'application/vnd.stepmania.stepchart'],\n ['smf', 'application/vnd.stardivision.math'],\n ['smi', ['application/smil', 'application/smil+xml']],\n ['smil', 'application/smil'],\n ['snd', ['audio/basic', 'audio/x-adpcm']],\n ['snf', 'application/x-font-snf'],\n ['sol', 'application/solids'],\n ['spc', ['text/x-speech', 'application/x-pkcs7-certificates']],\n ['spf', 'application/vnd.yamaha.smaf-phrase'],\n ['spl', ['application/futuresplash', 'application/x-futuresplash']],\n ['spot', 'text/vnd.in3d.spot'],\n ['spp', 'application/scvp-vp-response'],\n ['spq', 'application/scvp-vp-request'],\n ['spr', 'application/x-sprite'],\n ['sprite', 'application/x-sprite'],\n ['src', 'application/x-wais-source'],\n ['sru', 'application/sru+xml'],\n ['srx', 'application/sparql-results+xml'],\n ['sse', 'application/vnd.kodak-descriptor'],\n ['ssf', 'application/vnd.epson.ssf'],\n ['ssi', 'text/x-server-parsed-html'],\n ['ssm', 'application/streamingmedia'],\n ['ssml', 'application/ssml+xml'],\n ['sst', ['application/vnd.ms-pkicertstore', 'application/vnd.ms-pki.certstore']],\n ['st', 'application/vnd.sailingtracker.track'],\n ['stc', 'application/vnd.sun.xml.calc.template'],\n ['std', 'application/vnd.sun.xml.draw.template'],\n ['step', 'application/step'],\n ['stf', 'application/vnd.wt.stf'],\n ['sti', 'application/vnd.sun.xml.impress.template'],\n ['stk', 'application/hyperstudio'],\n ['stl', ['application/vnd.ms-pkistl', 'application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle']],\n ['stm', 'text/html'],\n ['stp', 'application/step'],\n ['str', 'application/vnd.pg.format'],\n ['stw', 'application/vnd.sun.xml.writer.template'],\n ['sub', 'image/vnd.dvb.subtitle'],\n ['sus', 'application/vnd.sus-calendar'],\n ['sv4cpio', 'application/x-sv4cpio'],\n ['sv4crc', 'application/x-sv4crc'],\n ['svc', 'application/vnd.dvb.service'],\n ['svd', 'application/vnd.svd'],\n ['svf', ['image/vnd.dwg', 'image/x-dwg']],\n ['svg', 'image/svg+xml'],\n ['svr', ['x-world/x-svr', 'application/x-world']],\n ['swf', 'application/x-shockwave-flash'],\n ['swi', 'application/vnd.aristanetworks.swi'],\n ['sxc', 'application/vnd.sun.xml.calc'],\n ['sxd', 'application/vnd.sun.xml.draw'],\n ['sxg', 'application/vnd.sun.xml.writer.global'],\n ['sxi', 'application/vnd.sun.xml.impress'],\n ['sxm', 'application/vnd.sun.xml.math'],\n ['sxw', 'application/vnd.sun.xml.writer'],\n ['t', ['text/troff', 'application/x-troff']],\n ['talk', 'text/x-speech'],\n ['tao', 'application/vnd.tao.intent-module-archive'],\n ['tar', 'application/x-tar'],\n ['tbk', ['application/toolbook', 'application/x-tbook']],\n ['tcap', 'application/vnd.3gpp2.tcap'],\n ['tcl', ['text/x-script.tcl', 'application/x-tcl']],\n ['tcsh', 'text/x-script.tcsh'],\n ['teacher', 'application/vnd.smart.teacher'],\n ['tei', 'application/tei+xml'],\n ['tex', 'application/x-tex'],\n ['texi', 'application/x-texinfo'],\n ['texinfo', 'application/x-texinfo'],\n ['text', ['application/plain', 'text/plain']],\n ['tfi', 'application/thraud+xml'],\n ['tfm', 'application/x-tex-tfm'],\n ['tgz', ['application/gnutar', 'application/x-compressed']],\n ['thmx', 'application/vnd.ms-officetheme'],\n ['tif', ['image/tiff', 'image/x-tiff']],\n ['tiff', ['image/tiff', 'image/x-tiff']],\n ['tmo', 'application/vnd.tmobile-livetv'],\n ['torrent', 'application/x-bittorrent'],\n ['tpl', 'application/vnd.groove-tool-template'],\n ['tpt', 'application/vnd.trid.tpt'],\n ['tr', 'application/x-troff'],\n ['tra', 'application/vnd.trueapp'],\n ['trm', 'application/x-msterminal'],\n ['tsd', 'application/timestamped-data'],\n ['tsi', 'audio/tsp-audio'],\n ['tsp', ['application/dsptype', 'audio/tsplayer']],\n ['tsv', 'text/tab-separated-values'],\n ['ttf', 'application/x-font-ttf'],\n ['ttl', 'text/turtle'],\n ['turbot', 'image/florian'],\n ['twd', 'application/vnd.simtech-mindmapper'],\n ['txd', 'application/vnd.genomatix.tuxedo'],\n ['txf', 'application/vnd.mobius.txf'],\n ['txt', 'text/plain'],\n ['ufd', 'application/vnd.ufdl'],\n ['uil', 'text/x-uil'],\n ['uls', 'text/iuls'],\n ['umj', 'application/vnd.umajin'],\n ['uni', 'text/uri-list'],\n ['unis', 'text/uri-list'],\n ['unityweb', 'application/vnd.unity'],\n ['unv', 'application/i-deas'],\n ['uoml', 'application/vnd.uoml+xml'],\n ['uri', 'text/uri-list'],\n ['uris', 'text/uri-list'],\n ['ustar', ['application/x-ustar', 'multipart/x-ustar']],\n ['utz', 'application/vnd.uiq.theme'],\n ['uu', ['application/octet-stream', 'text/x-uuencode']],\n ['uue', 'text/x-uuencode'],\n ['uva', 'audio/vnd.dece.audio'],\n ['uvh', 'video/vnd.dece.hd'],\n ['uvi', 'image/vnd.dece.graphic'],\n ['uvm', 'video/vnd.dece.mobile'],\n ['uvp', 'video/vnd.dece.pd'],\n ['uvs', 'video/vnd.dece.sd'],\n ['uvu', 'video/vnd.uvvu.mp4'],\n ['uvv', 'video/vnd.dece.video'],\n ['vcd', 'application/x-cdlink'],\n ['vcf', 'text/x-vcard'],\n ['vcg', 'application/vnd.groove-vcard'],\n ['vcs', 'text/x-vcalendar'],\n ['vcx', 'application/vnd.vcx'],\n ['vda', 'application/vda'],\n ['vdo', 'video/vdo'],\n ['vew', 'application/groupwise'],\n ['vis', 'application/vnd.visionary'],\n ['viv', ['video/vivo', 'video/vnd.vivo']],\n ['vivo', ['video/vivo', 'video/vnd.vivo']],\n ['vmd', 'application/vocaltec-media-desc'],\n ['vmf', 'application/vocaltec-media-file'],\n ['voc', ['audio/voc', 'audio/x-voc']],\n ['vos', 'video/vosaic'],\n ['vox', 'audio/voxware'],\n ['vqe', 'audio/x-twinvq-plugin'],\n ['vqf', 'audio/x-twinvq'],\n ['vql', 'audio/x-twinvq-plugin'],\n ['vrml', ['model/vrml', 'x-world/x-vrml', 'application/x-vrml']],\n ['vrt', 'x-world/x-vrt'],\n ['vsd', ['application/vnd.visio', 'application/x-visio']],\n ['vsf', 'application/vnd.vsf'],\n ['vst', 'application/x-visio'],\n ['vsw', 'application/x-visio'],\n ['vtu', 'model/vnd.vtu'],\n ['vxml', 'application/voicexml+xml'],\n ['w60', 'application/wordperfect6.0'],\n ['w61', 'application/wordperfect6.1'],\n ['w6w', 'application/msword'],\n ['wad', 'application/x-doom'],\n ['wav', ['audio/wav', 'audio/x-wav']],\n ['wax', 'audio/x-ms-wax'],\n ['wb1', 'application/x-qpro'],\n ['wbmp', 'image/vnd.wap.wbmp'],\n ['wbs', 'application/vnd.criticaltools.wbs+xml'],\n ['wbxml', 'application/vnd.wap.wbxml'],\n ['wcm', 'application/vnd.ms-works'],\n ['wdb', 'application/vnd.ms-works'],\n ['web', 'application/vnd.xara'],\n ['weba', 'audio/webm'],\n ['webm', 'video/webm'],\n ['webp', 'image/webp'],\n ['wg', 'application/vnd.pmi.widget'],\n ['wgt', 'application/widget'],\n ['wiz', 'application/msword'],\n ['wk1', 'application/x-123'],\n ['wks', 'application/vnd.ms-works'],\n ['wm', 'video/x-ms-wm'],\n ['wma', 'audio/x-ms-wma'],\n ['wmd', 'application/x-ms-wmd'],\n ['wmf', ['windows/metafile', 'application/x-msmetafile']],\n ['wml', 'text/vnd.wap.wml'],\n ['wmlc', 'application/vnd.wap.wmlc'],\n ['wmls', 'text/vnd.wap.wmlscript'],\n ['wmlsc', 'application/vnd.wap.wmlscriptc'],\n ['wmv', 'video/x-ms-wmv'],\n ['wmx', 'video/x-ms-wmx'],\n ['wmz', 'application/x-ms-wmz'],\n ['woff', 'application/x-font-woff'],\n ['word', 'application/msword'],\n ['wp', 'application/wordperfect'],\n ['wp5', ['application/wordperfect', 'application/wordperfect6.0']],\n ['wp6', 'application/wordperfect'],\n ['wpd', ['application/wordperfect', 'application/vnd.wordperfect', 'application/x-wpwin']],\n ['wpl', 'application/vnd.ms-wpl'],\n ['wps', 'application/vnd.ms-works'],\n ['wq1', 'application/x-lotus'],\n ['wqd', 'application/vnd.wqd'],\n ['wri', ['application/mswrite', 'application/x-wri', 'application/x-mswrite']],\n ['wrl', ['model/vrml', 'x-world/x-vrml', 'application/x-world']],\n ['wrz', ['model/vrml', 'x-world/x-vrml']],\n ['wsc', 'text/scriplet'],\n ['wsdl', 'application/wsdl+xml'],\n ['wspolicy', 'application/wspolicy+xml'],\n ['wsrc', 'application/x-wais-source'],\n ['wtb', 'application/vnd.webturbo'],\n ['wtk', 'application/x-wintalk'],\n ['wvx', 'video/x-ms-wvx'],\n ['x-png', 'image/png'],\n ['x3d', 'application/vnd.hzn-3d-crossword'],\n ['xaf', 'x-world/x-vrml'],\n ['xap', 'application/x-silverlight-app'],\n ['xar', 'application/vnd.xara'],\n ['xbap', 'application/x-ms-xbap'],\n ['xbd', 'application/vnd.fujixerox.docuworks.binder'],\n ['xbm', ['image/xbm', 'image/x-xbm', 'image/x-xbitmap']],\n ['xdf', 'application/xcap-diff+xml'],\n ['xdm', 'application/vnd.syncml.dm+xml'],\n ['xdp', 'application/vnd.adobe.xdp+xml'],\n ['xdr', 'video/x-amt-demorun'],\n ['xdssc', 'application/dssc+xml'],\n ['xdw', 'application/vnd.fujixerox.docuworks'],\n ['xenc', 'application/xenc+xml'],\n ['xer', 'application/patch-ops-error+xml'],\n ['xfdf', 'application/vnd.adobe.xfdf'],\n ['xfdl', 'application/vnd.xfdl'],\n ['xgz', 'xgl/drawing'],\n ['xhtml', 'application/xhtml+xml'],\n ['xif', 'image/vnd.xiff'],\n ['xl', 'application/excel'],\n ['xla', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xlam', 'application/vnd.ms-excel.addin.macroenabled.12'],\n ['xlb', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],\n ['xlc', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xld', ['application/excel', 'application/x-excel']],\n ['xlk', ['application/excel', 'application/x-excel']],\n ['xll', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],\n ['xlm', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xls', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xlsb', 'application/vnd.ms-excel.sheet.binary.macroenabled.12'],\n ['xlsm', 'application/vnd.ms-excel.sheet.macroenabled.12'],\n ['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],\n ['xlt', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xltm', 'application/vnd.ms-excel.template.macroenabled.12'],\n ['xltx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'],\n ['xlv', ['application/excel', 'application/x-excel']],\n ['xlw', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xm', 'audio/xm'],\n ['xml', ['application/xml', 'text/xml', 'application/atom+xml', 'application/rss+xml']],\n ['xmz', 'xgl/movie'],\n ['xo', 'application/vnd.olpc-sugar'],\n ['xof', 'x-world/x-vrml'],\n ['xop', 'application/xop+xml'],\n ['xpi', 'application/x-xpinstall'],\n ['xpix', 'application/x-vnd.ls-xpix'],\n ['xpm', ['image/xpm', 'image/x-xpixmap']],\n ['xpr', 'application/vnd.is-xpr'],\n ['xps', 'application/vnd.ms-xpsdocument'],\n ['xpw', 'application/vnd.intercon.formnet'],\n ['xslt', 'application/xslt+xml'],\n ['xsm', 'application/vnd.syncml+xml'],\n ['xspf', 'application/xspf+xml'],\n ['xsr', 'video/x-amt-showrun'],\n ['xul', 'application/vnd.mozilla.xul+xml'],\n ['xwd', ['image/x-xwd', 'image/x-xwindowdump']],\n ['xyz', ['chemical/x-xyz', 'chemical/x-pdb']],\n ['yang', 'application/yang'],\n ['yin', 'application/yin+xml'],\n ['z', ['application/x-compressed', 'application/x-compress']],\n ['zaz', 'application/vnd.zzazz.deck+xml'],\n ['zip', ['application/zip', 'multipart/x-zip', 'application/x-zip-compressed', 'application/x-compressed']],\n ['zir', 'application/vnd.zul'],\n ['zmm', 'application/vnd.handheld-entertainment+xml'],\n ['zoo', 'application/octet-stream'],\n ['zsh', 'text/x-script.zsh']\n]);\n\nmodule.exports = {\n detectMimeType(filename) {\n if (!filename) {\n return defaultMimeType;\n }\n\n let parsed = path.parse(filename);\n let extension = (parsed.ext.substr(1) || parsed.name || '').split('?').shift().trim().toLowerCase();\n let value = defaultMimeType;\n\n if (extensions.has(extension)) {\n value = extensions.get(extension);\n }\n\n if (Array.isArray(value)) {\n return value[0];\n }\n return value;\n },\n\n detectExtension(mimeType) {\n if (!mimeType) {\n return defaultExtension;\n }\n let parts = (mimeType || '').toLowerCase().trim().split('/');\n let rootType = parts.shift().trim();\n let subType = parts.join('/').trim();\n\n if (mimeTypes.has(rootType + '/' + subType)) {\n let value = mimeTypes.get(rootType + '/' + subType);\n if (Array.isArray(value)) {\n return value[0];\n }\n return value;\n }\n\n switch (rootType) {\n case 'text':\n return 'txt';\n default:\n return 'bin';\n }\n }\n};\n","/* eslint no-undefined: 0, prefer-spread: 0, no-control-regex: 0 */\n\n'use strict';\n\nconst crypto = require('crypto');\nconst fs = require('fs');\nconst punycode = require('../punycode');\nconst PassThrough = require('stream').PassThrough;\nconst shared = require('../shared');\n\nconst mimeFuncs = require('../mime-funcs');\nconst qp = require('../qp');\nconst base64 = require('../base64');\nconst addressparser = require('../addressparser');\nconst nmfetch = require('../fetch');\nconst LastNewline = require('./last-newline');\n\nconst LeWindows = require('./le-windows');\nconst LeUnix = require('./le-unix');\n\n/**\n * Creates a new mime tree node. Assumes 'multipart/*' as the content type\n * if it is a branch, anything else counts as leaf. If rootNode is missing from\n * the options, assumes this is the root.\n *\n * @param {String} contentType Define the content type for the node. Can be left blank for attachments (derived from filename)\n * @param {Object} [options] optional options\n * @param {Object} [options.rootNode] root node for this tree\n * @param {Object} [options.parentNode] immediate parent for this node\n * @param {Object} [options.filename] filename for an attachment node\n * @param {String} [options.baseBoundary] shared part of the unique multipart boundary\n * @param {Boolean} [options.keepBcc] If true, do not exclude Bcc from the generated headers\n * @param {Function} [options.normalizeHeaderKey] method to normalize header keys for custom caseing\n * @param {String} [options.textEncoding] either 'Q' (the default) or 'B'\n */\nclass MimeNode {\n constructor(contentType, options) {\n this.nodeCounter = 0;\n\n options = options || {};\n\n /**\n * shared part of the unique multipart boundary\n */\n this.baseBoundary = options.baseBoundary || crypto.randomBytes(8).toString('hex');\n this.boundaryPrefix = options.boundaryPrefix || '--_NmP';\n\n this.disableFileAccess = !!options.disableFileAccess;\n this.disableUrlAccess = !!options.disableUrlAccess;\n\n this.normalizeHeaderKey = options.normalizeHeaderKey;\n\n /**\n * If date headers is missing and current node is the root, this value is used instead\n */\n this.date = new Date();\n\n /**\n * Root node for current mime tree\n */\n this.rootNode = options.rootNode || this;\n\n /**\n * If true include Bcc in generated headers (if available)\n */\n this.keepBcc = !!options.keepBcc;\n\n /**\n * If filename is specified but contentType is not (probably an attachment)\n * detect the content type from filename extension\n */\n if (options.filename) {\n /**\n * Filename for this node. Useful with attachments\n */\n this.filename = options.filename;\n if (!contentType) {\n contentType = mimeFuncs.detectMimeType(this.filename.split('.').pop());\n }\n }\n\n /**\n * Indicates which encoding should be used for header strings: \"Q\" or \"B\"\n */\n this.textEncoding = (options.textEncoding || '').toString().trim().charAt(0).toUpperCase();\n\n /**\n * Immediate parent for this node (or undefined if not set)\n */\n this.parentNode = options.parentNode;\n\n /**\n * Hostname for default message-id values\n */\n this.hostname = options.hostname;\n\n /**\n * If set to 'win' then uses \\r\\n, if 'linux' then \\n. If not set (or `raw` is used) then newlines are kept as is.\n */\n this.newline = options.newline;\n\n /**\n * An array for possible child nodes\n */\n this.childNodes = [];\n\n /**\n * Used for generating unique boundaries (prepended to the shared base)\n */\n this._nodeId = ++this.rootNode.nodeCounter;\n\n /**\n * A list of header values for this node in the form of [{key:'', value:''}]\n */\n this._headers = [];\n\n /**\n * True if the content only uses ASCII printable characters\n * @type {Boolean}\n */\n this._isPlainText = false;\n\n /**\n * True if the content is plain text but has longer lines than allowed\n * @type {Boolean}\n */\n this._hasLongLines = false;\n\n /**\n * If set, use instead this value for envelopes instead of generating one\n * @type {Boolean}\n */\n this._envelope = false;\n\n /**\n * If set then use this value as the stream content instead of building it\n * @type {String|Buffer|Stream}\n */\n this._raw = false;\n\n /**\n * Additional transform streams that the message will be piped before\n * exposing by createReadStream\n * @type {Array}\n */\n this._transforms = [];\n\n /**\n * Additional process functions that the message will be piped through before\n * exposing by createReadStream. These functions are run after transforms\n * @type {Array}\n */\n this._processFuncs = [];\n\n /**\n * If content type is set (or derived from the filename) add it to headers\n */\n if (contentType) {\n this.setHeader('Content-Type', contentType);\n }\n }\n\n /////// PUBLIC METHODS\n\n /**\n * Creates and appends a child node.Arguments provided are passed to MimeNode constructor\n *\n * @param {String} [contentType] Optional content type\n * @param {Object} [options] Optional options object\n * @return {Object} Created node object\n */\n createChild(contentType, options) {\n if (!options && typeof contentType === 'object') {\n options = contentType;\n contentType = undefined;\n }\n let node = new MimeNode(contentType, options);\n this.appendChild(node);\n return node;\n }\n\n /**\n * Appends an existing node to the mime tree. Removes the node from an existing\n * tree if needed\n *\n * @param {Object} childNode node to be appended\n * @return {Object} Appended node object\n */\n appendChild(childNode) {\n if (childNode.rootNode !== this.rootNode) {\n childNode.rootNode = this.rootNode;\n childNode._nodeId = ++this.rootNode.nodeCounter;\n }\n\n childNode.parentNode = this;\n\n this.childNodes.push(childNode);\n return childNode;\n }\n\n /**\n * Replaces current node with another node\n *\n * @param {Object} node Replacement node\n * @return {Object} Replacement node\n */\n replace(node) {\n if (node === this) {\n return this;\n }\n\n this.parentNode.childNodes.forEach((childNode, i) => {\n if (childNode === this) {\n node.rootNode = this.rootNode;\n node.parentNode = this.parentNode;\n node._nodeId = this._nodeId;\n\n this.rootNode = this;\n this.parentNode = undefined;\n\n node.parentNode.childNodes[i] = node;\n }\n });\n\n return node;\n }\n\n /**\n * Removes current node from the mime tree\n *\n * @return {Object} removed node\n */\n remove() {\n if (!this.parentNode) {\n return this;\n }\n\n for (let i = this.parentNode.childNodes.length - 1; i >= 0; i--) {\n if (this.parentNode.childNodes[i] === this) {\n this.parentNode.childNodes.splice(i, 1);\n this.parentNode = undefined;\n this.rootNode = this;\n return this;\n }\n }\n }\n\n /**\n * Sets a header value. If the value for selected key exists, it is overwritten.\n * You can set multiple values as well by using [{key:'', value:''}] or\n * {key: 'value'} as the first argument.\n *\n * @param {String|Array|Object} key Header key or a list of key value pairs\n * @param {String} value Header value\n * @return {Object} current node\n */\n setHeader(key, value) {\n let added = false,\n headerValue;\n\n // Allow setting multiple headers at once\n if (!value && key && typeof key === 'object') {\n // allow {key:'content-type', value: 'text/plain'}\n if (key.key && 'value' in key) {\n this.setHeader(key.key, key.value);\n } else if (Array.isArray(key)) {\n // allow [{key:'content-type', value: 'text/plain'}]\n key.forEach(i => {\n this.setHeader(i.key, i.value);\n });\n } else {\n // allow {'content-type': 'text/plain'}\n Object.keys(key).forEach(i => {\n this.setHeader(i, key[i]);\n });\n }\n return this;\n }\n\n key = this._normalizeHeaderKey(key);\n\n headerValue = {\n key,\n value\n };\n\n // Check if the value exists and overwrite\n for (let i = 0, len = this._headers.length; i < len; i++) {\n if (this._headers[i].key === key) {\n if (!added) {\n // replace the first match\n this._headers[i] = headerValue;\n added = true;\n } else {\n // remove following matches\n this._headers.splice(i, 1);\n i--;\n len--;\n }\n }\n }\n\n // match not found, append the value\n if (!added) {\n this._headers.push(headerValue);\n }\n\n return this;\n }\n\n /**\n * Adds a header value. If the value for selected key exists, the value is appended\n * as a new field and old one is not touched.\n * You can set multiple values as well by using [{key:'', value:''}] or\n * {key: 'value'} as the first argument.\n *\n * @param {String|Array|Object} key Header key or a list of key value pairs\n * @param {String} value Header value\n * @return {Object} current node\n */\n addHeader(key, value) {\n // Allow setting multiple headers at once\n if (!value && key && typeof key === 'object') {\n // allow {key:'content-type', value: 'text/plain'}\n if (key.key && key.value) {\n this.addHeader(key.key, key.value);\n } else if (Array.isArray(key)) {\n // allow [{key:'content-type', value: 'text/plain'}]\n key.forEach(i => {\n this.addHeader(i.key, i.value);\n });\n } else {\n // allow {'content-type': 'text/plain'}\n Object.keys(key).forEach(i => {\n this.addHeader(i, key[i]);\n });\n }\n return this;\n } else if (Array.isArray(value)) {\n value.forEach(val => {\n this.addHeader(key, val);\n });\n return this;\n }\n\n this._headers.push({\n key: this._normalizeHeaderKey(key),\n value\n });\n\n return this;\n }\n\n /**\n * Retrieves the first mathcing value of a selected key\n *\n * @param {String} key Key to search for\n * @retun {String} Value for the key\n */\n getHeader(key) {\n key = this._normalizeHeaderKey(key);\n for (let i = 0, len = this._headers.length; i < len; i++) {\n if (this._headers[i].key === key) {\n return this._headers[i].value;\n }\n }\n }\n\n /**\n * Sets body content for current node. If the value is a string, charset is added automatically\n * to Content-Type (if it is text/*). If the value is a Buffer, you need to specify\n * the charset yourself\n *\n * @param (String|Buffer) content Body content\n * @return {Object} current node\n */\n setContent(content) {\n this.content = content;\n if (typeof this.content.pipe === 'function') {\n // pre-stream handler. might be triggered if a stream is set as content\n // and 'error' fires before anything is done with this stream\n this._contentErrorHandler = err => {\n this.content.removeListener('error', this._contentErrorHandler);\n this.content = err;\n };\n this.content.once('error', this._contentErrorHandler);\n } else if (typeof this.content === 'string') {\n this._isPlainText = mimeFuncs.isPlainText(this.content);\n if (this._isPlainText && mimeFuncs.hasLongerLines(this.content, 76)) {\n // If there are lines longer than 76 symbols/bytes do not use 7bit\n this._hasLongLines = true;\n }\n }\n return this;\n }\n\n build(callback) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n let stream = this.createReadStream();\n let buf = [];\n let buflen = 0;\n let returned = false;\n\n stream.on('readable', () => {\n let chunk;\n\n while ((chunk = stream.read()) !== null) {\n buf.push(chunk);\n buflen += chunk.length;\n }\n });\n\n stream.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n\n return callback(err);\n });\n\n stream.once('end', chunk => {\n if (returned) {\n return;\n }\n returned = true;\n\n if (chunk && chunk.length) {\n buf.push(chunk);\n buflen += chunk.length;\n }\n return callback(null, Buffer.concat(buf, buflen));\n });\n\n return promise;\n }\n\n getTransferEncoding() {\n let transferEncoding = false;\n let contentType = (this.getHeader('Content-Type') || '').toString().toLowerCase().trim();\n\n if (this.content) {\n transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '').toString().toLowerCase().trim();\n if (!transferEncoding || !['base64', 'quoted-printable'].includes(transferEncoding)) {\n if (/^text\\//i.test(contentType)) {\n // If there are no special symbols, no need to modify the text\n if (this._isPlainText && !this._hasLongLines) {\n transferEncoding = '7bit';\n } else if (typeof this.content === 'string' || this.content instanceof Buffer) {\n // detect preferred encoding for string value\n transferEncoding = this._getTextEncoding(this.content) === 'Q' ? 'quoted-printable' : 'base64';\n } else {\n // we can not check content for a stream, so either use preferred encoding or fallback to QP\n transferEncoding = this.textEncoding === 'B' ? 'base64' : 'quoted-printable';\n }\n } else if (!/^(multipart|message)\\//i.test(contentType)) {\n transferEncoding = transferEncoding || 'base64';\n }\n }\n }\n return transferEncoding;\n }\n\n /**\n * Builds the header block for the mime node. Append \\r\\n\\r\\n before writing the content\n *\n * @returns {String} Headers\n */\n buildHeaders() {\n let transferEncoding = this.getTransferEncoding();\n let headers = [];\n\n if (transferEncoding) {\n this.setHeader('Content-Transfer-Encoding', transferEncoding);\n }\n\n if (this.filename && !this.getHeader('Content-Disposition')) {\n this.setHeader('Content-Disposition', 'attachment');\n }\n\n // Ensure mandatory header fields\n if (this.rootNode === this) {\n if (!this.getHeader('Date')) {\n this.setHeader('Date', this.date.toUTCString().replace(/GMT/, '+0000'));\n }\n\n // ensure that Message-Id is present\n this.messageId();\n\n if (!this.getHeader('MIME-Version')) {\n this.setHeader('MIME-Version', '1.0');\n }\n }\n\n this._headers.forEach(header => {\n let key = header.key;\n let value = header.value;\n let structured;\n let param;\n let options = {};\n let formattedHeaders = ['From', 'Sender', 'To', 'Cc', 'Bcc', 'Reply-To', 'Date', 'References'];\n\n if (value && typeof value === 'object' && !formattedHeaders.includes(key)) {\n Object.keys(value).forEach(key => {\n if (key !== 'value') {\n options[key] = value[key];\n }\n });\n value = (value.value || '').toString();\n if (!value.trim()) {\n return;\n }\n }\n\n if (options.prepared) {\n // header value is\n if (options.foldLines) {\n headers.push(mimeFuncs.foldLines(key + ': ' + value));\n } else {\n headers.push(key + ': ' + value);\n }\n return;\n }\n\n switch (header.key) {\n case 'Content-Disposition':\n structured = mimeFuncs.parseHeaderValue(value);\n if (this.filename) {\n structured.params.filename = this.filename;\n }\n value = mimeFuncs.buildHeaderValue(structured);\n break;\n\n case 'Content-Type':\n structured = mimeFuncs.parseHeaderValue(value);\n\n this._handleContentType(structured);\n\n if (structured.value.match(/^text\\/plain\\b/) && typeof this.content === 'string' && /[\\u0080-\\uFFFF]/.test(this.content)) {\n structured.params.charset = 'utf-8';\n }\n\n value = mimeFuncs.buildHeaderValue(structured);\n\n if (this.filename) {\n // add support for non-compliant clients like QQ webmail\n // we can't build the value with buildHeaderValue as the value is non standard and\n // would be converted to parameter continuation encoding that we do not want\n param = this._encodeWords(this.filename);\n\n if (param !== this.filename || /[\\s'\"\\\\;:/=(),<>@[\\]?]|^-/.test(param)) {\n // include value in quotes if needed\n param = '\"' + param + '\"';\n }\n value += '; name=' + param;\n }\n break;\n\n case 'Bcc':\n if (!this.keepBcc) {\n // skip BCC values\n return;\n }\n break;\n }\n\n value = this._encodeHeaderValue(key, value);\n\n // skip empty lines\n if (!(value || '').toString().trim()) {\n return;\n }\n\n if (typeof this.normalizeHeaderKey === 'function') {\n let normalized = this.normalizeHeaderKey(key, value);\n if (normalized && typeof normalized === 'string' && normalized.length) {\n key = normalized;\n }\n }\n\n headers.push(mimeFuncs.foldLines(key + ': ' + value, 76));\n });\n\n return headers.join('\\r\\n');\n }\n\n /**\n * Streams the rfc2822 message from the current node. If this is a root node,\n * mandatory header fields are set if missing (Date, Message-Id, MIME-Version)\n *\n * @return {String} Compiled message\n */\n createReadStream(options) {\n options = options || {};\n\n let stream = new PassThrough(options);\n let outputStream = stream;\n let transform;\n\n this.stream(stream, options, err => {\n if (err) {\n outputStream.emit('error', err);\n return;\n }\n stream.end();\n });\n\n for (let i = 0, len = this._transforms.length; i < len; i++) {\n transform = typeof this._transforms[i] === 'function' ? this._transforms[i]() : this._transforms[i];\n outputStream.once('error', err => {\n transform.emit('error', err);\n });\n outputStream = outputStream.pipe(transform);\n }\n\n // ensure terminating newline after possible user transforms\n transform = new LastNewline();\n outputStream.once('error', err => {\n transform.emit('error', err);\n });\n outputStream = outputStream.pipe(transform);\n\n // dkim and stuff\n for (let i = 0, len = this._processFuncs.length; i < len; i++) {\n transform = this._processFuncs[i];\n outputStream = transform(outputStream);\n }\n\n if (this.newline) {\n const winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes(this.newline.toString().toLowerCase());\n const newlineTransform = winbreak ? new LeWindows() : new LeUnix();\n\n const stream = outputStream.pipe(newlineTransform);\n outputStream.on('error', err => stream.emit('error', err));\n return stream;\n }\n\n return outputStream;\n }\n\n /**\n * Appends a transform stream object to the transforms list. Final output\n * is passed through this stream before exposing\n *\n * @param {Object} transform Read-Write stream\n */\n transform(transform) {\n this._transforms.push(transform);\n }\n\n /**\n * Appends a post process function. The functon is run after transforms and\n * uses the following syntax\n *\n * processFunc(input) -> outputStream\n *\n * @param {Object} processFunc Read-Write stream\n */\n processFunc(processFunc) {\n this._processFuncs.push(processFunc);\n }\n\n stream(outputStream, options, done) {\n let transferEncoding = this.getTransferEncoding();\n let contentStream;\n let localStream;\n\n // protect actual callback against multiple triggering\n let returned = false;\n let callback = err => {\n if (returned) {\n return;\n }\n returned = true;\n done(err);\n };\n\n // for multipart nodes, push child nodes\n // for content nodes end the stream\n let finalize = () => {\n let childId = 0;\n let processChildNode = () => {\n if (childId >= this.childNodes.length) {\n outputStream.write('\\r\\n--' + this.boundary + '--\\r\\n');\n return callback();\n }\n let child = this.childNodes[childId++];\n outputStream.write((childId > 1 ? '\\r\\n' : '') + '--' + this.boundary + '\\r\\n');\n child.stream(outputStream, options, err => {\n if (err) {\n return callback(err);\n }\n setImmediate(processChildNode);\n });\n };\n\n if (this.multipart) {\n setImmediate(processChildNode);\n } else {\n return callback();\n }\n };\n\n // pushes node content\n let sendContent = () => {\n if (this.content) {\n if (Object.prototype.toString.call(this.content) === '[object Error]') {\n // content is already errored\n return callback(this.content);\n }\n\n if (typeof this.content.pipe === 'function') {\n this.content.removeListener('error', this._contentErrorHandler);\n this._contentErrorHandler = err => callback(err);\n this.content.once('error', this._contentErrorHandler);\n }\n\n let createStream = () => {\n if (['quoted-printable', 'base64'].includes(transferEncoding)) {\n contentStream = new (transferEncoding === 'base64' ? base64 : qp).Encoder(options);\n\n contentStream.pipe(outputStream, {\n end: false\n });\n contentStream.once('end', finalize);\n contentStream.once('error', err => callback(err));\n\n localStream = this._getStream(this.content);\n localStream.pipe(contentStream);\n } else {\n // anything that is not QP or Base54 passes as-is\n localStream = this._getStream(this.content);\n localStream.pipe(outputStream, {\n end: false\n });\n localStream.once('end', finalize);\n }\n\n localStream.once('error', err => callback(err));\n };\n\n if (this.content._resolve) {\n let chunks = [];\n let chunklen = 0;\n let returned = false;\n let sourceStream = this._getStream(this.content);\n sourceStream.on('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n callback(err);\n });\n sourceStream.on('readable', () => {\n let chunk;\n while ((chunk = sourceStream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n sourceStream.on('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n this.content._resolve = false;\n this.content._resolvedValue = Buffer.concat(chunks, chunklen);\n setImmediate(createStream);\n });\n } else {\n setImmediate(createStream);\n }\n return;\n } else {\n return setImmediate(finalize);\n }\n };\n\n if (this._raw) {\n setImmediate(() => {\n if (Object.prototype.toString.call(this._raw) === '[object Error]') {\n // content is already errored\n return callback(this._raw);\n }\n\n // remove default error handler (if set)\n if (typeof this._raw.pipe === 'function') {\n this._raw.removeListener('error', this._contentErrorHandler);\n }\n\n let raw = this._getStream(this._raw);\n raw.pipe(outputStream, {\n end: false\n });\n raw.on('error', err => outputStream.emit('error', err));\n raw.on('end', finalize);\n });\n } else {\n outputStream.write(this.buildHeaders() + '\\r\\n\\r\\n');\n setImmediate(sendContent);\n }\n }\n\n /**\n * Sets envelope to be used instead of the generated one\n *\n * @return {Object} SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}\n */\n setEnvelope(envelope) {\n let list;\n\n this._envelope = {\n from: false,\n to: []\n };\n\n if (envelope.from) {\n list = [];\n this._convertAddresses(this._parseAddresses(envelope.from), list);\n list = list.filter(address => address && address.address);\n if (list.length && list[0]) {\n this._envelope.from = list[0].address;\n }\n }\n ['to', 'cc', 'bcc'].forEach(key => {\n if (envelope[key]) {\n this._convertAddresses(this._parseAddresses(envelope[key]), this._envelope.to);\n }\n });\n\n this._envelope.to = this._envelope.to.map(to => to.address).filter(address => address);\n\n let standardFields = ['to', 'cc', 'bcc', 'from'];\n Object.keys(envelope).forEach(key => {\n if (!standardFields.includes(key)) {\n this._envelope[key] = envelope[key];\n }\n });\n\n return this;\n }\n\n /**\n * Generates and returns an object with parsed address fields\n *\n * @return {Object} Address object\n */\n getAddresses() {\n let addresses = {};\n\n this._headers.forEach(header => {\n let key = header.key.toLowerCase();\n if (['from', 'sender', 'reply-to', 'to', 'cc', 'bcc'].includes(key)) {\n if (!Array.isArray(addresses[key])) {\n addresses[key] = [];\n }\n\n this._convertAddresses(this._parseAddresses(header.value), addresses[key]);\n }\n });\n\n return addresses;\n }\n\n /**\n * Generates and returns SMTP envelope with the sender address and a list of recipients addresses\n *\n * @return {Object} SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}\n */\n getEnvelope() {\n if (this._envelope) {\n return this._envelope;\n }\n\n let envelope = {\n from: false,\n to: []\n };\n this._headers.forEach(header => {\n let list = [];\n if (header.key === 'From' || (!envelope.from && ['Reply-To', 'Sender'].includes(header.key))) {\n this._convertAddresses(this._parseAddresses(header.value), list);\n if (list.length && list[0]) {\n envelope.from = list[0].address;\n }\n } else if (['To', 'Cc', 'Bcc'].includes(header.key)) {\n this._convertAddresses(this._parseAddresses(header.value), envelope.to);\n }\n });\n\n envelope.to = envelope.to.map(to => to.address);\n\n return envelope;\n }\n\n /**\n * Returns Message-Id value. If it does not exist, then creates one\n *\n * @return {String} Message-Id value\n */\n messageId() {\n let messageId = this.getHeader('Message-ID');\n // You really should define your own Message-Id field!\n if (!messageId) {\n messageId = this._generateMessageId();\n this.setHeader('Message-ID', messageId);\n }\n return messageId;\n }\n\n /**\n * Sets pregenerated content that will be used as the output of this node\n *\n * @param {String|Buffer|Stream} Raw MIME contents\n */\n setRaw(raw) {\n this._raw = raw;\n\n if (this._raw && typeof this._raw.pipe === 'function') {\n // pre-stream handler. might be triggered if a stream is set as content\n // and 'error' fires before anything is done with this stream\n this._contentErrorHandler = err => {\n this._raw.removeListener('error', this._contentErrorHandler);\n this._raw = err;\n };\n this._raw.once('error', this._contentErrorHandler);\n }\n\n return this;\n }\n\n /////// PRIVATE METHODS\n\n /**\n * Detects and returns handle to a stream related with the content.\n *\n * @param {Mixed} content Node content\n * @returns {Object} Stream object\n */\n _getStream(content) {\n let contentStream;\n\n if (content._resolvedValue) {\n // pass string or buffer content as a stream\n contentStream = new PassThrough();\n\n setImmediate(() => {\n try {\n contentStream.end(content._resolvedValue);\n } catch (err) {\n contentStream.emit('error', err);\n }\n });\n\n return contentStream;\n } else if (typeof content.pipe === 'function') {\n // assume as stream\n return content;\n } else if (content && typeof content.path === 'string' && !content.href) {\n if (this.disableFileAccess) {\n contentStream = new PassThrough();\n setImmediate(() => contentStream.emit('error', new Error('File access rejected for ' + content.path)));\n return contentStream;\n }\n // read file\n return fs.createReadStream(content.path);\n } else if (content && typeof content.href === 'string') {\n if (this.disableUrlAccess) {\n contentStream = new PassThrough();\n setImmediate(() => contentStream.emit('error', new Error('Url access rejected for ' + content.href)));\n return contentStream;\n }\n // fetch URL\n return nmfetch(content.href, { headers: content.httpHeaders });\n } else {\n // pass string or buffer content as a stream\n contentStream = new PassThrough();\n\n setImmediate(() => {\n try {\n contentStream.end(content || '');\n } catch (err) {\n contentStream.emit('error', err);\n }\n });\n return contentStream;\n }\n }\n\n /**\n * Parses addresses. Takes in a single address or an array or an\n * array of address arrays (eg. To: [[first group], [second group],...])\n *\n * @param {Mixed} addresses Addresses to be parsed\n * @return {Array} An array of address objects\n */\n _parseAddresses(addresses) {\n return [].concat.apply(\n [],\n [].concat(addresses).map(address => {\n // eslint-disable-line prefer-spread\n if (address && address.address) {\n address.address = this._normalizeAddress(address.address);\n address.name = address.name || '';\n return [address];\n }\n return addressparser(address);\n })\n );\n }\n\n /**\n * Normalizes a header key, uses Camel-Case form, except for uppercase MIME-\n *\n * @param {String} key Key to be normalized\n * @return {String} key in Camel-Case form\n */\n _normalizeHeaderKey(key) {\n key = (key || '')\n .toString()\n // no newlines in keys\n .replace(/\\r?\\n|\\r/g, ' ')\n .trim()\n .toLowerCase()\n // use uppercase words, except MIME\n .replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())\n // special case\n .replace(/^Content-Features$/i, 'Content-features');\n\n return key;\n }\n\n /**\n * Checks if the content type is multipart and defines boundary if needed.\n * Doesn't return anything, modifies object argument instead.\n *\n * @param {Object} structured Parsed header value for 'Content-Type' key\n */\n _handleContentType(structured) {\n this.contentType = structured.value.trim().toLowerCase();\n\n this.multipart = /^multipart\\//i.test(this.contentType) ? this.contentType.substr(this.contentType.indexOf('/') + 1) : false;\n\n if (this.multipart) {\n this.boundary = structured.params.boundary = structured.params.boundary || this.boundary || this._generateBoundary();\n } else {\n this.boundary = false;\n }\n }\n\n /**\n * Generates a multipart boundary value\n *\n * @return {String} boundary value\n */\n _generateBoundary() {\n return this.rootNode.boundaryPrefix + '-' + this.rootNode.baseBoundary + '-Part_' + this._nodeId;\n }\n\n /**\n * Encodes a header value for use in the generated rfc2822 email.\n *\n * @param {String} key Header key\n * @param {String} value Header value\n */\n _encodeHeaderValue(key, value) {\n key = this._normalizeHeaderKey(key);\n\n switch (key) {\n // Structured headers\n case 'From':\n case 'Sender':\n case 'To':\n case 'Cc':\n case 'Bcc':\n case 'Reply-To':\n return this._convertAddresses(this._parseAddresses(value));\n\n // values enclosed in <>\n case 'Message-ID':\n case 'In-Reply-To':\n case 'Content-Id':\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n\n if (value.charAt(0) !== '<') {\n value = '<' + value;\n }\n\n if (value.charAt(value.length - 1) !== '>') {\n value = value + '>';\n }\n return value;\n\n // space separated list of values enclosed in <>\n case 'References':\n value = [].concat\n .apply(\n [],\n [].concat(value || '').map(elm => {\n // eslint-disable-line prefer-spread\n elm = (elm || '')\n .toString()\n .replace(/\\r?\\n|\\r/g, ' ')\n .trim();\n return elm.replace(/<[^>]*>/g, str => str.replace(/\\s/g, '')).split(/\\s+/);\n })\n )\n .map(elm => {\n if (elm.charAt(0) !== '<') {\n elm = '<' + elm;\n }\n if (elm.charAt(elm.length - 1) !== '>') {\n elm = elm + '>';\n }\n return elm;\n });\n\n return value.join(' ').trim();\n\n case 'Date':\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return value.toUTCString().replace(/GMT/, '+0000');\n }\n\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n return this._encodeWords(value);\n\n case 'Content-Type':\n case 'Content-Disposition':\n // if it includes a filename then it is already encoded\n return (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n\n default:\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n // encodeWords only encodes if needed, otherwise the original string is returned\n return this._encodeWords(value);\n }\n }\n\n /**\n * Rebuilds address object using punycode and other adjustments\n *\n * @param {Array} addresses An array of address objects\n * @param {Array} [uniqueList] An array to be populated with addresses\n * @return {String} address string\n */\n _convertAddresses(addresses, uniqueList) {\n let values = [];\n\n uniqueList = uniqueList || [];\n\n [].concat(addresses || []).forEach(address => {\n if (address.address) {\n address.address = this._normalizeAddress(address.address);\n\n if (!address.name) {\n values.push(address.address.indexOf(' ') >= 0 ? `<${address.address}>` : `${address.address}`);\n } else if (address.name) {\n values.push(`${this._encodeAddressName(address.name)} <${address.address}>`);\n }\n\n if (address.address) {\n if (!uniqueList.filter(a => a.address === address.address).length) {\n uniqueList.push(address);\n }\n }\n } else if (address.group) {\n let groupListAddresses = (address.group.length ? this._convertAddresses(address.group, uniqueList) : '').trim();\n values.push(`${this._encodeAddressName(address.name)}:${groupListAddresses};`);\n }\n });\n\n return values.join(', ');\n }\n\n /**\n * Normalizes an email address\n *\n * @param {Array} address An array of address objects\n * @return {String} address string\n */\n _normalizeAddress(address) {\n address = (address || '')\n .toString()\n .replace(/[\\x00-\\x1F<>]+/g, ' ') // remove unallowed characters\n .trim();\n\n let lastAt = address.lastIndexOf('@');\n if (lastAt < 0) {\n // Bare username\n return address;\n }\n\n let user = address.substr(0, lastAt);\n let domain = address.substr(lastAt + 1);\n\n // Usernames are not touched and are kept as is even if these include unicode\n // Domains are punycoded by default\n // 'jõgeva.ee' will be converted to 'xn--jgeva-dua.ee'\n // non-unicode domains are left as is\n\n let encodedDomain;\n\n try {\n encodedDomain = punycode.toASCII(domain.toLowerCase());\n } catch (err) {\n // keep as is?\n }\n\n if (user.indexOf(' ') >= 0) {\n if (user.charAt(0) !== '\"') {\n user = '\"' + user;\n }\n if (user.substr(-1) !== '\"') {\n user = user + '\"';\n }\n }\n\n return `${user}@${encodedDomain}`;\n }\n\n /**\n * If needed, mime encodes the name part\n *\n * @param {String} name Name part of an address\n * @returns {String} Mime word encoded string if needed\n */\n _encodeAddressName(name) {\n if (!/^[\\w ']*$/.test(name)) {\n if (/^[\\x20-\\x7e]*$/.test(name)) {\n return '\"' + name.replace(/([\\\\\"])/g, '\\\\$1') + '\"';\n } else {\n return mimeFuncs.encodeWord(name, this._getTextEncoding(name), 52);\n }\n }\n return name;\n }\n\n /**\n * If needed, mime encodes the name part\n *\n * @param {String} name Name part of an address\n * @returns {String} Mime word encoded string if needed\n */\n _encodeWords(value) {\n // set encodeAll parameter to true even though it is against the recommendation of RFC2047,\n // by default only words that include non-ascii should be converted into encoded words\n // but some clients (eg. Zimbra) do not handle it properly and remove surrounding whitespace\n return mimeFuncs.encodeWords(value, this._getTextEncoding(value), 52, true);\n }\n\n /**\n * Detects best mime encoding for a text value\n *\n * @param {String} value Value to check for\n * @return {String} either 'Q' or 'B'\n */\n _getTextEncoding(value) {\n value = (value || '').toString();\n\n let encoding = this.textEncoding;\n let latinLen;\n let nonLatinLen;\n\n if (!encoding) {\n // count latin alphabet symbols and 8-bit range symbols + control symbols\n // if there are more latin characters, then use quoted-printable\n // encoding, otherwise use base64\n nonLatinLen = (value.match(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\u0080-\\uFFFF]/g) || []).length; // eslint-disable-line no-control-regex\n latinLen = (value.match(/[a-z]/gi) || []).length;\n // if there are more latin symbols than binary/unicode, then prefer Q, otherwise B\n encoding = nonLatinLen < latinLen ? 'Q' : 'B';\n }\n return encoding;\n }\n\n /**\n * Generates a message id\n *\n * @return {String} Random Message-ID value\n */\n _generateMessageId() {\n return (\n '<' +\n [2, 2, 2, 6].reduce(\n // crux to generate UUID-like random strings\n (prev, len) => prev + '-' + crypto.randomBytes(len).toString('hex'),\n crypto.randomBytes(4).toString('hex')\n ) +\n '@' +\n // try to use the domain of the FROM address or fallback to server hostname\n (this.getEnvelope().from || this.hostname || 'localhost').split('@').pop() +\n '>'\n );\n }\n}\n\nmodule.exports = MimeNode;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\nclass LastNewline extends Transform {\n constructor() {\n super();\n this.lastByte = false;\n }\n\n _transform(chunk, encoding, done) {\n if (chunk.length) {\n this.lastByte = chunk[chunk.length - 1];\n }\n\n this.push(chunk);\n done();\n }\n\n _flush(done) {\n if (this.lastByte === 0x0a) {\n return done();\n }\n if (this.lastByte === 0x0d) {\n this.push(Buffer.from('\\n'));\n return done();\n }\n this.push(Buffer.from('\\r\\n'));\n return done();\n }\n}\n\nmodule.exports = LastNewline;\n","'use strict';\n\nconst stream = require('stream');\nconst Transform = stream.Transform;\n\n/**\n * Ensures that only is used for linebreaks\n *\n * @param {Object} options Stream options\n */\nclass LeWindows extends Transform {\n constructor(options) {\n super(options);\n // init Transform\n this.options = options || {};\n }\n\n /**\n * Escapes dots\n */\n _transform(chunk, encoding, done) {\n let buf;\n let lastPos = 0;\n\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x0d) {\n // \\n\n buf = chunk.slice(lastPos, i);\n lastPos = i + 1;\n this.push(buf);\n }\n }\n if (lastPos && lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n this.push(buf);\n } else if (!lastPos) {\n this.push(chunk);\n }\n done();\n }\n}\n\nmodule.exports = LeWindows;\n","'use strict';\n\nconst stream = require('stream');\nconst Transform = stream.Transform;\n\n/**\n * Ensures that only sequences are used for linebreaks\n *\n * @param {Object} options Stream options\n */\nclass LeWindows extends Transform {\n constructor(options) {\n super(options);\n // init Transform\n this.options = options || {};\n this.lastByte = false;\n }\n\n /**\n * Escapes dots\n */\n _transform(chunk, encoding, done) {\n let buf;\n let lastPos = 0;\n\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x0a) {\n // \\n\n if ((i && chunk[i - 1] !== 0x0d) || (!i && this.lastByte !== 0x0d)) {\n if (i > lastPos) {\n buf = chunk.slice(lastPos, i);\n this.push(buf);\n }\n this.push(Buffer.from('\\r\\n'));\n lastPos = i + 1;\n }\n }\n }\n\n if (lastPos && lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n this.push(buf);\n } else if (!lastPos) {\n this.push(chunk);\n }\n\n this.lastByte = chunk[chunk.length - 1];\n done();\n }\n}\n\nmodule.exports = LeWindows;\n","'use strict';\n\nconst Mailer = require('./mailer');\nconst shared = require('./shared');\nconst SMTPPool = require('./smtp-pool');\nconst SMTPTransport = require('./smtp-transport');\nconst SendmailTransport = require('./sendmail-transport');\nconst StreamTransport = require('./stream-transport');\nconst JSONTransport = require('./json-transport');\nconst SESTransport = require('./ses-transport');\nconst nmfetch = require('./fetch');\nconst packageData = require('../package.json');\n\nconst ETHEREAL_API = (process.env.ETHEREAL_API || 'https://api.nodemailer.com').replace(/\\/+$/, '');\nconst ETHEREAL_WEB = (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\\/+$/, '');\nconst ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());\n\nlet testAccount = false;\n\nmodule.exports.createTransport = function (transporter, defaults) {\n let urlConfig;\n let options;\n let mailer;\n\n if (\n // provided transporter is a configuration object, not transporter plugin\n (typeof transporter === 'object' && typeof transporter.send !== 'function') ||\n // provided transporter looks like a connection url\n (typeof transporter === 'string' && /^(smtps?|direct):/i.test(transporter))\n ) {\n if ((urlConfig = typeof transporter === 'string' ? transporter : transporter.url)) {\n // parse a configuration URL into configuration options\n options = shared.parseConnectionUrl(urlConfig);\n } else {\n options = transporter;\n }\n\n if (options.pool) {\n transporter = new SMTPPool(options);\n } else if (options.sendmail) {\n transporter = new SendmailTransport(options);\n } else if (options.streamTransport) {\n transporter = new StreamTransport(options);\n } else if (options.jsonTransport) {\n transporter = new JSONTransport(options);\n } else if (options.SES) {\n transporter = new SESTransport(options);\n } else {\n transporter = new SMTPTransport(options);\n }\n }\n\n mailer = new Mailer(transporter, options, defaults);\n\n return mailer;\n};\n\nmodule.exports.createTestAccount = function (apiUrl, callback) {\n let promise;\n\n if (!callback && typeof apiUrl === 'function') {\n callback = apiUrl;\n apiUrl = false;\n }\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n if (ETHEREAL_CACHE && testAccount) {\n setImmediate(() => callback(null, testAccount));\n return promise;\n }\n\n apiUrl = apiUrl || ETHEREAL_API;\n\n let chunks = [];\n let chunklen = 0;\n\n let req = nmfetch(apiUrl + '/user', {\n contentType: 'application/json',\n method: 'POST',\n body: Buffer.from(\n JSON.stringify({\n requestor: packageData.name,\n version: packageData.version\n })\n )\n });\n\n req.on('readable', () => {\n let chunk;\n while ((chunk = req.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n req.once('error', err => callback(err));\n\n req.once('end', () => {\n let res = Buffer.concat(chunks, chunklen);\n let data;\n let err;\n try {\n data = JSON.parse(res.toString());\n } catch (E) {\n err = E;\n }\n if (err) {\n return callback(err);\n }\n if (data.status !== 'success' || data.error) {\n return callback(new Error(data.error || 'Request failed'));\n }\n delete data.status;\n testAccount = data;\n callback(null, testAccount);\n });\n\n return promise;\n};\n\nmodule.exports.getTestMessageUrl = function (info) {\n if (!info || !info.response) {\n return false;\n }\n\n let infoProps = new Map();\n info.response.replace(/\\[([^\\]]+)\\]$/, (m, props) => {\n props.replace(/\\b([A-Z0-9]+)=([^\\s]+)/g, (m, key, value) => {\n infoProps.set(key, value);\n });\n });\n\n if (infoProps.has('STATUS') && infoProps.has('MSGID')) {\n return (testAccount.web || ETHEREAL_WEB) + '/message/' + infoProps.get('MSGID');\n }\n\n return false;\n};\n","/*\n\nCopied from https://github.com/mathiasbynens/punycode.js/blob/ef3505c8abb5143a00d53ce59077c9f7f4b2ac47/punycode.js\n\nCopyright Mathias Bynens \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n/* eslint callback-return: 0, no-bitwise: 0, eqeqeq: 0, prefer-arrow-callback: 0, object-shorthand: 0 */\n\n'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n overflow: 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n throw new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n const result = [];\n let length = array.length;\n while (length--) {\n result[length] = callback(array[length]);\n }\n return result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n const parts = domain.split('@');\n let result = '';\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n domain = parts[1];\n }\n // Avoid `split(regex)` for IE8 compatibility. See #17.\n domain = domain.replace(regexSeparators, '\\x2E');\n const labels = domain.split('.');\n const encoded = map(labels, callback).join('.');\n return result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n const output = [];\n let counter = 0;\n const length = string.length;\n while (counter < length) {\n const value = string.charCodeAt(counter++);\n if (value >= 0xd800 && value <= 0xdbff && counter < length) {\n // It's a high surrogate, and there is a next character.\n const extra = string.charCodeAt(counter++);\n if ((extra & 0xfc00) == 0xdc00) {\n // Low surrogate.\n output.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function (codePoint) {\n if (codePoint >= 0x30 && codePoint < 0x3a) {\n return 26 + (codePoint - 0x30);\n }\n if (codePoint >= 0x41 && codePoint < 0x5b) {\n return codePoint - 0x41;\n }\n if (codePoint >= 0x61 && codePoint < 0x7b) {\n return codePoint - 0x61;\n }\n return base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function (digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function (delta, numPoints, firstTime) {\n let k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; /* no initialization */ delta > (baseMinusTMin * tMax) >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + ((baseMinusTMin + 1) * delta) / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function (input) {\n // Don't use UCS-2.\n const output = [];\n const inputLength = input.length;\n let i = 0;\n let n = initialN;\n let bias = initialBias;\n\n // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n\n let basic = input.lastIndexOf(delimiter);\n if (basic < 0) {\n basic = 0;\n }\n\n for (let j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n output.push(input.charCodeAt(j));\n }\n\n // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n\n for (let index = basic > 0 ? basic + 1 : 0; index < inputLength /* no final expression */; ) {\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n const oldi = i;\n for (let w = 1, k = base /* no condition */; ; k += base) {\n if (index >= inputLength) {\n error('invalid-input');\n }\n\n const digit = basicToDigit(input.charCodeAt(index++));\n\n if (digit >= base) {\n error('invalid-input');\n }\n if (digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n\n i += digit * w;\n const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (digit < t) {\n break;\n }\n\n const baseMinusT = base - t;\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n\n w *= baseMinusT;\n }\n\n const out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0);\n\n // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n\n n += floor(i / out);\n i %= out;\n\n // Insert `n` at position `i` of the output.\n output.splice(i++, 0, n);\n }\n\n return String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function (input) {\n const output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n const inputLength = input.length;\n\n // Initialize the state.\n let n = initialN;\n let delta = 0;\n let bias = initialBias;\n\n // Handle the basic code points.\n for (const currentValue of input) {\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n const basicLength = output.length;\n let handledCPCount = basicLength;\n\n // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n let m = maxInt;\n for (const currentValue of input) {\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow.\n const handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (const currentValue of input) {\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n if (currentValue === n) {\n // Represent delta as a generalized variable-length integer.\n let q = delta;\n for (let k = base /* no condition */; ; k += base) {\n const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (q < t) {\n break;\n }\n const qMinusT = q - t;\n const baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + (qMinusT % baseMinusT), 0)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function (input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function (input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n /**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n version: '2.3.1',\n /**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see \n * @memberOf punycode\n * @type Object\n */\n ucs2: {\n decode: ucs2decode,\n encode: ucs2encode\n },\n decode: decode,\n encode: encode,\n toASCII: toASCII,\n toUnicode: toUnicode\n};\n\nmodule.exports = punycode;\n","'use strict';\n\nconst Transform = require('stream').Transform;\n\n/**\n * Encodes a Buffer into a Quoted-Printable encoded string\n *\n * @param {Buffer} buffer Buffer to convert\n * @returns {String} Quoted-Printable encoded string\n */\nfunction encode(buffer) {\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer, 'utf-8');\n }\n\n // usable characters that do not need encoding\n let ranges = [\n // https://tools.ietf.org/html/rfc2045#section-6.7\n [0x09], // \n [0x0a], // \n [0x0d], // \n [0x20, 0x3c], // !\"#$%&'()*+,-./0123456789:;\n [0x3e, 0x7e] // >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\n ];\n let result = '';\n let ord;\n\n for (let i = 0, len = buffer.length; i < len; i++) {\n ord = buffer[i];\n // if the char is in allowed range, then keep as is, unless it is a WS in the end of a line\n if (checkRanges(ord, ranges) && !((ord === 0x20 || ord === 0x09) && (i === len - 1 || buffer[i + 1] === 0x0a || buffer[i + 1] === 0x0d))) {\n result += String.fromCharCode(ord);\n continue;\n }\n result += '=' + (ord < 0x10 ? '0' : '') + ord.toString(16).toUpperCase();\n }\n\n return result;\n}\n\n/**\n * Adds soft line breaks to a Quoted-Printable string\n *\n * @param {String} str Quoted-Printable encoded string that might need line wrapping\n * @param {Number} [lineLength=76] Maximum allowed length for a line\n * @returns {String} Soft-wrapped Quoted-Printable encoded string\n */\nfunction wrap(str, lineLength) {\n str = (str || '').toString();\n lineLength = lineLength || 76;\n\n if (str.length <= lineLength) {\n return str;\n }\n\n let pos = 0;\n let len = str.length;\n let match, code, line;\n let lineMargin = Math.floor(lineLength / 3);\n let result = '';\n\n // insert soft linebreaks where needed\n while (pos < len) {\n line = str.substr(pos, lineLength);\n if ((match = line.match(/\\r\\n/))) {\n line = line.substr(0, match.index + match[0].length);\n result += line;\n pos += line.length;\n continue;\n }\n\n if (line.substr(-1) === '\\n') {\n // nothing to change here\n result += line;\n pos += line.length;\n continue;\n } else if ((match = line.substr(-lineMargin).match(/\\n.*?$/))) {\n // truncate to nearest line break\n line = line.substr(0, line.length - (match[0].length - 1));\n result += line;\n pos += line.length;\n continue;\n } else if (line.length > lineLength - lineMargin && (match = line.substr(-lineMargin).match(/[ \\t.,!?][^ \\t.,!?]*$/))) {\n // truncate to nearest space\n line = line.substr(0, line.length - (match[0].length - 1));\n } else if (line.match(/[=][\\da-f]{0,2}$/i)) {\n // push incomplete encoding sequences to the next line\n if ((match = line.match(/[=][\\da-f]{0,1}$/i))) {\n line = line.substr(0, line.length - match[0].length);\n }\n\n // ensure that utf-8 sequences are not split\n while (line.length > 3 && line.length < len - pos && !line.match(/^(?:=[\\da-f]{2}){1,4}$/i) && (match = line.match(/[=][\\da-f]{2}$/gi))) {\n code = parseInt(match[0].substr(1, 2), 16);\n if (code < 128) {\n break;\n }\n\n line = line.substr(0, line.length - 3);\n\n if (code >= 0xc0) {\n break;\n }\n }\n }\n\n if (pos + line.length < len && line.substr(-1) !== '\\n') {\n if (line.length === lineLength && line.match(/[=][\\da-f]{2}$/i)) {\n line = line.substr(0, line.length - 3);\n } else if (line.length === lineLength) {\n line = line.substr(0, line.length - 1);\n }\n pos += line.length;\n line += '=\\r\\n';\n } else {\n pos += line.length;\n }\n\n result += line;\n }\n\n return result;\n}\n\n/**\n * Helper function to check if a number is inside provided ranges\n *\n * @param {Number} nr Number to check for\n * @param {Array} ranges An Array of allowed values\n * @returns {Boolean} True if the value was found inside allowed ranges, false otherwise\n */\nfunction checkRanges(nr, ranges) {\n for (let i = ranges.length - 1; i >= 0; i--) {\n if (!ranges[i].length) {\n continue;\n }\n if (ranges[i].length === 1 && nr === ranges[i][0]) {\n return true;\n }\n if (ranges[i].length === 2 && nr >= ranges[i][0] && nr <= ranges[i][1]) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Creates a transform stream for encoding data to Quoted-Printable encoding\n *\n * @constructor\n * @param {Object} options Stream options\n * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping\n */\nclass Encoder extends Transform {\n constructor(options) {\n super();\n\n // init Transform\n this.options = options || {};\n\n if (this.options.lineLength !== false) {\n this.options.lineLength = this.options.lineLength || 76;\n }\n\n this._curLine = '';\n\n this.inputBytes = 0;\n this.outputBytes = 0;\n }\n\n _transform(chunk, encoding, done) {\n let qp;\n\n if (encoding !== 'buffer') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n if (!chunk || !chunk.length) {\n return done();\n }\n\n this.inputBytes += chunk.length;\n\n if (this.options.lineLength) {\n qp = this._curLine + encode(chunk);\n qp = wrap(qp, this.options.lineLength);\n qp = qp.replace(/(^|\\n)([^\\n]*)$/, (match, lineBreak, lastLine) => {\n this._curLine = lastLine;\n return lineBreak;\n });\n\n if (qp) {\n this.outputBytes += qp.length;\n this.push(qp);\n }\n } else {\n qp = encode(chunk);\n this.outputBytes += qp.length;\n this.push(qp, 'ascii');\n }\n\n done();\n }\n\n _flush(done) {\n if (this._curLine) {\n this.outputBytes += this._curLine.length;\n this.push(this._curLine, 'ascii');\n }\n done();\n }\n}\n\n// expose to the world\nmodule.exports = {\n encode,\n wrap,\n Encoder\n};\n","'use strict';\n\nconst spawn = require('child_process').spawn;\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\n\n/**\n * Generates a Transport object for Sendmail\n *\n * Possible options can be the following:\n *\n * * **path** optional path to sendmail binary\n * * **newline** either 'windows' or 'unix'\n * * **args** an array of arguments for the sendmail binary\n *\n * @constructor\n * @param {Object} optional config parameter for Sendmail\n */\nclass SendmailTransport {\n constructor(options) {\n options = options || {};\n\n // use a reference to spawn for mocking purposes\n this._spawn = spawn;\n\n this.options = options || {};\n\n this.name = 'Sendmail';\n this.version = packageData.version;\n\n this.path = 'sendmail';\n this.args = false;\n this.winbreak = false;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'sendmail'\n });\n\n if (options) {\n if (typeof options === 'string') {\n this.path = options;\n } else if (typeof options === 'object') {\n if (options.path) {\n this.path = options.path;\n }\n if (Array.isArray(options.args)) {\n this.args = options.args;\n }\n this.winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes((options.newline || '').toString().toLowerCase());\n }\n }\n }\n\n /**\n *

Compiles a mailcomposer message and forwards it to handler that sends it.

\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, done) {\n // Sendmail strips this header line by itself\n mail.message.keepBcc = true;\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n let args;\n let sendmail;\n let returned;\n\n const hasInvalidAddresses = []\n .concat(envelope.from || [])\n .concat(envelope.to || [])\n .some(addr => /^-/.test(addr));\n if (hasInvalidAddresses) {\n return done(new Error('Can not send mail. Invalid envelope addresses.'));\n }\n\n if (this.args) {\n // force -i to keep single dots\n args = ['-i'].concat(this.args).concat(envelope.to);\n } else {\n args = ['-i'].concat(envelope.from ? ['-f', envelope.from] : []).concat(envelope.to);\n }\n\n let callback = err => {\n if (returned) {\n // ignore any additional responses, already done\n return;\n }\n returned = true;\n if (typeof done === 'function') {\n if (err) {\n return done(err);\n } else {\n return done(null, {\n envelope: mail.data.envelope || mail.message.getEnvelope(),\n messageId,\n response: 'Messages queued for delivery'\n });\n }\n }\n };\n\n try {\n sendmail = this._spawn(this.path, args);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'spawn',\n messageId\n },\n 'Error occurred while spawning sendmail. %s',\n E.message\n );\n return callback(E);\n }\n\n if (sendmail) {\n sendmail.on('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'spawn',\n messageId\n },\n 'Error occurred when sending message %s. %s',\n messageId,\n err.message\n );\n callback(err);\n });\n\n sendmail.once('exit', code => {\n if (!code) {\n return callback();\n }\n let err;\n if (code === 127) {\n err = new Error('Sendmail command not found, process exited with code ' + code);\n } else {\n err = new Error('Sendmail exited with code ' + code);\n }\n\n this.logger.error(\n {\n err,\n tnx: 'stdin',\n messageId\n },\n 'Error sending message %s to sendmail. %s',\n messageId,\n err.message\n );\n callback(err);\n });\n sendmail.once('close', callback);\n\n sendmail.stdin.on('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'stdin',\n messageId\n },\n 'Error occurred when piping message %s to sendmail. %s',\n messageId,\n err.message\n );\n callback(err);\n });\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n let sourceStream = mail.message.createReadStream();\n sourceStream.once('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'stdin',\n messageId\n },\n 'Error occurred when generating message %s. %s',\n messageId,\n err.message\n );\n sendmail.kill('SIGINT'); // do not deliver the message\n callback(err);\n });\n\n sourceStream.pipe(sendmail.stdin);\n } else {\n return callback(new Error('sendmail was not found'));\n }\n }\n}\n\nmodule.exports = SendmailTransport;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\nconst LeWindows = require('../mime-node/le-windows');\n\n/**\n * Generates a Transport object for AWS SES\n *\n * Possible options can be the following:\n *\n * * **sendingRate** optional Number specifying how many messages per second should be delivered to SES\n * * **maxConnections** optional Number specifying max number of parallel connections to SES\n *\n * @constructor\n * @param {Object} optional config parameter\n */\nclass SESTransport extends EventEmitter {\n constructor(options) {\n super();\n options = options || {};\n\n this.options = options || {};\n this.ses = this.options.SES;\n\n this.name = 'SESTransport';\n this.version = packageData.version;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'ses-transport'\n });\n\n // parallel sending connections\n this.maxConnections = Number(this.options.maxConnections) || Infinity;\n this.connections = 0;\n\n // max messages per second\n this.sendingRate = Number(this.options.sendingRate) || Infinity;\n this.sendingRateTTL = null;\n this.rateInterval = 1000; // milliseconds\n this.rateMessages = [];\n\n this.pending = [];\n\n this.idling = true;\n\n setImmediate(() => {\n if (this.idling) {\n this.emit('idle');\n }\n });\n }\n\n /**\n * Schedules a sending of a message\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, callback) {\n if (this.connections >= this.maxConnections) {\n this.idling = false;\n return this.pending.push({\n mail,\n callback\n });\n }\n\n if (!this._checkSendingRate()) {\n this.idling = false;\n return this.pending.push({\n mail,\n callback\n });\n }\n\n this._send(mail, (...args) => {\n setImmediate(() => callback(...args));\n this._sent();\n });\n }\n\n _checkRatedQueue() {\n if (this.connections >= this.maxConnections || !this._checkSendingRate()) {\n return;\n }\n\n if (!this.pending.length) {\n if (!this.idling) {\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n\n let next = this.pending.shift();\n this._send(next.mail, (...args) => {\n setImmediate(() => next.callback(...args));\n this._sent();\n });\n }\n\n _checkSendingRate() {\n clearTimeout(this.sendingRateTTL);\n\n let now = Date.now();\n let oldest = false;\n // delete older messages\n for (let i = this.rateMessages.length - 1; i >= 0; i--) {\n if (this.rateMessages[i].ts >= now - this.rateInterval && (!oldest || this.rateMessages[i].ts < oldest)) {\n oldest = this.rateMessages[i].ts;\n }\n\n if (this.rateMessages[i].ts < now - this.rateInterval && !this.rateMessages[i].pending) {\n this.rateMessages.splice(i, 1);\n }\n }\n\n if (this.rateMessages.length < this.sendingRate) {\n return true;\n }\n\n let delay = Math.max(oldest + 1001, now + 20);\n this.sendingRateTTL = setTimeout(() => this._checkRatedQueue(), now - delay);\n\n try {\n this.sendingRateTTL.unref();\n } catch (E) {\n // Ignore. Happens on envs with non-node timer implementation\n }\n\n return false;\n }\n\n _sent() {\n this.connections--;\n this._checkRatedQueue();\n }\n\n /**\n * Returns true if there are free slots in the queue\n */\n isIdle() {\n return this.idling;\n }\n\n /**\n * Compiles a mailcomposer message and forwards it to SES\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n _send(mail, callback) {\n let statObject = {\n ts: Date.now(),\n pending: true\n };\n this.connections++;\n this.rateMessages.push(statObject);\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n let getRawMessage = next => {\n // do not use Message-ID and Date in DKIM signature\n if (!mail.data._dkim) {\n mail.data._dkim = {};\n }\n if (mail.data._dkim.skipFields && typeof mail.data._dkim.skipFields === 'string') {\n mail.data._dkim.skipFields += ':date:message-id';\n } else {\n mail.data._dkim.skipFields = 'date:message-id';\n }\n\n let sourceStream = mail.message.createReadStream();\n let stream = sourceStream.pipe(new LeWindows());\n let chunks = [];\n let chunklen = 0;\n\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n sourceStream.once('error', err => stream.emit('error', err));\n\n stream.once('error', err => {\n next(err);\n });\n\n stream.once('end', () => next(null, Buffer.concat(chunks, chunklen)));\n };\n\n setImmediate(() =>\n getRawMessage((err, raw) => {\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed creating message for %s. %s',\n messageId,\n err.message\n );\n statObject.pending = false;\n return callback(err);\n }\n\n let sesMessage = {\n RawMessage: {\n // required\n Data: raw // required\n },\n Source: envelope.from,\n Destinations: envelope.to\n };\n\n Object.keys(mail.data.ses || {}).forEach(key => {\n sesMessage[key] = mail.data.ses[key];\n });\n\n let ses = (this.ses.aws ? this.ses.ses : this.ses) || {};\n let aws = this.ses.aws || {};\n\n let getRegion = cb => {\n if (ses.config && typeof ses.config.region === 'function') {\n // promise\n return ses.config\n .region()\n .then(region => cb(null, region))\n .catch(err => cb(err));\n }\n return cb(null, (ses.config && ses.config.region) || 'us-east-1');\n };\n\n getRegion((err, region) => {\n if (err || !region) {\n region = 'us-east-1';\n }\n\n let sendPromise;\n if (typeof ses.send === 'function' && aws.SendRawEmailCommand) {\n // v3 API\n sendPromise = ses.send(new aws.SendRawEmailCommand(sesMessage));\n } else {\n // v2 API\n sendPromise = ses.sendRawEmail(sesMessage).promise();\n }\n\n sendPromise\n .then(data => {\n if (region === 'us-east-1') {\n region = 'email';\n }\n\n statObject.pending = false;\n callback(null, {\n envelope: {\n from: envelope.from,\n to: envelope.to\n },\n messageId: '<' + data.MessageId + (!/@/.test(data.MessageId) ? '@' + region + '.amazonses.com' : '') + '>',\n response: data.MessageId,\n raw\n });\n })\n .catch(err => {\n this.logger.error(\n {\n err,\n tnx: 'send'\n },\n 'Send error for %s: %s',\n messageId,\n err.message\n );\n statObject.pending = false;\n callback(err);\n });\n });\n })\n );\n }\n\n /**\n * Verifies SES configuration\n *\n * @param {Function} callback Callback function\n */\n verify(callback) {\n let promise;\n let ses = (this.ses.aws ? this.ses.ses : this.ses) || {};\n let aws = this.ses.aws || {};\n\n const sesMessage = {\n RawMessage: {\n // required\n Data: 'From: invalid@invalid\\r\\nTo: invalid@invalid\\r\\n Subject: Invalid\\r\\n\\r\\nInvalid'\n },\n Source: 'invalid@invalid',\n Destinations: ['invalid@invalid']\n };\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n const cb = err => {\n if (err && (err.code || err.Code) !== 'InvalidParameterValue') {\n return callback(err);\n }\n return callback(null, true);\n };\n\n if (typeof ses.send === 'function' && aws.SendRawEmailCommand) {\n // v3 API\n sesMessage.RawMessage.Data = Buffer.from(sesMessage.RawMessage.Data);\n ses.send(new aws.SendRawEmailCommand(sesMessage), cb);\n } else {\n // v2 API\n ses.sendRawEmail(sesMessage, cb);\n }\n\n return promise;\n }\n}\n\nmodule.exports = SESTransport;\n","/* eslint no-console: 0 */\n\n'use strict';\n\nconst urllib = require('url');\nconst util = require('util');\nconst fs = require('fs');\nconst nmfetch = require('../fetch');\nconst dns = require('dns');\nconst net = require('net');\nconst os = require('os');\n\nconst DNS_TTL = 5 * 60 * 1000;\n\nlet networkInterfaces;\ntry {\n networkInterfaces = os.networkInterfaces();\n} catch (err) {\n // fails on some systems\n}\n\nmodule.exports.networkInterfaces = networkInterfaces;\n\nconst isFamilySupported = (family, allowInternal) => {\n let networkInterfaces = module.exports.networkInterfaces;\n if (!networkInterfaces) {\n // hope for the best\n return true;\n }\n\n const familySupported =\n // crux that replaces Object.values(networkInterfaces) as Object.values is not supported in nodejs v6\n Object.keys(networkInterfaces)\n .map(key => networkInterfaces[key])\n // crux that replaces .flat() as it is not supported in older Node versions (v10 and older)\n .reduce((acc, val) => acc.concat(val), [])\n .filter(i => !i.internal || allowInternal)\n .filter(i => i.family === 'IPv' + family || i.family === family).length > 0;\n\n return familySupported;\n};\n\nconst resolver = (family, hostname, options, callback) => {\n options = options || {};\n const familySupported = isFamilySupported(family, options.allowInternalNetworkInterfaces);\n\n if (!familySupported) {\n return callback(null, []);\n }\n\n const resolver = dns.Resolver ? new dns.Resolver(options) : dns;\n resolver['resolve' + family](hostname, (err, addresses) => {\n if (err) {\n switch (err.code) {\n case dns.NODATA:\n case dns.NOTFOUND:\n case dns.NOTIMP:\n case dns.SERVFAIL:\n case dns.CONNREFUSED:\n case dns.REFUSED:\n case 'EAI_AGAIN':\n return callback(null, []);\n }\n return callback(err);\n }\n return callback(null, Array.isArray(addresses) ? addresses : [].concat(addresses || []));\n });\n};\n\nconst dnsCache = (module.exports.dnsCache = new Map());\n\nconst formatDNSValue = (value, extra) => {\n if (!value) {\n return Object.assign({}, extra || {});\n }\n\n return Object.assign(\n {\n servername: value.servername,\n host:\n !value.addresses || !value.addresses.length\n ? null\n : value.addresses.length === 1\n ? value.addresses[0]\n : value.addresses[Math.floor(Math.random() * value.addresses.length)]\n },\n extra || {}\n );\n};\n\nmodule.exports.resolveHostname = (options, callback) => {\n options = options || {};\n\n if (!options.host && options.servername) {\n options.host = options.servername;\n }\n\n if (!options.host || net.isIP(options.host)) {\n // nothing to do here\n let value = {\n addresses: [options.host],\n servername: options.servername || false\n };\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n }\n\n let cached;\n if (dnsCache.has(options.host)) {\n cached = dnsCache.get(options.host);\n\n if (!cached.expires || cached.expires >= Date.now()) {\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true\n })\n );\n }\n }\n\n resolver(4, options.host, options, (err, addresses) => {\n if (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n\n if (addresses && addresses.length) {\n let value = {\n addresses,\n servername: options.servername || options.host\n };\n\n dnsCache.set(options.host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n }\n\n resolver(6, options.host, options, (err, addresses) => {\n if (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n\n if (addresses && addresses.length) {\n let value = {\n addresses,\n servername: options.servername || options.host\n };\n\n dnsCache.set(options.host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n }\n\n try {\n dns.lookup(options.host, { all: true }, (err, addresses) => {\n if (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n\n let address = addresses\n ? addresses\n .filter(addr => isFamilySupported(addr.family))\n .map(addr => addr.address)\n .shift()\n : false;\n\n if (addresses && addresses.length && !address) {\n // there are addresses but none can be used\n console.warn(`Failed to resolve IPv${addresses[0].family} addresses with current network`);\n }\n\n if (!address && cached) {\n // nothing was found, fallback to cached value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true\n })\n );\n }\n\n let value = {\n addresses: address ? [address] : [options.host],\n servername: options.servername || options.host\n };\n\n dnsCache.set(options.host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n\n return callback(\n null,\n formatDNSValue(value, {\n cached: false\n })\n );\n });\n } catch (err) {\n if (cached) {\n // ignore error, use expired value\n return callback(\n null,\n formatDNSValue(cached.value, {\n cached: true,\n error: err\n })\n );\n }\n return callback(err);\n }\n });\n });\n};\n/**\n * Parses connection url to a structured configuration object\n *\n * @param {String} str Connection url\n * @return {Object} Configuration object\n */\nmodule.exports.parseConnectionUrl = str => {\n str = str || '';\n let options = {};\n\n [urllib.parse(str, true)].forEach(url => {\n let auth;\n\n switch (url.protocol) {\n case 'smtp:':\n options.secure = false;\n break;\n case 'smtps:':\n options.secure = true;\n break;\n case 'direct:':\n options.direct = true;\n break;\n }\n\n if (!isNaN(url.port) && Number(url.port)) {\n options.port = Number(url.port);\n }\n\n if (url.hostname) {\n options.host = url.hostname;\n }\n\n if (url.auth) {\n auth = url.auth.split(':');\n\n if (!options.auth) {\n options.auth = {};\n }\n\n options.auth.user = auth.shift();\n options.auth.pass = auth.join(':');\n }\n\n Object.keys(url.query || {}).forEach(key => {\n let obj = options;\n let lKey = key;\n let value = url.query[key];\n\n if (!isNaN(value)) {\n value = Number(value);\n }\n\n switch (value) {\n case 'true':\n value = true;\n break;\n case 'false':\n value = false;\n break;\n }\n\n // tls is nested object\n if (key.indexOf('tls.') === 0) {\n lKey = key.substr(4);\n if (!options.tls) {\n options.tls = {};\n }\n obj = options.tls;\n } else if (key.indexOf('.') >= 0) {\n // ignore nested properties besides tls\n return;\n }\n\n if (!(lKey in obj)) {\n obj[lKey] = value;\n }\n });\n });\n\n return options;\n};\n\nmodule.exports._logFunc = (logger, level, defaults, data, message, ...args) => {\n let entry = {};\n\n Object.keys(defaults || {}).forEach(key => {\n if (key !== 'level') {\n entry[key] = defaults[key];\n }\n });\n\n Object.keys(data || {}).forEach(key => {\n if (key !== 'level') {\n entry[key] = data[key];\n }\n });\n\n logger[level](entry, message, ...args);\n};\n\n/**\n * Returns a bunyan-compatible logger interface. Uses either provided logger or\n * creates a default console logger\n *\n * @param {Object} [options] Options object that might include 'logger' value\n * @return {Object} bunyan compatible logger\n */\nmodule.exports.getLogger = (options, defaults) => {\n options = options || {};\n\n let response = {};\n let levels = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];\n\n if (!options.logger) {\n // use vanity logger\n levels.forEach(level => {\n response[level] = () => false;\n });\n return response;\n }\n\n let logger = options.logger;\n\n if (options.logger === true) {\n // create console logger\n logger = createDefaultLogger(levels);\n }\n\n levels.forEach(level => {\n response[level] = (data, message, ...args) => {\n module.exports._logFunc(logger, level, defaults, data, message, ...args);\n };\n });\n\n return response;\n};\n\n/**\n * Wrapper for creating a callback that either resolves or rejects a promise\n * based on input\n *\n * @param {Function} resolve Function to run if callback is called\n * @param {Function} reject Function to run if callback ends with an error\n */\nmodule.exports.callbackPromise = (resolve, reject) =>\n function () {\n let args = Array.from(arguments);\n let err = args.shift();\n if (err) {\n reject(err);\n } else {\n resolve(...args);\n }\n };\n\nmodule.exports.parseDataURI = uri => {\n let input = uri;\n let commaPos = input.indexOf(',');\n if (!commaPos) {\n return uri;\n }\n\n let data = input.substring(commaPos + 1);\n let metaStr = input.substring('data:'.length, commaPos);\n\n let encoding;\n\n let metaEntries = metaStr.split(';');\n let lastMetaEntry = metaEntries.length > 1 ? metaEntries[metaEntries.length - 1] : false;\n if (lastMetaEntry && lastMetaEntry.indexOf('=') < 0) {\n encoding = lastMetaEntry.toLowerCase();\n metaEntries.pop();\n }\n\n let contentType = metaEntries.shift() || 'application/octet-stream';\n let params = {};\n for (let entry of metaEntries) {\n let sep = entry.indexOf('=');\n if (sep >= 0) {\n let key = entry.substring(0, sep);\n let value = entry.substring(sep + 1);\n params[key] = value;\n }\n }\n\n switch (encoding) {\n case 'base64':\n data = Buffer.from(data, 'base64');\n break;\n case 'utf8':\n data = Buffer.from(data);\n break;\n default:\n try {\n data = Buffer.from(decodeURIComponent(data));\n } catch (err) {\n data = Buffer.from(data);\n }\n data = Buffer.from(data);\n }\n\n return { data, encoding, contentType, params };\n};\n\n/**\n * Resolves a String or a Buffer value for content value. Useful if the value\n * is a Stream or a file or an URL. If the value is a Stream, overwrites\n * the stream object with the resolved value (you can't stream a value twice).\n *\n * This is useful when you want to create a plugin that needs a content value,\n * for example the `html` or `text` value as a String or a Buffer but not as\n * a file path or an URL.\n *\n * @param {Object} data An object or an Array you want to resolve an element for\n * @param {String|Number} key Property name or an Array index\n * @param {Function} callback Callback function with (err, value)\n */\nmodule.exports.resolveContent = (data, key, callback) => {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = module.exports.callbackPromise(resolve, reject);\n });\n }\n\n let content = (data && data[key] && data[key].content) || data[key];\n let contentStream;\n let encoding = ((typeof data[key] === 'object' && data[key].encoding) || 'utf8')\n .toString()\n .toLowerCase()\n .replace(/[-_\\s]/g, '');\n\n if (!content) {\n return callback(null, content);\n }\n\n if (typeof content === 'object') {\n if (typeof content.pipe === 'function') {\n return resolveStream(content, (err, value) => {\n if (err) {\n return callback(err);\n }\n // we can't stream twice the same content, so we need\n // to replace the stream object with the streaming result\n if (data[key].content) {\n data[key].content = value;\n } else {\n data[key] = value;\n }\n callback(null, value);\n });\n } else if (/^https?:\\/\\//i.test(content.path || content.href)) {\n contentStream = nmfetch(content.path || content.href);\n return resolveStream(contentStream, callback);\n } else if (/^data:/i.test(content.path || content.href)) {\n let parsedDataUri = module.exports.parseDataURI(content.path || content.href);\n\n if (!parsedDataUri || !parsedDataUri.data) {\n return callback(null, Buffer.from(0));\n }\n return callback(null, parsedDataUri.data);\n } else if (content.path) {\n return resolveStream(fs.createReadStream(content.path), callback);\n }\n }\n\n if (typeof data[key].content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {\n content = Buffer.from(data[key].content, encoding);\n }\n\n // default action, return as is\n setImmediate(() => callback(null, content));\n\n return promise;\n};\n\n/**\n * Copies properties from source objects to target objects\n */\nmodule.exports.assign = function (/* target, ... sources */) {\n let args = Array.from(arguments);\n let target = args.shift() || {};\n\n args.forEach(source => {\n Object.keys(source || {}).forEach(key => {\n if (['tls', 'auth'].includes(key) && source[key] && typeof source[key] === 'object') {\n // tls and auth are special keys that need to be enumerated separately\n // other objects are passed as is\n if (!target[key]) {\n // ensure that target has this key\n target[key] = {};\n }\n Object.keys(source[key]).forEach(subKey => {\n target[key][subKey] = source[key][subKey];\n });\n } else {\n target[key] = source[key];\n }\n });\n });\n return target;\n};\n\nmodule.exports.encodeXText = str => {\n // ! 0x21\n // + 0x2B\n // = 0x3D\n // ~ 0x7E\n if (!/[^\\x21-\\x2A\\x2C-\\x3C\\x3E-\\x7E]/.test(str)) {\n return str;\n }\n let buf = Buffer.from(str);\n let result = '';\n for (let i = 0, len = buf.length; i < len; i++) {\n let c = buf[i];\n if (c < 0x21 || c > 0x7e || c === 0x2b || c === 0x3d) {\n result += '+' + (c < 0x10 ? '0' : '') + c.toString(16).toUpperCase();\n } else {\n result += String.fromCharCode(c);\n }\n }\n return result;\n};\n\n/**\n * Streams a stream value into a Buffer\n *\n * @param {Object} stream Readable stream\n * @param {Function} callback Callback function with (err, value)\n */\nfunction resolveStream(stream, callback) {\n let responded = false;\n let chunks = [];\n let chunklen = 0;\n\n stream.on('error', err => {\n if (responded) {\n return;\n }\n\n responded = true;\n callback(err);\n });\n\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n stream.on('end', () => {\n if (responded) {\n return;\n }\n responded = true;\n\n let value;\n\n try {\n value = Buffer.concat(chunks, chunklen);\n } catch (E) {\n return callback(E);\n }\n callback(null, value);\n });\n}\n\n/**\n * Generates a bunyan-like logger that prints to console\n *\n * @returns {Object} Bunyan logger instance\n */\nfunction createDefaultLogger(levels) {\n let levelMaxLen = 0;\n let levelNames = new Map();\n levels.forEach(level => {\n if (level.length > levelMaxLen) {\n levelMaxLen = level.length;\n }\n });\n\n levels.forEach(level => {\n let levelName = level.toUpperCase();\n if (levelName.length < levelMaxLen) {\n levelName += ' '.repeat(levelMaxLen - levelName.length);\n }\n levelNames.set(level, levelName);\n });\n\n let print = (level, entry, message, ...args) => {\n let prefix = '';\n if (entry) {\n if (entry.tnx === 'server') {\n prefix = 'S: ';\n } else if (entry.tnx === 'client') {\n prefix = 'C: ';\n }\n\n if (entry.sid) {\n prefix = '[' + entry.sid + '] ' + prefix;\n }\n\n if (entry.cid) {\n prefix = '[#' + entry.cid + '] ' + prefix;\n }\n }\n\n message = util.format(message, ...args);\n message.split(/\\r?\\n/).forEach(line => {\n console.log('[%s] %s %s', new Date().toISOString().substr(0, 19).replace(/T/, ' '), levelNames.get(level), prefix + line);\n });\n };\n\n let logger = {};\n levels.forEach(level => {\n logger[level] = print.bind(null, level);\n });\n\n return logger;\n}\n","'use strict';\n\nconst stream = require('stream');\nconst Transform = stream.Transform;\n\n/**\n * Escapes dots in the beginning of lines. Ends the stream with .\n * Also makes sure that only sequences are used for linebreaks\n *\n * @param {Object} options Stream options\n */\nclass DataStream extends Transform {\n constructor(options) {\n super(options);\n // init Transform\n this.options = options || {};\n this._curLine = '';\n\n this.inByteCount = 0;\n this.outByteCount = 0;\n this.lastByte = false;\n }\n\n /**\n * Escapes dots\n */\n _transform(chunk, encoding, done) {\n let chunks = [];\n let chunklen = 0;\n let i,\n len,\n lastPos = 0;\n let buf;\n\n if (!chunk || !chunk.length) {\n return done();\n }\n\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk);\n }\n\n this.inByteCount += chunk.length;\n\n for (i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x2e) {\n // .\n if ((i && chunk[i - 1] === 0x0a) || (!i && (!this.lastByte || this.lastByte === 0x0a))) {\n buf = chunk.slice(lastPos, i + 1);\n chunks.push(buf);\n chunks.push(Buffer.from('.'));\n chunklen += buf.length + 1;\n lastPos = i + 1;\n }\n } else if (chunk[i] === 0x0a) {\n // .\n if ((i && chunk[i - 1] !== 0x0d) || (!i && this.lastByte !== 0x0d)) {\n if (i > lastPos) {\n buf = chunk.slice(lastPos, i);\n chunks.push(buf);\n chunklen += buf.length + 2;\n } else {\n chunklen += 2;\n }\n chunks.push(Buffer.from('\\r\\n'));\n lastPos = i + 1;\n }\n }\n }\n\n if (chunklen) {\n // add last piece\n if (lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n chunks.push(buf);\n chunklen += buf.length;\n }\n\n this.outByteCount += chunklen;\n this.push(Buffer.concat(chunks, chunklen));\n } else {\n this.outByteCount += chunk.length;\n this.push(chunk);\n }\n\n this.lastByte = chunk[chunk.length - 1];\n done();\n }\n\n /**\n * Finalizes the stream with a dot on a single line\n */\n _flush(done) {\n let buf;\n if (this.lastByte === 0x0a) {\n buf = Buffer.from('.\\r\\n');\n } else if (this.lastByte === 0x0d) {\n buf = Buffer.from('\\n.\\r\\n');\n } else {\n buf = Buffer.from('\\r\\n.\\r\\n');\n }\n this.outByteCount += buf.length;\n this.push(buf);\n done();\n }\n}\n\nmodule.exports = DataStream;\n","'use strict';\n\n/**\n * Minimal HTTP/S proxy client\n */\n\nconst net = require('net');\nconst tls = require('tls');\nconst urllib = require('url');\n\n/**\n * Establishes proxied connection to destinationPort\n *\n * httpProxyClient(\"http://localhost:3128/\", 80, \"google.com\", function(err, socket){\n * socket.write(\"GET / HTTP/1.0\\r\\n\\r\\n\");\n * });\n *\n * @param {String} proxyUrl proxy configuration, etg \"http://proxy.host:3128/\"\n * @param {Number} destinationPort Port to open in destination host\n * @param {String} destinationHost Destination hostname\n * @param {Function} callback Callback to run with the rocket object once connection is established\n */\nfunction httpProxyClient(proxyUrl, destinationPort, destinationHost, callback) {\n let proxy = urllib.parse(proxyUrl);\n\n // create a socket connection to the proxy server\n let options;\n let connect;\n let socket;\n\n options = {\n host: proxy.hostname,\n port: Number(proxy.port) ? Number(proxy.port) : proxy.protocol === 'https:' ? 443 : 80\n };\n\n if (proxy.protocol === 'https:') {\n // we can use untrusted proxies as long as we verify actual SMTP certificates\n options.rejectUnauthorized = false;\n connect = tls.connect.bind(tls);\n } else {\n connect = net.connect.bind(net);\n }\n\n // Error harness for initial connection. Once connection is established, the responsibility\n // to handle errors is passed to whoever uses this socket\n let finished = false;\n let tempSocketErr = err => {\n if (finished) {\n return;\n }\n finished = true;\n try {\n socket.destroy();\n } catch (E) {\n // ignore\n }\n callback(err);\n };\n\n let timeoutErr = () => {\n let err = new Error('Proxy socket timed out');\n err.code = 'ETIMEDOUT';\n tempSocketErr(err);\n };\n\n socket = connect(options, () => {\n if (finished) {\n return;\n }\n\n let reqHeaders = {\n Host: destinationHost + ':' + destinationPort,\n Connection: 'close'\n };\n if (proxy.auth) {\n reqHeaders['Proxy-Authorization'] = 'Basic ' + Buffer.from(proxy.auth).toString('base64');\n }\n\n socket.write(\n // HTTP method\n 'CONNECT ' +\n destinationHost +\n ':' +\n destinationPort +\n ' HTTP/1.1\\r\\n' +\n // HTTP request headers\n Object.keys(reqHeaders)\n .map(key => key + ': ' + reqHeaders[key])\n .join('\\r\\n') +\n // End request\n '\\r\\n\\r\\n'\n );\n\n let headers = '';\n let onSocketData = chunk => {\n let match;\n let remainder;\n\n if (finished) {\n return;\n }\n\n headers += chunk.toString('binary');\n if ((match = headers.match(/\\r\\n\\r\\n/))) {\n socket.removeListener('data', onSocketData);\n\n remainder = headers.substr(match.index + match[0].length);\n headers = headers.substr(0, match.index);\n if (remainder) {\n socket.unshift(Buffer.from(remainder, 'binary'));\n }\n\n // proxy connection is now established\n finished = true;\n\n // check response code\n match = headers.match(/^HTTP\\/\\d+\\.\\d+ (\\d+)/i);\n if (!match || (match[1] || '').charAt(0) !== '2') {\n try {\n socket.destroy();\n } catch (E) {\n // ignore\n }\n return callback(new Error('Invalid response from proxy' + ((match && ': ' + match[1]) || '')));\n }\n\n socket.removeListener('error', tempSocketErr);\n socket.removeListener('timeout', timeoutErr);\n socket.setTimeout(0);\n\n return callback(null, socket);\n }\n };\n socket.on('data', onSocketData);\n });\n\n socket.setTimeout(httpProxyClient.timeout || 30 * 1000);\n socket.on('timeout', timeoutErr);\n\n socket.once('error', tempSocketErr);\n}\n\nmodule.exports = httpProxyClient;\n","'use strict';\n\nconst packageInfo = require('../../package.json');\nconst EventEmitter = require('events').EventEmitter;\nconst net = require('net');\nconst tls = require('tls');\nconst os = require('os');\nconst crypto = require('crypto');\nconst DataStream = require('./data-stream');\nconst PassThrough = require('stream').PassThrough;\nconst shared = require('../shared');\n\n// default timeout values in ms\nconst CONNECTION_TIMEOUT = 2 * 60 * 1000; // how much to wait for the connection to be established\nconst SOCKET_TIMEOUT = 10 * 60 * 1000; // how much to wait for socket inactivity before disconnecting the client\nconst GREETING_TIMEOUT = 30 * 1000; // how much to wait after connection is established but SMTP greeting is not receieved\nconst DNS_TIMEOUT = 30 * 1000; // how much to wait for resolveHostname\n\n/**\n * Generates a SMTP connection object\n *\n * Optional options object takes the following possible properties:\n *\n * * **port** - is the port to connect to (defaults to 587 or 465)\n * * **host** - is the hostname or IP address to connect to (defaults to 'localhost')\n * * **secure** - use SSL\n * * **ignoreTLS** - ignore server support for STARTTLS\n * * **requireTLS** - forces the client to use STARTTLS\n * * **name** - the name of the client server\n * * **localAddress** - outbound address to bind to (see: http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener)\n * * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 10000)\n * * **connectionTimeout** - how many milliseconds to wait for the connection to establish\n * * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 1 hour)\n * * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)\n * * **lmtp** - if true, uses LMTP instead of SMTP protocol\n * * **logger** - bunyan compatible logger interface\n * * **debug** - if true pass SMTP traffic to the logger\n * * **tls** - options for createCredentials\n * * **socket** - existing socket to use instead of creating a new one (see: http://nodejs.org/api/net.html#net_class_net_socket)\n * * **secured** - boolean indicates that the provided socket has already been upgraded to tls\n *\n * @constructor\n * @namespace SMTP Client module\n * @param {Object} [options] Option properties\n */\nclass SMTPConnection extends EventEmitter {\n constructor(options) {\n super(options);\n\n this.id = crypto.randomBytes(8).toString('base64').replace(/\\W/g, '');\n this.stage = 'init';\n\n this.options = options || {};\n\n this.secureConnection = !!this.options.secure;\n this.alreadySecured = !!this.options.secured;\n\n this.port = Number(this.options.port) || (this.secureConnection ? 465 : 587);\n this.host = this.options.host || 'localhost';\n\n this.allowInternalNetworkInterfaces = this.options.allowInternalNetworkInterfaces || false;\n\n if (typeof this.options.secure === 'undefined' && this.port === 465) {\n // if secure option is not set but port is 465, then default to secure\n this.secureConnection = true;\n }\n\n this.name = this.options.name || this._getHostname();\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-connection',\n sid: this.id\n });\n\n this.customAuth = new Map();\n Object.keys(this.options.customAuth || {}).forEach(key => {\n let mapKey = (key || '').toString().trim().toUpperCase();\n if (!mapKey) {\n return;\n }\n this.customAuth.set(mapKey, this.options.customAuth[key]);\n });\n\n /**\n * Expose version nr, just for the reference\n * @type {String}\n */\n this.version = packageInfo.version;\n\n /**\n * If true, then the user is authenticated\n * @type {Boolean}\n */\n this.authenticated = false;\n\n /**\n * If set to true, this instance is no longer active\n * @private\n */\n this.destroyed = false;\n\n /**\n * Defines if the current connection is secure or not. If not,\n * STARTTLS can be used if available\n * @private\n */\n this.secure = !!this.secureConnection;\n\n /**\n * Store incomplete messages coming from the server\n * @private\n */\n this._remainder = '';\n\n /**\n * Unprocessed responses from the server\n * @type {Array}\n */\n this._responseQueue = [];\n\n this.lastServerResponse = false;\n\n /**\n * The socket connecting to the server\n * @publick\n */\n this._socket = false;\n\n /**\n * Lists supported auth mechanisms\n * @private\n */\n this._supportedAuth = [];\n\n /**\n * Set to true, if EHLO response includes \"AUTH\".\n * If false then authentication is not tried\n */\n this.allowsAuth = false;\n\n /**\n * Includes current envelope (from, to)\n * @private\n */\n this._envelope = false;\n\n /**\n * Lists supported extensions\n * @private\n */\n this._supportedExtensions = [];\n\n /**\n * Defines the maximum allowed size for a single message\n * @private\n */\n this._maxAllowedSize = 0;\n\n /**\n * Function queue to run if a data chunk comes from the server\n * @private\n */\n this._responseActions = [];\n this._recipientQueue = [];\n\n /**\n * Timeout variable for waiting the greeting\n * @private\n */\n this._greetingTimeout = false;\n\n /**\n * Timeout variable for waiting the connection to start\n * @private\n */\n this._connectionTimeout = false;\n\n /**\n * If the socket is deemed already closed\n * @private\n */\n this._destroyed = false;\n\n /**\n * If the socket is already being closed\n * @private\n */\n this._closing = false;\n\n /**\n * Callbacks for socket's listeners\n */\n this._onSocketData = chunk => this._onData(chunk);\n this._onSocketError = error => this._onError(error, 'ESOCKET', false, 'CONN');\n this._onSocketClose = () => this._onClose();\n this._onSocketEnd = () => this._onEnd();\n this._onSocketTimeout = () => this._onTimeout();\n }\n\n /**\n * Creates a connection to a SMTP server and sets up connection\n * listener\n */\n connect(connectCallback) {\n if (typeof connectCallback === 'function') {\n this.once('connect', () => {\n this.logger.debug(\n {\n tnx: 'smtp'\n },\n 'SMTP handshake finished'\n );\n connectCallback();\n });\n\n const isDestroyedMessage = this._isDestroyedMessage('connect');\n if (isDestroyedMessage) {\n return connectCallback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'CONN'));\n }\n }\n\n let opts = {\n port: this.port,\n host: this.host,\n allowInternalNetworkInterfaces: this.allowInternalNetworkInterfaces,\n timeout: this.options.dnsTimeout || DNS_TIMEOUT\n };\n\n if (this.options.localAddress) {\n opts.localAddress = this.options.localAddress;\n }\n\n let setupConnectionHandlers = () => {\n this._connectionTimeout = setTimeout(() => {\n this._onError('Connection timeout', 'ETIMEDOUT', false, 'CONN');\n }, this.options.connectionTimeout || CONNECTION_TIMEOUT);\n\n this._socket.on('error', this._onSocketError);\n };\n\n if (this.options.connection) {\n // connection is already opened\n this._socket = this.options.connection;\n if (this.secureConnection && !this.alreadySecured) {\n setImmediate(() =>\n this._upgradeConnection(err => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');\n return;\n }\n this._onConnect();\n })\n );\n } else {\n setImmediate(() => this._onConnect());\n }\n return;\n } else if (this.options.socket) {\n // socket object is set up but not yet connected\n this._socket = this.options.socket;\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket.connect(this.port, this.host, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else if (this.secureConnection) {\n // connect using tls\n if (this.options.tls) {\n Object.keys(this.options.tls).forEach(key => {\n opts[key] = this.options.tls[key];\n });\n }\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = tls.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else {\n // connect using plaintext\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = net.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n }\n }\n\n /**\n * Sends QUIT\n */\n quit() {\n this._sendCommand('QUIT');\n this._responseActions.push(this.close);\n }\n\n /**\n * Closes the connection to the server\n */\n close() {\n clearTimeout(this._connectionTimeout);\n clearTimeout(this._greetingTimeout);\n this._responseActions = [];\n\n // allow to run this function only once\n if (this._closing) {\n return;\n }\n this._closing = true;\n\n let closeMethod = 'end';\n\n if (this.stage === 'init') {\n // Close the socket immediately when connection timed out\n closeMethod = 'destroy';\n }\n\n this.logger.debug(\n {\n tnx: 'smtp'\n },\n 'Closing connection to the server using \"%s\"',\n closeMethod\n );\n\n let socket = (this._socket && this._socket.socket) || this._socket;\n\n if (socket && !socket.destroyed) {\n try {\n this._socket[closeMethod]();\n } catch (E) {\n // just ignore\n }\n }\n\n this._destroy();\n }\n\n /**\n * Authenticate user\n */\n login(authData, callback) {\n const isDestroyedMessage = this._isDestroyedMessage('login');\n if (isDestroyedMessage) {\n return callback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));\n }\n\n this._auth = authData || {};\n // Select SASL authentication method\n this._authMethod = (this._auth.method || '').toString().trim().toUpperCase() || false;\n\n if (!this._authMethod && this._auth.oauth2 && !this._auth.credentials) {\n this._authMethod = 'XOAUTH2';\n } else if (!this._authMethod || (this._authMethod === 'XOAUTH2' && !this._auth.oauth2)) {\n // use first supported\n this._authMethod = (this._supportedAuth[0] || 'PLAIN').toUpperCase().trim();\n }\n\n if (this._authMethod !== 'XOAUTH2' && (!this._auth.credentials || !this._auth.credentials.user || !this._auth.credentials.pass)) {\n if ((this._auth.user && this._auth.pass) || this.customAuth.has(this._authMethod)) {\n this._auth.credentials = {\n user: this._auth.user,\n pass: this._auth.pass,\n options: this._auth.options\n };\n } else {\n return callback(this._formatError('Missing credentials for \"' + this._authMethod + '\"', 'EAUTH', false, 'API'));\n }\n }\n\n if (this.customAuth.has(this._authMethod)) {\n let handler = this.customAuth.get(this._authMethod);\n let lastResponse;\n let returned = false;\n\n let resolve = () => {\n if (returned) {\n return;\n }\n returned = true;\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n },\n 'User %s authenticated',\n JSON.stringify(this._auth.user)\n );\n this.authenticated = true;\n callback(null, true);\n };\n\n let reject = err => {\n if (returned) {\n return;\n }\n returned = true;\n callback(this._formatError(err, 'EAUTH', lastResponse, 'AUTH ' + this._authMethod));\n };\n\n let handlerResponse = handler({\n auth: this._auth,\n method: this._authMethod,\n\n extensions: [].concat(this._supportedExtensions),\n authMethods: [].concat(this._supportedAuth),\n maxAllowedSize: this._maxAllowedSize || false,\n\n sendCommand: (cmd, done) => {\n let promise;\n\n if (!done) {\n promise = new Promise((resolve, reject) => {\n done = shared.callbackPromise(resolve, reject);\n });\n }\n\n this._responseActions.push(str => {\n lastResponse = str;\n\n let codes = str.match(/^(\\d+)(?:\\s(\\d+\\.\\d+\\.\\d+))?\\s/);\n let data = {\n command: cmd,\n response: str\n };\n if (codes) {\n data.status = Number(codes[1]) || 0;\n if (codes[2]) {\n data.code = codes[2];\n }\n data.text = str.substr(codes[0].length);\n } else {\n data.text = str;\n data.status = 0; // just in case we need to perform numeric comparisons\n }\n done(null, data);\n });\n setImmediate(() => this._sendCommand(cmd));\n\n return promise;\n },\n\n resolve,\n reject\n });\n\n if (handlerResponse && typeof handlerResponse.catch === 'function') {\n // a promise was returned\n handlerResponse.then(resolve).catch(reject);\n }\n\n return;\n }\n\n switch (this._authMethod) {\n case 'XOAUTH2':\n this._handleXOauth2Token(false, callback);\n return;\n case 'LOGIN':\n this._responseActions.push(str => {\n this._actionAUTH_LOGIN_USER(str, callback);\n });\n this._sendCommand('AUTH LOGIN');\n return;\n case 'PLAIN':\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, callback);\n });\n this._sendCommand(\n 'AUTH PLAIN ' +\n Buffer.from(\n //this._auth.user+'\\u0000'+\n '\\u0000' + // skip authorization identity as it causes problems with some servers\n this._auth.credentials.user +\n '\\u0000' +\n this._auth.credentials.pass,\n 'utf-8'\n ).toString('base64'),\n // log entry without passwords\n 'AUTH PLAIN ' +\n Buffer.from(\n //this._auth.user+'\\u0000'+\n '\\u0000' + // skip authorization identity as it causes problems with some servers\n this._auth.credentials.user +\n '\\u0000' +\n '/* secret */',\n 'utf-8'\n ).toString('base64')\n );\n return;\n case 'CRAM-MD5':\n this._responseActions.push(str => {\n this._actionAUTH_CRAM_MD5(str, callback);\n });\n this._sendCommand('AUTH CRAM-MD5');\n return;\n }\n\n return callback(this._formatError('Unknown authentication method \"' + this._authMethod + '\"', 'EAUTH', false, 'API'));\n }\n\n /**\n * Sends a message\n *\n * @param {Object} envelope Envelope object, {from: addr, to: [addr]}\n * @param {Object} message String, Buffer or a Stream\n * @param {Function} callback Callback to return once sending is completed\n */\n send(envelope, message, done) {\n if (!message) {\n return done(this._formatError('Empty message', 'EMESSAGE', false, 'API'));\n }\n\n const isDestroyedMessage = this._isDestroyedMessage('send message');\n if (isDestroyedMessage) {\n return done(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));\n }\n\n // reject larger messages than allowed\n if (this._maxAllowedSize && envelope.size > this._maxAllowedSize) {\n return setImmediate(() => {\n done(this._formatError('Message size larger than allowed ' + this._maxAllowedSize, 'EMESSAGE', false, 'MAIL FROM'));\n });\n }\n\n // ensure that callback is only called once\n let returned = false;\n let callback = function () {\n if (returned) {\n return;\n }\n returned = true;\n\n done(...arguments);\n };\n\n if (typeof message.on === 'function') {\n message.on('error', err => callback(this._formatError(err, 'ESTREAM', false, 'API')));\n }\n\n let startTime = Date.now();\n this._setEnvelope(envelope, (err, info) => {\n if (err) {\n return callback(err);\n }\n let envelopeTime = Date.now();\n let stream = this._createSendStream((err, str) => {\n if (err) {\n return callback(err);\n }\n\n info.envelopeTime = envelopeTime - startTime;\n info.messageTime = Date.now() - envelopeTime;\n info.messageSize = stream.outByteCount;\n info.response = str;\n\n return callback(null, info);\n });\n if (typeof message.pipe === 'function') {\n message.pipe(stream);\n } else {\n stream.write(message);\n stream.end();\n }\n });\n }\n\n /**\n * Resets connection state\n *\n * @param {Function} callback Callback to return once connection is reset\n */\n reset(callback) {\n this._sendCommand('RSET');\n this._responseActions.push(str => {\n if (str.charAt(0) !== '2') {\n return callback(this._formatError('Could not reset session state. response=' + str, 'EPROTOCOL', str, 'RSET'));\n }\n this._envelope = false;\n return callback(null, true);\n });\n }\n\n /**\n * Connection listener that is run when the connection to\n * the server is opened\n *\n * @event\n */\n _onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }\n\n /**\n * 'data' listener for data coming from the server\n *\n * @event\n * @param {Buffer} chunk Data chunk coming from the server\n */\n _onData(chunk) {\n if (this._destroyed || !chunk || !chunk.length) {\n return;\n }\n\n let data = (chunk || '').toString('binary');\n let lines = (this._remainder + data).split(/\\r?\\n/);\n let lastline;\n\n this._remainder = lines.pop();\n\n for (let i = 0, len = lines.length; i < len; i++) {\n if (this._responseQueue.length) {\n lastline = this._responseQueue[this._responseQueue.length - 1];\n if (/^\\d+-/.test(lastline.split('\\n').pop())) {\n this._responseQueue[this._responseQueue.length - 1] += '\\n' + lines[i];\n continue;\n }\n }\n this._responseQueue.push(lines[i]);\n }\n\n if (this._responseQueue.length) {\n lastline = this._responseQueue[this._responseQueue.length - 1];\n if (/^\\d+-/.test(lastline.split('\\n').pop())) {\n return;\n }\n }\n\n this._processResponse();\n }\n\n /**\n * 'error' listener for the socket\n *\n * @event\n * @param {Error} err Error object\n * @param {String} type Error name\n */\n _onError(err, type, data, command) {\n clearTimeout(this._connectionTimeout);\n clearTimeout(this._greetingTimeout);\n\n if (this._destroyed) {\n // just ignore, already closed\n // this might happen when a socket is canceled because of reached timeout\n // but the socket timeout error itself receives only after\n return;\n }\n\n err = this._formatError(err, type, data, command);\n\n this.logger.error(data, err.message);\n\n this.emit('error', err);\n this.close();\n }\n\n _formatError(message, type, response, command) {\n let err;\n\n if (/Error\\]$/i.test(Object.prototype.toString.call(message))) {\n err = message;\n } else {\n err = new Error(message);\n }\n\n if (type && type !== 'Error') {\n err.code = type;\n }\n\n if (response) {\n err.response = response;\n err.message += ': ' + response;\n }\n\n let responseCode = (typeof response === 'string' && Number((response.match(/^\\d+/) || [])[0])) || false;\n if (responseCode) {\n err.responseCode = responseCode;\n }\n\n if (command) {\n err.command = command;\n }\n\n return err;\n }\n\n /**\n * 'close' listener for the socket\n *\n * @event\n */\n _onClose() {\n let serverResponse = false;\n\n if (this._remainder && this._remainder.trim()) {\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug(\n {\n tnx: 'server'\n },\n this._remainder.replace(/\\r?\\n$/, '')\n );\n }\n this.lastServerResponse = serverResponse = this._remainder.trim();\n }\n\n this.logger.info(\n {\n tnx: 'network'\n },\n 'Connection closed'\n );\n\n if (this.upgrading && !this._destroyed) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ETLS', serverResponse, 'CONN');\n } else if (![this._actionGreeting, this.close].includes(this._responseActions[0]) && !this._destroyed) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ECONNECTION', serverResponse, 'CONN');\n } else if (/^[45]\\d{2}\\b/.test(serverResponse)) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ECONNECTION', serverResponse, 'CONN');\n }\n\n this._destroy();\n }\n\n /**\n * 'end' listener for the socket\n *\n * @event\n */\n _onEnd() {\n if (this._socket && !this._socket.destroyed) {\n this._socket.destroy();\n }\n }\n\n /**\n * 'timeout' listener for the socket\n *\n * @event\n */\n _onTimeout() {\n return this._onError(new Error('Timeout'), 'ETIMEDOUT', false, 'CONN');\n }\n\n /**\n * Destroys the client, emits 'end'\n */\n _destroy() {\n if (this._destroyed) {\n return;\n }\n this._destroyed = true;\n this.emit('end');\n }\n\n /**\n * Upgrades the connection to TLS\n *\n * @param {Function} callback Callback function to run when the connection\n * has been secured\n */\n _upgradeConnection(callback) {\n // do not remove all listeners or it breaks node v0.10 as there's\n // apparently a 'finish' event set that would be cleared as well\n\n // we can safely keep 'error', 'end', 'close' etc. events\n this._socket.removeListener('data', this._onSocketData); // incoming data is going to be gibberish from this point onwards\n this._socket.removeListener('timeout', this._onSocketTimeout); // timeout will be re-set for the new socket object\n\n let socketPlain = this._socket;\n let opts = {\n socket: this._socket,\n host: this.host\n };\n\n Object.keys(this.options.tls || {}).forEach(key => {\n opts[key] = this.options.tls[key];\n });\n\n this.upgrading = true;\n // tls.connect is not an asynchronous function however it may still throw errors and requires to be wrapped with try/catch\n try {\n this._socket = tls.connect(opts, () => {\n this.secure = true;\n this.upgrading = false;\n this._socket.on('data', this._onSocketData);\n\n socketPlain.removeListener('close', this._onSocketClose);\n socketPlain.removeListener('end', this._onSocketEnd);\n\n return callback(null, true);\n });\n } catch (err) {\n return callback(err);\n }\n\n this._socket.on('error', this._onSocketError);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT); // 10 min.\n this._socket.on('timeout', this._onSocketTimeout);\n\n // resume in case the socket was paused\n socketPlain.resume();\n }\n\n /**\n * Processes queued responses from the server\n *\n * @param {Boolean} force If true, ignores _processing flag\n */\n _processResponse() {\n if (!this._responseQueue.length) {\n return false;\n }\n\n let str = (this.lastServerResponse = (this._responseQueue.shift() || '').toString());\n\n if (/^\\d+-/.test(str.split('\\n').pop())) {\n // keep waiting for the final part of multiline response\n return;\n }\n\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug(\n {\n tnx: 'server'\n },\n str.replace(/\\r?\\n$/, '')\n );\n }\n\n if (!str.trim()) {\n // skip unexpected empty lines\n setImmediate(() => this._processResponse());\n }\n\n let action = this._responseActions.shift();\n\n if (typeof action === 'function') {\n action.call(this, str);\n setImmediate(() => this._processResponse());\n } else {\n return this._onError(new Error('Unexpected Response'), 'EPROTOCOL', str, 'CONN');\n }\n }\n\n /**\n * Send a command to the server, append \\r\\n\n *\n * @param {String} str String to be sent to the server\n * @param {String} logStr Optional string to be used for logging instead of the actual string\n */\n _sendCommand(str, logStr) {\n if (this._destroyed) {\n // Connection already closed, can't send any more data\n return;\n }\n\n if (this._socket.destroyed) {\n return this.close();\n }\n\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug(\n {\n tnx: 'client'\n },\n (logStr || str || '').toString().replace(/\\r?\\n$/, '')\n );\n }\n\n this._socket.write(Buffer.from(str + '\\r\\n', 'utf-8'));\n }\n\n /**\n * Initiates a new message by submitting envelope data, starting with\n * MAIL FROM: command\n *\n * @param {Object} envelope Envelope object in the form of\n * {from:'...', to:['...']}\n * or\n * {from:{address:'...',name:'...'}, to:[address:'...',name:'...']}\n */\n _setEnvelope(envelope, callback) {\n let args = [];\n let useSmtpUtf8 = false;\n\n this._envelope = envelope || {};\n this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '').toString().trim();\n\n this._envelope.to = [].concat(this._envelope.to || []).map(to => ((to && to.address) || to || '').toString().trim());\n\n if (!this._envelope.to.length) {\n return callback(this._formatError('No recipients defined', 'EENVELOPE', false, 'API'));\n }\n\n if (this._envelope.from && /[\\r\\n<>]/.test(this._envelope.from)) {\n return callback(this._formatError('Invalid sender ' + JSON.stringify(this._envelope.from), 'EENVELOPE', false, 'API'));\n }\n\n // check if the sender address uses only ASCII characters,\n // otherwise require usage of SMTPUTF8 extension\n if (/[\\x80-\\uFFFF]/.test(this._envelope.from)) {\n useSmtpUtf8 = true;\n }\n\n for (let i = 0, len = this._envelope.to.length; i < len; i++) {\n if (!this._envelope.to[i] || /[\\r\\n<>]/.test(this._envelope.to[i])) {\n return callback(this._formatError('Invalid recipient ' + JSON.stringify(this._envelope.to[i]), 'EENVELOPE', false, 'API'));\n }\n\n // check if the recipients addresses use only ASCII characters,\n // otherwise require usage of SMTPUTF8 extension\n if (/[\\x80-\\uFFFF]/.test(this._envelope.to[i])) {\n useSmtpUtf8 = true;\n }\n }\n\n // clone the recipients array for latter manipulation\n this._envelope.rcptQueue = JSON.parse(JSON.stringify(this._envelope.to || []));\n this._envelope.rejected = [];\n this._envelope.rejectedErrors = [];\n this._envelope.accepted = [];\n\n if (this._envelope.dsn) {\n try {\n this._envelope.dsn = this._setDsnEnvelope(this._envelope.dsn);\n } catch (err) {\n return callback(this._formatError('Invalid DSN ' + err.message, 'EENVELOPE', false, 'API'));\n }\n }\n\n this._responseActions.push(str => {\n this._actionMAIL(str, callback);\n });\n\n // If the server supports SMTPUTF8 and the envelope includes an internationalized\n // email address then append SMTPUTF8 keyword to the MAIL FROM command\n if (useSmtpUtf8 && this._supportedExtensions.includes('SMTPUTF8')) {\n args.push('SMTPUTF8');\n this._usingSmtpUtf8 = true;\n }\n\n // If the server supports 8BITMIME and the message might contain non-ascii bytes\n // then append the 8BITMIME keyword to the MAIL FROM command\n if (this._envelope.use8BitMime && this._supportedExtensions.includes('8BITMIME')) {\n args.push('BODY=8BITMIME');\n this._using8BitMime = true;\n }\n\n if (this._envelope.size && this._supportedExtensions.includes('SIZE')) {\n args.push('SIZE=' + this._envelope.size);\n }\n\n // If the server supports DSN and the envelope includes an DSN prop\n // then append DSN params to the MAIL FROM command\n if (this._envelope.dsn && this._supportedExtensions.includes('DSN')) {\n if (this._envelope.dsn.ret) {\n args.push('RET=' + shared.encodeXText(this._envelope.dsn.ret));\n }\n if (this._envelope.dsn.envid) {\n args.push('ENVID=' + shared.encodeXText(this._envelope.dsn.envid));\n }\n }\n\n this._sendCommand('MAIL FROM:<' + this._envelope.from + '>' + (args.length ? ' ' + args.join(' ') : ''));\n }\n\n _setDsnEnvelope(params) {\n let ret = (params.ret || params.return || '').toString().toUpperCase() || null;\n if (ret) {\n switch (ret) {\n case 'HDRS':\n case 'HEADERS':\n ret = 'HDRS';\n break;\n case 'FULL':\n case 'BODY':\n ret = 'FULL';\n break;\n }\n }\n\n if (ret && !['FULL', 'HDRS'].includes(ret)) {\n throw new Error('ret: ' + JSON.stringify(ret));\n }\n\n let envid = (params.envid || params.id || '').toString() || null;\n\n let notify = params.notify || null;\n if (notify) {\n if (typeof notify === 'string') {\n notify = notify.split(',');\n }\n notify = notify.map(n => n.trim().toUpperCase());\n let validNotify = ['NEVER', 'SUCCESS', 'FAILURE', 'DELAY'];\n let invaliNotify = notify.filter(n => !validNotify.includes(n));\n if (invaliNotify.length || (notify.length > 1 && notify.includes('NEVER'))) {\n throw new Error('notify: ' + JSON.stringify(notify.join(',')));\n }\n notify = notify.join(',');\n }\n\n let orcpt = (params.recipient || params.orcpt || '').toString() || null;\n if (orcpt && orcpt.indexOf(';') < 0) {\n orcpt = 'rfc822;' + orcpt;\n }\n\n return {\n ret,\n envid,\n notify,\n orcpt\n };\n }\n\n _getDsnRcptToArgs() {\n let args = [];\n // If the server supports DSN and the envelope includes an DSN prop\n // then append DSN params to the RCPT TO command\n if (this._envelope.dsn && this._supportedExtensions.includes('DSN')) {\n if (this._envelope.dsn.notify) {\n args.push('NOTIFY=' + shared.encodeXText(this._envelope.dsn.notify));\n }\n if (this._envelope.dsn.orcpt) {\n args.push('ORCPT=' + shared.encodeXText(this._envelope.dsn.orcpt));\n }\n }\n return args.length ? ' ' + args.join(' ') : '';\n }\n\n _createSendStream(callback) {\n let dataStream = new DataStream();\n let logStream;\n\n if (this.options.lmtp) {\n this._envelope.accepted.forEach((recipient, i) => {\n let final = i === this._envelope.accepted.length - 1;\n this._responseActions.push(str => {\n this._actionLMTPStream(recipient, final, str, callback);\n });\n });\n } else {\n this._responseActions.push(str => {\n this._actionSMTPStream(str, callback);\n });\n }\n\n dataStream.pipe(this._socket, {\n end: false\n });\n\n if (this.options.debug) {\n logStream = new PassThrough();\n logStream.on('readable', () => {\n let chunk;\n while ((chunk = logStream.read())) {\n this.logger.debug(\n {\n tnx: 'message'\n },\n chunk.toString('binary').replace(/\\r?\\n$/, '')\n );\n }\n });\n dataStream.pipe(logStream);\n }\n\n dataStream.once('end', () => {\n this.logger.info(\n {\n tnx: 'message',\n inByteCount: dataStream.inByteCount,\n outByteCount: dataStream.outByteCount\n },\n '<%s bytes encoded mime message (source size %s bytes)>',\n dataStream.outByteCount,\n dataStream.inByteCount\n );\n });\n\n return dataStream;\n }\n\n /** ACTIONS **/\n\n /**\n * Will be run after the connection is created and the server sends\n * a greeting. If the incoming message starts with 220 initiate\n * SMTP session by sending EHLO command\n *\n * @param {String} str Message from the server\n */\n _actionGreeting(str) {\n clearTimeout(this._greetingTimeout);\n\n if (str.substr(0, 3) !== '220') {\n this._onError(new Error('Invalid greeting. response=' + str), 'EPROTOCOL', str, 'CONN');\n return;\n }\n\n if (this.options.lmtp) {\n this._responseActions.push(this._actionLHLO);\n this._sendCommand('LHLO ' + this.name);\n } else {\n this._responseActions.push(this._actionEHLO);\n this._sendCommand('EHLO ' + this.name);\n }\n }\n\n /**\n * Handles server response for LHLO command. If it yielded in\n * error, emit 'error', otherwise treat this as an EHLO response\n *\n * @param {String} str Message from the server\n */\n _actionLHLO(str) {\n if (str.charAt(0) !== '2') {\n this._onError(new Error('Invalid LHLO. response=' + str), 'EPROTOCOL', str, 'LHLO');\n return;\n }\n\n this._actionEHLO(str);\n }\n\n /**\n * Handles server response for EHLO command. If it yielded in\n * error, try HELO instead, otherwise initiate TLS negotiation\n * if STARTTLS is supported by the server or move into the\n * authentication phase.\n *\n * @param {String} str Message from the server\n */\n _actionEHLO(str) {\n let match;\n\n if (str.substr(0, 3) === '421') {\n this._onError(new Error('Server terminates connection. response=' + str), 'ECONNECTION', str, 'EHLO');\n return;\n }\n\n if (str.charAt(0) !== '2') {\n if (this.options.requireTLS) {\n this._onError(new Error('EHLO failed but HELO does not support required STARTTLS. response=' + str), 'ECONNECTION', str, 'EHLO');\n return;\n }\n\n // Try HELO instead\n this._responseActions.push(this._actionHELO);\n this._sendCommand('HELO ' + this.name);\n return;\n }\n\n this._ehloLines = str\n .split(/\\r?\\n/)\n .map(line => line.replace(/^\\d+[ -]/, '').trim())\n .filter(line => line)\n .slice(1);\n\n // Detect if the server supports STARTTLS\n if (!this.secure && !this.options.ignoreTLS && (/[ -]STARTTLS\\b/im.test(str) || this.options.requireTLS)) {\n this._sendCommand('STARTTLS');\n this._responseActions.push(this._actionSTARTTLS);\n return;\n }\n\n // Detect if the server supports SMTPUTF8\n if (/[ -]SMTPUTF8\\b/im.test(str)) {\n this._supportedExtensions.push('SMTPUTF8');\n }\n\n // Detect if the server supports DSN\n if (/[ -]DSN\\b/im.test(str)) {\n this._supportedExtensions.push('DSN');\n }\n\n // Detect if the server supports 8BITMIME\n if (/[ -]8BITMIME\\b/im.test(str)) {\n this._supportedExtensions.push('8BITMIME');\n }\n\n // Detect if the server supports PIPELINING\n if (/[ -]PIPELINING\\b/im.test(str)) {\n this._supportedExtensions.push('PIPELINING');\n }\n\n // Detect if the server supports AUTH\n if (/[ -]AUTH\\b/i.test(str)) {\n this.allowsAuth = true;\n }\n\n // Detect if the server supports PLAIN auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)PLAIN/i.test(str)) {\n this._supportedAuth.push('PLAIN');\n }\n\n // Detect if the server supports LOGIN auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)LOGIN/i.test(str)) {\n this._supportedAuth.push('LOGIN');\n }\n\n // Detect if the server supports CRAM-MD5 auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)CRAM-MD5/i.test(str)) {\n this._supportedAuth.push('CRAM-MD5');\n }\n\n // Detect if the server supports XOAUTH2 auth\n if (/[ -]AUTH(?:(\\s+|=)[^\\n]*\\s+|\\s+|=)XOAUTH2/i.test(str)) {\n this._supportedAuth.push('XOAUTH2');\n }\n\n // Detect if the server supports SIZE extensions (and the max allowed size)\n if ((match = str.match(/[ -]SIZE(?:[ \\t]+(\\d+))?/im))) {\n this._supportedExtensions.push('SIZE');\n this._maxAllowedSize = Number(match[1]) || 0;\n }\n\n this.emit('connect');\n }\n\n /**\n * Handles server response for HELO command. If it yielded in\n * error, emit 'error', otherwise move into the authentication phase.\n *\n * @param {String} str Message from the server\n */\n _actionHELO(str) {\n if (str.charAt(0) !== '2') {\n this._onError(new Error('Invalid HELO. response=' + str), 'EPROTOCOL', str, 'HELO');\n return;\n }\n\n // assume that authentication is enabled (most probably is not though)\n this.allowsAuth = true;\n\n this.emit('connect');\n }\n\n /**\n * Handles server response for STARTTLS command. If there's an error\n * try HELO instead, otherwise initiate TLS upgrade. If the upgrade\n * succeedes restart the EHLO\n *\n * @param {String} str Message from the server\n */\n _actionSTARTTLS(str) {\n if (str.charAt(0) !== '2') {\n if (this.options.opportunisticTLS) {\n this.logger.info(\n {\n tnx: 'smtp'\n },\n 'Failed STARTTLS upgrade, continuing unencrypted'\n );\n return this.emit('connect');\n }\n this._onError(new Error('Error upgrading connection with STARTTLS'), 'ETLS', str, 'STARTTLS');\n return;\n }\n\n this._upgradeConnection((err, secured) => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'STARTTLS');\n return;\n }\n\n this.logger.info(\n {\n tnx: 'smtp'\n },\n 'Connection upgraded with STARTTLS'\n );\n\n if (secured) {\n // restart session\n if (this.options.lmtp) {\n this._responseActions.push(this._actionLHLO);\n this._sendCommand('LHLO ' + this.name);\n } else {\n this._responseActions.push(this._actionEHLO);\n this._sendCommand('EHLO ' + this.name);\n }\n } else {\n this.emit('connect');\n }\n });\n }\n\n /**\n * Handle the response for AUTH LOGIN command. We are expecting\n * '334 VXNlcm5hbWU6' (base64 for 'Username:'). Data to be sent as\n * response needs to be base64 encoded username. We do not need\n * exact match but settle with 334 response in general as some\n * hosts invalidly use a longer message than VXNlcm5hbWU6\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_LOGIN_USER(str, callback) {\n if (!/^334[ -]/.test(str)) {\n // expecting '334 VXNlcm5hbWU6'\n callback(this._formatError('Invalid login sequence while waiting for \"334 VXNlcm5hbWU6\"', 'EAUTH', str, 'AUTH LOGIN'));\n return;\n }\n\n this._responseActions.push(str => {\n this._actionAUTH_LOGIN_PASS(str, callback);\n });\n\n this._sendCommand(Buffer.from(this._auth.credentials.user + '', 'utf-8').toString('base64'));\n }\n\n /**\n * Handle the response for AUTH CRAM-MD5 command. We are expecting\n * '334 '. Data to be sent as response needs to be\n * base64 decoded challenge string, MD5 hashed using the password as\n * a HMAC key, prefixed by the username and a space, and finally all\n * base64 encoded again.\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_CRAM_MD5(str, callback) {\n let challengeMatch = str.match(/^334\\s+(.+)$/);\n let challengeString = '';\n\n if (!challengeMatch) {\n return callback(this._formatError('Invalid login sequence while waiting for server challenge string', 'EAUTH', str, 'AUTH CRAM-MD5'));\n } else {\n challengeString = challengeMatch[1];\n }\n\n // Decode from base64\n let base64decoded = Buffer.from(challengeString, 'base64').toString('ascii'),\n hmacMD5 = crypto.createHmac('md5', this._auth.credentials.pass);\n\n hmacMD5.update(base64decoded);\n\n let prepended = this._auth.credentials.user + ' ' + hmacMD5.digest('hex');\n\n this._responseActions.push(str => {\n this._actionAUTH_CRAM_MD5_PASS(str, callback);\n });\n\n this._sendCommand(\n Buffer.from(prepended).toString('base64'),\n // hidden hash for logs\n Buffer.from(this._auth.credentials.user + ' /* secret */').toString('base64')\n );\n }\n\n /**\n * Handles the response to CRAM-MD5 authentication, if there's no error,\n * the user can be considered logged in. Start waiting for a message to send\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_CRAM_MD5_PASS(str, callback) {\n if (!str.match(/^235\\s+/)) {\n return callback(this._formatError('Invalid login sequence while waiting for \"235\"', 'EAUTH', str, 'AUTH CRAM-MD5'));\n }\n\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n },\n 'User %s authenticated',\n JSON.stringify(this._auth.user)\n );\n this.authenticated = true;\n callback(null, true);\n }\n\n /**\n * Handle the response for AUTH LOGIN command. We are expecting\n * '334 UGFzc3dvcmQ6' (base64 for 'Password:'). Data to be sent as\n * response needs to be base64 encoded password.\n *\n * @param {String} str Message from the server\n */\n _actionAUTH_LOGIN_PASS(str, callback) {\n if (!/^334[ -]/.test(str)) {\n // expecting '334 UGFzc3dvcmQ6'\n return callback(this._formatError('Invalid login sequence while waiting for \"334 UGFzc3dvcmQ6\"', 'EAUTH', str, 'AUTH LOGIN'));\n }\n\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, callback);\n });\n\n this._sendCommand(\n Buffer.from((this._auth.credentials.pass || '').toString(), 'utf-8').toString('base64'),\n // Hidden pass for logs\n Buffer.from('/* secret */', 'utf-8').toString('base64')\n );\n }\n\n /**\n * Handles the response for authentication, if there's no error,\n * the user can be considered logged in. Start waiting for a message to send\n *\n * @param {String} str Message from the server\n */\n _actionAUTHComplete(str, isRetry, callback) {\n if (!callback && typeof isRetry === 'function') {\n callback = isRetry;\n isRetry = false;\n }\n\n if (str.substr(0, 3) === '334') {\n this._responseActions.push(str => {\n if (isRetry || this._authMethod !== 'XOAUTH2') {\n this._actionAUTHComplete(str, true, callback);\n } else {\n // fetch a new OAuth2 access token\n setImmediate(() => this._handleXOauth2Token(true, callback));\n }\n });\n this._sendCommand('');\n return;\n }\n\n if (str.charAt(0) !== '2') {\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authfail',\n method: this._authMethod\n },\n 'User %s failed to authenticate',\n JSON.stringify(this._auth.user)\n );\n return callback(this._formatError('Invalid login', 'EAUTH', str, 'AUTH ' + this._authMethod));\n }\n\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n },\n 'User %s authenticated',\n JSON.stringify(this._auth.user)\n );\n this.authenticated = true;\n callback(null, true);\n }\n\n /**\n * Handle response for a MAIL FROM: command\n *\n * @param {String} str Message from the server\n */\n _actionMAIL(str, callback) {\n let message, curRecipient;\n if (Number(str.charAt(0)) !== 2) {\n if (this._usingSmtpUtf8 && /^550 /.test(str) && /[\\x80-\\uFFFF]/.test(this._envelope.from)) {\n message = 'Internationalized mailbox name not allowed';\n } else {\n message = 'Mail command failed';\n }\n return callback(this._formatError(message, 'EENVELOPE', str, 'MAIL FROM'));\n }\n\n if (!this._envelope.rcptQueue.length) {\n return callback(this._formatError('Can\\x27t send mail - no recipients defined', 'EENVELOPE', false, 'API'));\n } else {\n this._recipientQueue = [];\n\n if (this._supportedExtensions.includes('PIPELINING')) {\n while (this._envelope.rcptQueue.length) {\n curRecipient = this._envelope.rcptQueue.shift();\n this._recipientQueue.push(curRecipient);\n this._responseActions.push(str => {\n this._actionRCPT(str, callback);\n });\n this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());\n }\n } else {\n curRecipient = this._envelope.rcptQueue.shift();\n this._recipientQueue.push(curRecipient);\n this._responseActions.push(str => {\n this._actionRCPT(str, callback);\n });\n this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());\n }\n }\n }\n\n /**\n * Handle response for a RCPT TO: command\n *\n * @param {String} str Message from the server\n */\n _actionRCPT(str, callback) {\n let message,\n err,\n curRecipient = this._recipientQueue.shift();\n if (Number(str.charAt(0)) !== 2) {\n // this is a soft error\n if (this._usingSmtpUtf8 && /^553 /.test(str) && /[\\x80-\\uFFFF]/.test(curRecipient)) {\n message = 'Internationalized mailbox name not allowed';\n } else {\n message = 'Recipient command failed';\n }\n this._envelope.rejected.push(curRecipient);\n // store error for the failed recipient\n err = this._formatError(message, 'EENVELOPE', str, 'RCPT TO');\n err.recipient = curRecipient;\n this._envelope.rejectedErrors.push(err);\n } else {\n this._envelope.accepted.push(curRecipient);\n }\n\n if (!this._envelope.rcptQueue.length && !this._recipientQueue.length) {\n if (this._envelope.rejected.length < this._envelope.to.length) {\n this._responseActions.push(str => {\n this._actionDATA(str, callback);\n });\n this._sendCommand('DATA');\n } else {\n err = this._formatError('Can\\x27t send mail - all recipients were rejected', 'EENVELOPE', str, 'RCPT TO');\n err.rejected = this._envelope.rejected;\n err.rejectedErrors = this._envelope.rejectedErrors;\n return callback(err);\n }\n } else if (this._envelope.rcptQueue.length) {\n curRecipient = this._envelope.rcptQueue.shift();\n this._recipientQueue.push(curRecipient);\n this._responseActions.push(str => {\n this._actionRCPT(str, callback);\n });\n this._sendCommand('RCPT TO:<' + curRecipient + '>' + this._getDsnRcptToArgs());\n }\n }\n\n /**\n * Handle response for a DATA command\n *\n * @param {String} str Message from the server\n */\n _actionDATA(str, callback) {\n // response should be 354 but according to this issue https://github.com/eleith/emailjs/issues/24\n // some servers might use 250 instead, so lets check for 2 or 3 as the first digit\n if (!/^[23]/.test(str)) {\n return callback(this._formatError('Data command failed', 'EENVELOPE', str, 'DATA'));\n }\n\n let response = {\n accepted: this._envelope.accepted,\n rejected: this._envelope.rejected\n };\n\n if (this._ehloLines && this._ehloLines.length) {\n response.ehlo = this._ehloLines;\n }\n\n if (this._envelope.rejectedErrors.length) {\n response.rejectedErrors = this._envelope.rejectedErrors;\n }\n\n callback(null, response);\n }\n\n /**\n * Handle response for a DATA stream when using SMTP\n * We expect a single response that defines if the sending succeeded or failed\n *\n * @param {String} str Message from the server\n */\n _actionSMTPStream(str, callback) {\n if (Number(str.charAt(0)) !== 2) {\n // Message failed\n return callback(this._formatError('Message failed', 'EMESSAGE', str, 'DATA'));\n } else {\n // Message sent succesfully\n return callback(null, str);\n }\n }\n\n /**\n * Handle response for a DATA stream\n * We expect a separate response for every recipient. All recipients can either\n * succeed or fail separately\n *\n * @param {String} recipient The recipient this response applies to\n * @param {Boolean} final Is this the final recipient?\n * @param {String} str Message from the server\n */\n _actionLMTPStream(recipient, final, str, callback) {\n let err;\n if (Number(str.charAt(0)) !== 2) {\n // Message failed\n err = this._formatError('Message failed for recipient ' + recipient, 'EMESSAGE', str, 'DATA');\n err.recipient = recipient;\n this._envelope.rejected.push(recipient);\n this._envelope.rejectedErrors.push(err);\n for (let i = 0, len = this._envelope.accepted.length; i < len; i++) {\n if (this._envelope.accepted[i] === recipient) {\n this._envelope.accepted.splice(i, 1);\n }\n }\n }\n if (final) {\n return callback(null, str);\n }\n }\n\n _handleXOauth2Token(isRetry, callback) {\n this._auth.oauth2.getToken(isRetry, (err, accessToken) => {\n if (err) {\n this.logger.info(\n {\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authfail',\n method: this._authMethod\n },\n 'User %s failed to authenticate',\n JSON.stringify(this._auth.user)\n );\n return callback(this._formatError(err, 'EAUTH', false, 'AUTH XOAUTH2'));\n }\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, isRetry, callback);\n });\n this._sendCommand(\n 'AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token(accessToken),\n // Hidden for logs\n 'AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token('/* secret */')\n );\n });\n }\n\n /**\n *\n * @param {string} command\n * @private\n */\n _isDestroyedMessage(command) {\n if (this._destroyed) {\n return 'Cannot ' + command + ' - smtp connection is already destroyed.';\n }\n\n if (this._socket) {\n if (this._socket.destroyed) {\n return 'Cannot ' + command + ' - smtp connection socket is already destroyed.';\n }\n\n if (!this._socket.writable) {\n return 'Cannot ' + command + ' - smtp connection socket is already half-closed.';\n }\n }\n }\n\n _getHostname() {\n // defaul hostname is machine hostname or [IP]\n let defaultHostname;\n try {\n defaultHostname = os.hostname() || '';\n } catch (err) {\n // fails on windows 7\n defaultHostname = 'localhost';\n }\n\n // ignore if not FQDN\n if (!defaultHostname || defaultHostname.indexOf('.') < 0) {\n defaultHostname = '[127.0.0.1]';\n }\n\n // IP should be enclosed in []\n if (defaultHostname.match(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/)) {\n defaultHostname = '[' + defaultHostname + ']';\n }\n\n return defaultHostname;\n }\n}\n\nmodule.exports = SMTPConnection;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst PoolResource = require('./pool-resource');\nconst SMTPConnection = require('../smtp-connection');\nconst wellKnown = require('../well-known');\nconst shared = require('../shared');\nconst packageData = require('../../package.json');\n\n/**\n * Creates a SMTP pool transport object for Nodemailer\n *\n * @constructor\n * @param {Object} options SMTP Connection options\n */\nclass SMTPPool extends EventEmitter {\n constructor(options) {\n super();\n\n options = options || {};\n if (typeof options === 'string') {\n options = {\n url: options\n };\n }\n\n let urlData;\n let service = options.service;\n\n if (typeof options.getSocket === 'function') {\n this.getSocket = options.getSocket;\n }\n\n if (options.url) {\n urlData = shared.parseConnectionUrl(options.url);\n service = service || urlData.service;\n }\n\n this.options = shared.assign(\n false, // create new object\n options, // regular options\n urlData, // url options\n service && wellKnown(service) // wellknown options\n );\n\n this.options.maxConnections = this.options.maxConnections || 5;\n this.options.maxMessages = this.options.maxMessages || 100;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-pool'\n });\n\n // temporary object\n let connection = new SMTPConnection(this.options);\n\n this.name = 'SMTP (pool)';\n this.version = packageData.version + '[client:' + connection.version + ']';\n\n this._rateLimit = {\n counter: 0,\n timeout: null,\n waiting: [],\n checkpoint: false,\n delta: Number(this.options.rateDelta) || 1000,\n limit: Number(this.options.rateLimit) || 0\n };\n this._closed = false;\n this._queue = [];\n this._connections = [];\n this._connectionCounter = 0;\n\n this.idling = true;\n\n setImmediate(() => {\n if (this.idling) {\n this.emit('idle');\n }\n });\n }\n\n /**\n * Placeholder function for creating proxy sockets. This method immediatelly returns\n * without a socket\n *\n * @param {Object} options Connection options\n * @param {Function} callback Callback function to run with the socket keys\n */\n getSocket(options, callback) {\n // return immediatelly\n return setImmediate(() => callback(null, false));\n }\n\n /**\n * Queues an e-mail to be sent using the selected settings\n *\n * @param {Object} mail Mail object\n * @param {Function} callback Callback function\n */\n send(mail, callback) {\n if (this._closed) {\n return false;\n }\n\n this._queue.push({\n mail,\n requeueAttempts: 0,\n callback\n });\n\n if (this.idling && this._queue.length >= this.options.maxConnections) {\n this.idling = false;\n }\n\n setImmediate(() => this._processMessages());\n\n return true;\n }\n\n /**\n * Closes all connections in the pool. If there is a message being sent, the connection\n * is closed later\n */\n close() {\n let connection;\n let len = this._connections.length;\n this._closed = true;\n\n // clear rate limit timer if it exists\n clearTimeout(this._rateLimit.timeout);\n\n if (!len && !this._queue.length) {\n return;\n }\n\n // remove all available connections\n for (let i = len - 1; i >= 0; i--) {\n if (this._connections[i] && this._connections[i].available) {\n connection = this._connections[i];\n connection.close();\n this.logger.info(\n {\n tnx: 'connection',\n cid: connection.id,\n action: 'removed'\n },\n 'Connection #%s removed',\n connection.id\n );\n }\n }\n\n if (len && !this._connections.length) {\n this.logger.debug(\n {\n tnx: 'connection'\n },\n 'All connections removed'\n );\n }\n\n if (!this._queue.length) {\n return;\n }\n\n // make sure that entire queue would be cleaned\n let invokeCallbacks = () => {\n if (!this._queue.length) {\n this.logger.debug(\n {\n tnx: 'connection'\n },\n 'Pending queue entries cleared'\n );\n return;\n }\n let entry = this._queue.shift();\n if (entry && typeof entry.callback === 'function') {\n try {\n entry.callback(new Error('Connection pool was closed'));\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n }\n setImmediate(invokeCallbacks);\n };\n setImmediate(invokeCallbacks);\n }\n\n /**\n * Check the queue and available connections. If there is a message to be sent and there is\n * an available connection, then use this connection to send the mail\n */\n _processMessages() {\n let connection;\n let i, len;\n\n // do nothing if already closed\n if (this._closed) {\n return;\n }\n\n // do nothing if queue is empty\n if (!this._queue.length) {\n if (!this.idling) {\n // no pending jobs\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n\n // find first available connection\n for (i = 0, len = this._connections.length; i < len; i++) {\n if (this._connections[i].available) {\n connection = this._connections[i];\n break;\n }\n }\n\n if (!connection && this._connections.length < this.options.maxConnections) {\n connection = this._createConnection();\n }\n\n if (!connection) {\n // no more free connection slots available\n this.idling = false;\n return;\n }\n\n // check if there is free space in the processing queue\n if (!this.idling && this._queue.length < this.options.maxConnections) {\n this.idling = true;\n this.emit('idle');\n }\n\n let entry = (connection.queueEntry = this._queue.shift());\n entry.messageId = (connection.queueEntry.mail.message.getHeader('message-id') || '').replace(/[<>\\s]/g, '');\n\n connection.available = false;\n\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n messageId: entry.messageId,\n action: 'assign'\n },\n 'Assigned message <%s> to #%s (%s)',\n entry.messageId,\n connection.id,\n connection.messages + 1\n );\n\n if (this._rateLimit.limit) {\n this._rateLimit.counter++;\n if (!this._rateLimit.checkpoint) {\n this._rateLimit.checkpoint = Date.now();\n }\n }\n\n connection.send(entry.mail, (err, info) => {\n // only process callback if current handler is not changed\n if (entry === connection.queueEntry) {\n try {\n entry.callback(err, info);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n });\n }\n\n /**\n * Creates a new pool resource\n */\n _createConnection() {\n let connection = new PoolResource(this);\n\n connection.id = ++this._connectionCounter;\n\n this.logger.info(\n {\n tnx: 'pool',\n cid: connection.id,\n action: 'conection'\n },\n 'Created new pool resource #%s',\n connection.id\n );\n\n // resource comes available\n connection.on('available', () => {\n this.logger.debug(\n {\n tnx: 'connection',\n cid: connection.id,\n action: 'available'\n },\n 'Connection #%s became available',\n connection.id\n );\n\n if (this._closed) {\n // if already closed run close() that will remove this connections from connections list\n this.close();\n } else {\n // check if there's anything else to send\n this._processMessages();\n }\n });\n\n // resource is terminated with an error\n connection.once('error', err => {\n if (err.code !== 'EMAXLIMIT') {\n this.logger.error(\n {\n err,\n tnx: 'pool',\n cid: connection.id\n },\n 'Pool Error for #%s: %s',\n connection.id,\n err.message\n );\n } else {\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n action: 'maxlimit'\n },\n 'Max messages limit exchausted for #%s',\n connection.id\n );\n }\n\n if (connection.queueEntry) {\n try {\n connection.queueEntry.callback(err);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n\n // remove the erroneus connection from connections list\n this._removeConnection(connection);\n\n this._continueProcessing();\n });\n\n connection.once('close', () => {\n this.logger.info(\n {\n tnx: 'connection',\n cid: connection.id,\n action: 'closed'\n },\n 'Connection #%s was closed',\n connection.id\n );\n\n this._removeConnection(connection);\n\n if (connection.queueEntry) {\n // If the connection closed when sending, add the message to the queue again\n // if max number of requeues is not reached yet\n // Note that we must wait a bit.. because the callback of the 'error' handler might be called\n // in the next event loop\n setTimeout(() => {\n if (connection.queueEntry) {\n if (this._shouldRequeuOnConnectionClose(connection.queueEntry)) {\n this._requeueEntryOnConnectionClose(connection);\n } else {\n this._failDeliveryOnConnectionClose(connection);\n }\n }\n this._continueProcessing();\n }, 50);\n } else {\n this._continueProcessing();\n }\n });\n\n this._connections.push(connection);\n\n return connection;\n }\n\n _shouldRequeuOnConnectionClose(queueEntry) {\n if (this.options.maxRequeues === undefined || this.options.maxRequeues < 0) {\n return true;\n }\n\n return queueEntry.requeueAttempts < this.options.maxRequeues;\n }\n\n _failDeliveryOnConnectionClose(connection) {\n if (connection.queueEntry && connection.queueEntry.callback) {\n try {\n connection.queueEntry.callback(new Error('Reached maximum number of retries after connection was closed'));\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback',\n messageId: connection.queueEntry.messageId,\n cid: connection.id\n },\n 'Callback error for #%s: %s',\n connection.id,\n E.message\n );\n }\n connection.queueEntry = false;\n }\n }\n\n _requeueEntryOnConnectionClose(connection) {\n connection.queueEntry.requeueAttempts = connection.queueEntry.requeueAttempts + 1;\n this.logger.debug(\n {\n tnx: 'pool',\n cid: connection.id,\n messageId: connection.queueEntry.messageId,\n action: 'requeue'\n },\n 'Re-queued message <%s> for #%s. Attempt: #%s',\n connection.queueEntry.messageId,\n connection.id,\n connection.queueEntry.requeueAttempts\n );\n this._queue.unshift(connection.queueEntry);\n connection.queueEntry = false;\n }\n\n /**\n * Continue to process message if the pool hasn't closed\n */\n _continueProcessing() {\n if (this._closed) {\n this.close();\n } else {\n setTimeout(() => this._processMessages(), 100);\n }\n }\n\n /**\n * Remove resource from pool\n *\n * @param {Object} connection The PoolResource to remove\n */\n _removeConnection(connection) {\n let index = this._connections.indexOf(connection);\n\n if (index !== -1) {\n this._connections.splice(index, 1);\n }\n }\n\n /**\n * Checks if connections have hit current rate limit and if so, queues the availability callback\n *\n * @param {Function} callback Callback function to run once rate limiter has been cleared\n */\n _checkRateLimit(callback) {\n if (!this._rateLimit.limit) {\n return callback();\n }\n\n let now = Date.now();\n\n if (this._rateLimit.counter < this._rateLimit.limit) {\n return callback();\n }\n\n this._rateLimit.waiting.push(callback);\n\n if (this._rateLimit.checkpoint <= now - this._rateLimit.delta) {\n return this._clearRateLimit();\n } else if (!this._rateLimit.timeout) {\n this._rateLimit.timeout = setTimeout(() => this._clearRateLimit(), this._rateLimit.delta - (now - this._rateLimit.checkpoint));\n this._rateLimit.checkpoint = now;\n }\n }\n\n /**\n * Clears current rate limit limitation and runs paused callback\n */\n _clearRateLimit() {\n clearTimeout(this._rateLimit.timeout);\n this._rateLimit.timeout = null;\n this._rateLimit.counter = 0;\n this._rateLimit.checkpoint = false;\n\n // resume all paused connections\n while (this._rateLimit.waiting.length) {\n let cb = this._rateLimit.waiting.shift();\n setImmediate(cb);\n }\n }\n\n /**\n * Returns true if there are free slots in the queue\n */\n isIdle() {\n return this.idling;\n }\n\n /**\n * Verifies SMTP configuration\n *\n * @param {Function} callback Callback function\n */\n verify(callback) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n let auth = new PoolResource(this).auth;\n\n this.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n options = shared.assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n let connection = new SMTPConnection(options);\n let returned = false;\n\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n connection.close();\n return callback(err);\n });\n\n connection.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(new Error('Connection closed'));\n });\n\n let finalize = () => {\n if (returned) {\n return;\n }\n returned = true;\n connection.quit();\n return callback(null, true);\n };\n\n connection.connect(() => {\n if (returned) {\n return;\n }\n\n if (auth && (connection.allowsAuth || options.forceAuth)) {\n connection.login(auth, err => {\n if (returned) {\n return;\n }\n\n if (err) {\n returned = true;\n connection.close();\n return callback(err);\n }\n\n finalize();\n });\n } else if (!auth && connection.allowsAuth && options.forceAuth) {\n let err = new Error('Authentication info was not provided');\n err.code = 'NoAuth';\n\n returned = true;\n connection.close();\n return callback(err);\n } else {\n finalize();\n }\n });\n });\n\n return promise;\n }\n}\n\n// expose to the world\nmodule.exports = SMTPPool;\n","'use strict';\n\nconst SMTPConnection = require('../smtp-connection');\nconst assign = require('../shared').assign;\nconst XOAuth2 = require('../xoauth2');\nconst EventEmitter = require('events');\n\n/**\n * Creates an element for the pool\n *\n * @constructor\n * @param {Object} options SMTPPool instance\n */\nclass PoolResource extends EventEmitter {\n constructor(pool) {\n super();\n\n this.pool = pool;\n this.options = pool.options;\n this.logger = this.pool.logger;\n\n if (this.options.auth) {\n switch ((this.options.auth.type || '').toString().toUpperCase()) {\n case 'OAUTH2': {\n let oauth2 = new XOAuth2(this.options.auth, this.logger);\n oauth2.provisionCallback = (this.pool.mailer && this.pool.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;\n this.auth = {\n type: 'OAUTH2',\n user: this.options.auth.user,\n oauth2,\n method: 'XOAUTH2'\n };\n oauth2.on('token', token => this.pool.mailer.emit('token', token));\n oauth2.on('error', err => this.emit('error', err));\n break;\n }\n default:\n if (!this.options.auth.user && !this.options.auth.pass) {\n break;\n }\n this.auth = {\n type: (this.options.auth.type || '').toString().toUpperCase() || 'LOGIN',\n user: this.options.auth.user,\n credentials: {\n user: this.options.auth.user || '',\n pass: this.options.auth.pass,\n options: this.options.auth.options\n },\n method: (this.options.auth.method || '').trim().toUpperCase() || this.options.authMethod || false\n };\n }\n }\n\n this._connection = false;\n this._connected = false;\n\n this.messages = 0;\n this.available = true;\n }\n\n /**\n * Initiates a connection to the SMTP server\n *\n * @param {Function} callback Callback function to run once the connection is established or failed\n */\n connect(callback) {\n this.pool.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let returned = false;\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n\n options = assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n this.connection = new SMTPConnection(options);\n\n this.connection.once('error', err => {\n this.emit('error', err);\n if (returned) {\n return;\n }\n returned = true;\n return callback(err);\n });\n\n this.connection.once('end', () => {\n this.close();\n if (returned) {\n return;\n }\n returned = true;\n\n let timer = setTimeout(() => {\n if (returned) {\n return;\n }\n // still have not returned, this means we have an unexpected connection close\n let err = new Error('Unexpected socket close');\n if (this.connection && this.connection._socket && this.connection._socket.upgrading) {\n // starttls connection errors\n err.code = 'ETLS';\n }\n callback(err);\n }, 1000);\n\n try {\n timer.unref();\n } catch (E) {\n // Ignore. Happens on envs with non-node timer implementation\n }\n });\n\n this.connection.connect(() => {\n if (returned) {\n return;\n }\n\n if (this.auth && (this.connection.allowsAuth || options.forceAuth)) {\n this.connection.login(this.auth, err => {\n if (returned) {\n return;\n }\n returned = true;\n\n if (err) {\n this.connection.close();\n this.emit('error', err);\n return callback(err);\n }\n\n this._connected = true;\n callback(null, true);\n });\n } else {\n returned = true;\n this._connected = true;\n return callback(null, true);\n }\n });\n });\n }\n\n /**\n * Sends an e-mail to be sent using the selected settings\n *\n * @param {Object} mail Mail object\n * @param {Function} callback Callback function\n */\n send(mail, callback) {\n if (!this._connected) {\n return this.connect(err => {\n if (err) {\n return callback(err);\n }\n return this.send(mail, callback);\n });\n }\n\n let envelope = mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId,\n cid: this.id\n },\n 'Sending message %s using #%s to <%s>',\n messageId,\n this.id,\n recipients.join(', ')\n );\n\n if (mail.data.dsn) {\n envelope.dsn = mail.data.dsn;\n }\n\n this.connection.send(envelope, mail.message.createReadStream(), (err, info) => {\n this.messages++;\n\n if (err) {\n this.connection.close();\n this.emit('error', err);\n return callback(err);\n }\n\n info.envelope = {\n from: envelope.from,\n to: envelope.to\n };\n info.messageId = messageId;\n\n setImmediate(() => {\n let err;\n if (this.messages >= this.options.maxMessages) {\n err = new Error('Resource exhausted');\n err.code = 'EMAXLIMIT';\n this.connection.close();\n this.emit('error', err);\n } else {\n this.pool._checkRateLimit(() => {\n this.available = true;\n this.emit('available');\n });\n }\n });\n\n callback(null, info);\n });\n }\n\n /**\n * Closes the connection\n */\n close() {\n this._connected = false;\n if (this.auth && this.auth.oauth2) {\n this.auth.oauth2.removeAllListeners();\n }\n if (this.connection) {\n this.connection.close();\n }\n this.emit('close');\n }\n}\n\nmodule.exports = PoolResource;\n","'use strict';\n\nconst EventEmitter = require('events');\nconst SMTPConnection = require('../smtp-connection');\nconst wellKnown = require('../well-known');\nconst shared = require('../shared');\nconst XOAuth2 = require('../xoauth2');\nconst packageData = require('../../package.json');\n\n/**\n * Creates a SMTP transport object for Nodemailer\n *\n * @constructor\n * @param {Object} options Connection options\n */\nclass SMTPTransport extends EventEmitter {\n constructor(options) {\n super();\n\n options = options || {};\n\n if (typeof options === 'string') {\n options = {\n url: options\n };\n }\n\n let urlData;\n let service = options.service;\n\n if (typeof options.getSocket === 'function') {\n this.getSocket = options.getSocket;\n }\n\n if (options.url) {\n urlData = shared.parseConnectionUrl(options.url);\n service = service || urlData.service;\n }\n\n this.options = shared.assign(\n false, // create new object\n options, // regular options\n urlData, // url options\n service && wellKnown(service) // wellknown options\n );\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-transport'\n });\n\n // temporary object\n let connection = new SMTPConnection(this.options);\n\n this.name = 'SMTP';\n this.version = packageData.version + '[client:' + connection.version + ']';\n\n if (this.options.auth) {\n this.auth = this.getAuth({});\n }\n }\n\n /**\n * Placeholder function for creating proxy sockets. This method immediatelly returns\n * without a socket\n *\n * @param {Object} options Connection options\n * @param {Function} callback Callback function to run with the socket keys\n */\n getSocket(options, callback) {\n // return immediatelly\n return setImmediate(() => callback(null, false));\n }\n\n getAuth(authOpts) {\n if (!authOpts) {\n return this.auth;\n }\n\n let hasAuth = false;\n let authData = {};\n\n if (this.options.auth && typeof this.options.auth === 'object') {\n Object.keys(this.options.auth).forEach(key => {\n hasAuth = true;\n authData[key] = this.options.auth[key];\n });\n }\n\n if (authOpts && typeof authOpts === 'object') {\n Object.keys(authOpts).forEach(key => {\n hasAuth = true;\n authData[key] = authOpts[key];\n });\n }\n\n if (!hasAuth) {\n return false;\n }\n\n switch ((authData.type || '').toString().toUpperCase()) {\n case 'OAUTH2': {\n if (!authData.service && !authData.user) {\n return false;\n }\n let oauth2 = new XOAuth2(authData, this.logger);\n oauth2.provisionCallback = (this.mailer && this.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;\n oauth2.on('token', token => this.mailer.emit('token', token));\n oauth2.on('error', err => this.emit('error', err));\n return {\n type: 'OAUTH2',\n user: authData.user,\n oauth2,\n method: 'XOAUTH2'\n };\n }\n default:\n return {\n type: (authData.type || '').toString().toUpperCase() || 'LOGIN',\n user: authData.user,\n credentials: {\n user: authData.user || '',\n pass: authData.pass,\n options: authData.options\n },\n method: (authData.method || '').trim().toUpperCase() || this.options.authMethod || false\n };\n }\n }\n\n /**\n * Sends an e-mail using the selected settings\n *\n * @param {Object} mail Mail object\n * @param {Function} callback Callback function\n */\n send(mail, callback) {\n this.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let returned = false;\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n\n // only copy options if we need to modify it\n options = shared.assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n let connection = new SMTPConnection(options);\n\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n connection.close();\n return callback(err);\n });\n\n connection.once('end', () => {\n if (returned) {\n return;\n }\n\n let timer = setTimeout(() => {\n if (returned) {\n return;\n }\n returned = true;\n // still have not returned, this means we have an unexpected connection close\n let err = new Error('Unexpected socket close');\n if (connection && connection._socket && connection._socket.upgrading) {\n // starttls connection errors\n err.code = 'ETLS';\n }\n callback(err);\n }, 1000);\n\n try {\n timer.unref();\n } catch (E) {\n // Ignore. Happens on envs with non-node timer implementation\n }\n });\n\n let sendMessage = () => {\n let envelope = mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n\n if (mail.data.dsn) {\n envelope.dsn = mail.data.dsn;\n }\n\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s>',\n messageId,\n recipients.join(', ')\n );\n\n connection.send(envelope, mail.message.createReadStream(), (err, info) => {\n returned = true;\n connection.close();\n if (err) {\n this.logger.error(\n {\n err,\n tnx: 'send'\n },\n 'Send error for %s: %s',\n messageId,\n err.message\n );\n return callback(err);\n }\n info.envelope = {\n from: envelope.from,\n to: envelope.to\n };\n info.messageId = messageId;\n try {\n return callback(null, info);\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'callback'\n },\n 'Callback error for %s: %s',\n messageId,\n E.message\n );\n }\n });\n };\n\n connection.connect(() => {\n if (returned) {\n return;\n }\n\n let auth = this.getAuth(mail.data.auth);\n\n if (auth && (connection.allowsAuth || options.forceAuth)) {\n connection.login(auth, err => {\n if (auth && auth !== this.auth && auth.oauth2) {\n auth.oauth2.removeAllListeners();\n }\n if (returned) {\n return;\n }\n\n if (err) {\n returned = true;\n connection.close();\n return callback(err);\n }\n\n sendMessage();\n });\n } else {\n sendMessage();\n }\n });\n });\n }\n\n /**\n * Verifies SMTP configuration\n *\n * @param {Function} callback Callback function\n */\n verify(callback) {\n let promise;\n\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n\n this.getSocket(this.options, (err, socketOptions) => {\n if (err) {\n return callback(err);\n }\n\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info(\n {\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n },\n 'Using proxied socket from %s:%s to %s:%s',\n socketOptions.connection.remoteAddress,\n socketOptions.connection.remotePort,\n options.host || '',\n options.port || ''\n );\n\n options = shared.assign(false, options);\n Object.keys(socketOptions).forEach(key => {\n options[key] = socketOptions[key];\n });\n }\n\n let connection = new SMTPConnection(options);\n let returned = false;\n\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n connection.close();\n return callback(err);\n });\n\n connection.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(new Error('Connection closed'));\n });\n\n let finalize = () => {\n if (returned) {\n return;\n }\n returned = true;\n connection.quit();\n return callback(null, true);\n };\n\n connection.connect(() => {\n if (returned) {\n return;\n }\n\n let authData = this.getAuth({});\n\n if (authData && (connection.allowsAuth || options.forceAuth)) {\n connection.login(authData, err => {\n if (returned) {\n return;\n }\n\n if (err) {\n returned = true;\n connection.close();\n return callback(err);\n }\n\n finalize();\n });\n } else if (!authData && connection.allowsAuth && options.forceAuth) {\n let err = new Error('Authentication info was not provided');\n err.code = 'NoAuth';\n\n returned = true;\n connection.close();\n return callback(err);\n } else {\n finalize();\n }\n });\n });\n\n return promise;\n }\n\n /**\n * Releases resources\n */\n close() {\n if (this.auth && this.auth.oauth2) {\n this.auth.oauth2.removeAllListeners();\n }\n this.emit('close');\n }\n}\n\n// expose to the world\nmodule.exports = SMTPTransport;\n","'use strict';\n\nconst packageData = require('../../package.json');\nconst shared = require('../shared');\n\n/**\n * Generates a Transport object for streaming\n *\n * Possible options can be the following:\n *\n * * **buffer** if true, then returns the message as a Buffer object instead of a stream\n * * **newline** either 'windows' or 'unix'\n *\n * @constructor\n * @param {Object} optional config parameter\n */\nclass StreamTransport {\n constructor(options) {\n options = options || {};\n\n this.options = options || {};\n\n this.name = 'StreamTransport';\n this.version = packageData.version;\n\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'stream-transport'\n });\n\n this.winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes((options.newline || '').toString().toLowerCase());\n }\n\n /**\n * Compiles a mailcomposer message and forwards it to handler that sends it\n *\n * @param {Object} emailMessage MailComposer object\n * @param {Function} callback Callback function to run when the sending is completed\n */\n send(mail, done) {\n // We probably need this in the output\n mail.message.keepBcc = true;\n\n let envelope = mail.data.envelope || mail.message.getEnvelope();\n let messageId = mail.message.messageId();\n\n let recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info(\n {\n tnx: 'send',\n messageId\n },\n 'Sending message %s to <%s> using %s line breaks',\n messageId,\n recipients.join(', '),\n this.winbreak ? '' : ''\n );\n\n setImmediate(() => {\n let stream;\n\n try {\n stream = mail.message.createReadStream();\n } catch (E) {\n this.logger.error(\n {\n err: E,\n tnx: 'send',\n messageId\n },\n 'Creating send stream failed for %s. %s',\n messageId,\n E.message\n );\n return done(E);\n }\n\n if (!this.options.buffer) {\n stream.once('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed creating message for %s. %s',\n messageId,\n err.message\n );\n });\n return done(null, {\n envelope: mail.data.envelope || mail.message.getEnvelope(),\n messageId,\n message: stream\n });\n }\n\n let chunks = [];\n let chunklen = 0;\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n stream.once('error', err => {\n this.logger.error(\n {\n err,\n tnx: 'send',\n messageId\n },\n 'Failed creating message for %s. %s',\n messageId,\n err.message\n );\n return done(err);\n });\n\n stream.on('end', () =>\n done(null, {\n envelope: mail.data.envelope || mail.message.getEnvelope(),\n messageId,\n message: Buffer.concat(chunks, chunklen)\n })\n );\n });\n }\n}\n\nmodule.exports = StreamTransport;\n","'use strict';\n\nconst services = require('./services.json');\nconst normalized = {};\n\nObject.keys(services).forEach(key => {\n let service = services[key];\n\n normalized[normalizeKey(key)] = normalizeService(service);\n\n [].concat(service.aliases || []).forEach(alias => {\n normalized[normalizeKey(alias)] = normalizeService(service);\n });\n\n [].concat(service.domains || []).forEach(domain => {\n normalized[normalizeKey(domain)] = normalizeService(service);\n });\n});\n\nfunction normalizeKey(key) {\n return key.replace(/[^a-zA-Z0-9.-]/g, '').toLowerCase();\n}\n\nfunction normalizeService(service) {\n let filter = ['domains', 'aliases'];\n let response = {};\n\n Object.keys(service).forEach(key => {\n if (filter.indexOf(key) < 0) {\n response[key] = service[key];\n }\n });\n\n return response;\n}\n\n/**\n * Resolves SMTP config for given key. Key can be a name (like 'Gmail'), alias (like 'Google Mail') or\n * an email address (like 'test@googlemail.com').\n *\n * @param {String} key [description]\n * @returns {Object} SMTP config or false if not found\n */\nmodule.exports = function (key) {\n key = normalizeKey(key.split('@').pop());\n return normalized[key] || false;\n};\n","'use strict';\n\nconst Stream = require('stream').Stream;\nconst nmfetch = require('../fetch');\nconst crypto = require('crypto');\nconst shared = require('../shared');\n\n/**\n * XOAUTH2 access_token generator for Gmail.\n * Create client ID for web applications in Google API console to use it.\n * See Offline Access for receiving the needed refreshToken for an user\n * https://developers.google.com/accounts/docs/OAuth2WebServer#offline\n *\n * Usage for generating access tokens with a custom method using provisionCallback:\n * provisionCallback(user, renew, callback)\n * * user is the username to get the token for\n * * renew is a boolean that if true indicates that existing token failed and needs to be renewed\n * * callback is the callback to run with (error, accessToken [, expires])\n * * accessToken is a string\n * * expires is an optional expire time in milliseconds\n * If provisionCallback is used, then Nodemailer does not try to attempt generating the token by itself\n *\n * @constructor\n * @param {Object} options Client information for token generation\n * @param {String} options.user User e-mail address\n * @param {String} options.clientId Client ID value\n * @param {String} options.clientSecret Client secret value\n * @param {String} options.refreshToken Refresh token for an user\n * @param {String} options.accessUrl Endpoint for token generation, defaults to 'https://accounts.google.com/o/oauth2/token'\n * @param {String} options.accessToken An existing valid accessToken\n * @param {String} options.privateKey Private key for JSW\n * @param {Number} options.expires Optional Access Token expire time in ms\n * @param {Number} options.timeout Optional TTL for Access Token in seconds\n * @param {Function} options.provisionCallback Function to run when a new access token is required\n */\nclass XOAuth2 extends Stream {\n constructor(options, logger) {\n super();\n\n this.options = options || {};\n\n if (options && options.serviceClient) {\n if (!options.privateKey || !options.user) {\n setImmediate(() => this.emit('error', new Error('Options \"privateKey\" and \"user\" are required for service account!')));\n return;\n }\n\n let serviceRequestTimeout = Math.min(Math.max(Number(this.options.serviceRequestTimeout) || 0, 0), 3600);\n this.options.serviceRequestTimeout = serviceRequestTimeout || 5 * 60;\n }\n\n this.logger = shared.getLogger(\n {\n logger\n },\n {\n component: this.options.component || 'OAuth2'\n }\n );\n\n this.provisionCallback = typeof this.options.provisionCallback === 'function' ? this.options.provisionCallback : false;\n\n this.options.accessUrl = this.options.accessUrl || 'https://accounts.google.com/o/oauth2/token';\n this.options.customHeaders = this.options.customHeaders || {};\n this.options.customParams = this.options.customParams || {};\n\n this.accessToken = this.options.accessToken || false;\n\n if (this.options.expires && Number(this.options.expires)) {\n this.expires = this.options.expires;\n } else {\n let timeout = Math.max(Number(this.options.timeout) || 0, 0);\n this.expires = (timeout && Date.now() + timeout * 1000) || 0;\n }\n }\n\n /**\n * Returns or generates (if previous has expired) a XOAuth2 token\n *\n * @param {Boolean} renew If false then use cached access token (if available)\n * @param {Function} callback Callback function with error object and token string\n */\n getToken(renew, callback) {\n if (!renew && this.accessToken && (!this.expires || this.expires > Date.now())) {\n return callback(null, this.accessToken);\n }\n\n let generateCallback = (...args) => {\n if (args[0]) {\n this.logger.error(\n {\n err: args[0],\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'renew'\n },\n 'Failed generating new Access Token for %s',\n this.options.user\n );\n } else {\n this.logger.info(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'renew'\n },\n 'Generated new Access Token for %s',\n this.options.user\n );\n }\n callback(...args);\n };\n\n if (this.provisionCallback) {\n this.provisionCallback(this.options.user, !!renew, (err, accessToken, expires) => {\n if (!err && accessToken) {\n this.accessToken = accessToken;\n this.expires = expires || 0;\n }\n generateCallback(err, accessToken);\n });\n } else {\n this.generateToken(generateCallback);\n }\n }\n\n /**\n * Updates token values\n *\n * @param {String} accessToken New access token\n * @param {Number} timeout Access token lifetime in seconds\n *\n * Emits 'token': { user: User email-address, accessToken: the new accessToken, timeout: TTL in seconds}\n */\n updateToken(accessToken, timeout) {\n this.accessToken = accessToken;\n timeout = Math.max(Number(timeout) || 0, 0);\n this.expires = (timeout && Date.now() + timeout * 1000) || 0;\n\n this.emit('token', {\n user: this.options.user,\n accessToken: accessToken || '',\n expires: this.expires\n });\n }\n\n /**\n * Generates a new XOAuth2 token with the credentials provided at initialization\n *\n * @param {Function} callback Callback function with error object and token string\n */\n generateToken(callback) {\n let urlOptions;\n let loggedUrlOptions;\n if (this.options.serviceClient) {\n // service account - https://developers.google.com/identity/protocols/OAuth2ServiceAccount\n let iat = Math.floor(Date.now() / 1000); // unix time\n let tokenData = {\n iss: this.options.serviceClient,\n scope: this.options.scope || 'https://mail.google.com/',\n sub: this.options.user,\n aud: this.options.accessUrl,\n iat,\n exp: iat + this.options.serviceRequestTimeout\n };\n let token;\n try {\n token = this.jwtSignRS256(tokenData);\n } catch (err) {\n return callback(new Error('Can\\x27t generate token. Check your auth options'));\n }\n\n urlOptions = {\n grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n assertion: token\n };\n\n loggedUrlOptions = {\n grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n assertion: tokenData\n };\n } else {\n if (!this.options.refreshToken) {\n return callback(new Error('Can\\x27t create new access token for user'));\n }\n\n // web app - https://developers.google.com/identity/protocols/OAuth2WebServer\n urlOptions = {\n client_id: this.options.clientId || '',\n client_secret: this.options.clientSecret || '',\n refresh_token: this.options.refreshToken,\n grant_type: 'refresh_token'\n };\n\n loggedUrlOptions = {\n client_id: this.options.clientId || '',\n client_secret: (this.options.clientSecret || '').substr(0, 6) + '...',\n refresh_token: (this.options.refreshToken || '').substr(0, 6) + '...',\n grant_type: 'refresh_token'\n };\n }\n\n Object.keys(this.options.customParams).forEach(key => {\n urlOptions[key] = this.options.customParams[key];\n loggedUrlOptions[key] = this.options.customParams[key];\n });\n\n this.logger.debug(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'generate'\n },\n 'Requesting token using: %s',\n JSON.stringify(loggedUrlOptions)\n );\n\n this.postRequest(this.options.accessUrl, urlOptions, this.options, (error, body) => {\n let data;\n\n if (error) {\n return callback(error);\n }\n\n try {\n data = JSON.parse(body.toString());\n } catch (E) {\n return callback(E);\n }\n\n if (!data || typeof data !== 'object') {\n this.logger.debug(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'post'\n },\n 'Response: %s',\n (body || '').toString()\n );\n return callback(new Error('Invalid authentication response'));\n }\n\n let logData = {};\n Object.keys(data).forEach(key => {\n if (key !== 'access_token') {\n logData[key] = data[key];\n } else {\n logData[key] = (data[key] || '').toString().substr(0, 6) + '...';\n }\n });\n\n this.logger.debug(\n {\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'post'\n },\n 'Response: %s',\n JSON.stringify(logData)\n );\n\n if (data.error) {\n // Error Response : https://tools.ietf.org/html/rfc6749#section-5.2\n let errorMessage = data.error;\n if (data.error_description) {\n errorMessage += ': ' + data.error_description;\n }\n if (data.error_uri) {\n errorMessage += ' (' + data.error_uri + ')';\n }\n return callback(new Error(errorMessage));\n }\n\n if (data.access_token) {\n this.updateToken(data.access_token, data.expires_in);\n return callback(null, this.accessToken);\n }\n\n return callback(new Error('No access token'));\n });\n }\n\n /**\n * Converts an access_token and user id into a base64 encoded XOAuth2 token\n *\n * @param {String} [accessToken] Access token string\n * @return {String} Base64 encoded token for IMAP or SMTP login\n */\n buildXOAuth2Token(accessToken) {\n let authData = ['user=' + (this.options.user || ''), 'auth=Bearer ' + (accessToken || this.accessToken), '', ''];\n return Buffer.from(authData.join('\\x01'), 'utf-8').toString('base64');\n }\n\n /**\n * Custom POST request handler.\n * This is only needed to keep paths short in Windows – usually this module\n * is a dependency of a dependency and if it tries to require something\n * like the request module the paths get way too long to handle for Windows.\n * As we do only a simple POST request we do not actually require complicated\n * logic support (no redirects, no nothing) anyway.\n *\n * @param {String} url Url to POST to\n * @param {String|Buffer} payload Payload to POST\n * @param {Function} callback Callback function with (err, buff)\n */\n postRequest(url, payload, params, callback) {\n let returned = false;\n\n let chunks = [];\n let chunklen = 0;\n\n let req = nmfetch(url, {\n method: 'post',\n headers: params.customHeaders,\n body: payload,\n allowErrorResponse: true\n });\n\n req.on('readable', () => {\n let chunk;\n while ((chunk = req.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n\n req.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(err);\n });\n\n req.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(null, Buffer.concat(chunks, chunklen));\n });\n }\n\n /**\n * Encodes a buffer or a string into Base64url format\n *\n * @param {Buffer|String} data The data to convert\n * @return {String} The encoded string\n */\n toBase64URL(data) {\n if (typeof data === 'string') {\n data = Buffer.from(data);\n }\n\n return data\n .toString('base64')\n .replace(/[=]+/g, '') // remove '='s\n .replace(/\\+/g, '-') // '+' → '-'\n .replace(/\\//g, '_'); // '/' → '_'\n }\n\n /**\n * Creates a JSON Web Token signed with RS256 (SHA256 + RSA)\n *\n * @param {Object} payload The payload to include in the generated token\n * @return {String} The generated and signed token\n */\n jwtSignRS256(payload) {\n payload = ['{\"alg\":\"RS256\",\"typ\":\"JWT\"}', JSON.stringify(payload)].map(val => this.toBase64URL(val)).join('.');\n let signature = crypto.createSign('RSA-SHA256').update(payload).sign(this.options.privateKey);\n return payload + '.' + this.toBase64URL(signature);\n }\n}\n\nmodule.exports = XOAuth2;\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","'use strict';\n\nvar parseUrl = require('url').parse;\n\nvar DEFAULT_PORTS = {\n ftp: 21,\n gopher: 70,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443,\n};\n\nvar stringEndsWith = String.prototype.endsWith || function(s) {\n return s.length <= this.length &&\n this.indexOf(s, this.length - s.length) !== -1;\n};\n\n/**\n * @param {string|object} url - The URL, or the result from url.parse.\n * @return {string} The URL of the proxy that should handle the request to the\n * given URL. If no proxy is set, this will be an empty string.\n */\nfunction getProxyForUrl(url) {\n var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {};\n var proto = parsedUrl.protocol;\n var hostname = parsedUrl.host;\n var port = parsedUrl.port;\n if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') {\n return ''; // Don't proxy URLs without a valid scheme or host.\n }\n\n proto = proto.split(':', 1)[0];\n // Stripping ports in this way instead of using parsedUrl.hostname to make\n // sure that the brackets around IPv6 addresses are kept.\n hostname = hostname.replace(/:\\d*$/, '');\n port = parseInt(port) || DEFAULT_PORTS[proto] || 0;\n if (!shouldProxy(hostname, port)) {\n return ''; // Don't proxy URLs that match NO_PROXY.\n }\n\n var proxy =\n getEnv('npm_config_' + proto + '_proxy') ||\n getEnv(proto + '_proxy') ||\n getEnv('npm_config_proxy') ||\n getEnv('all_proxy');\n if (proxy && proxy.indexOf('://') === -1) {\n // Missing scheme in proxy, default to the requested URL's scheme.\n proxy = proto + '://' + proxy;\n }\n return proxy;\n}\n\n/**\n * Determines whether a given URL should be proxied.\n *\n * @param {string} hostname - The host name of the URL.\n * @param {number} port - The effective port of the URL.\n * @returns {boolean} Whether the given URL should be proxied.\n * @private\n */\nfunction shouldProxy(hostname, port) {\n var NO_PROXY =\n (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase();\n if (!NO_PROXY) {\n return true; // Always proxy if NO_PROXY is not set.\n }\n if (NO_PROXY === '*') {\n return false; // Never proxy if wildcard is set.\n }\n\n return NO_PROXY.split(/[,\\s]/).every(function(proxy) {\n if (!proxy) {\n return true; // Skip zero-length hosts.\n }\n var parsedProxy = proxy.match(/^(.+):(\\d+)$/);\n var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;\n var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;\n if (parsedProxyPort && parsedProxyPort !== port) {\n return true; // Skip if ports don't match.\n }\n\n if (!/^[.*]/.test(parsedProxyHostname)) {\n // No wildcards, so stop proxying if there is an exact match.\n return hostname !== parsedProxyHostname;\n }\n\n if (parsedProxyHostname.charAt(0) === '*') {\n // Remove leading wildcard.\n parsedProxyHostname = parsedProxyHostname.slice(1);\n }\n // Stop proxying if the hostname ends with the no_proxy host.\n return !stringEndsWith.call(hostname, parsedProxyHostname);\n });\n}\n\n/**\n * Get the value for an environment variable.\n *\n * @param {string} key - The name of the environment variable.\n * @return {string} The value of the environment variable.\n * @private\n */\nfunction getEnv(key) {\n return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';\n}\n\nexports.getProxyForUrl = getProxyForUrl;\n","/* eslint-disable node/no-deprecated-api */\n\n'use strict'\n\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\nvar safer = {}\n\nvar key\n\nfor (key in buffer) {\n if (!buffer.hasOwnProperty(key)) continue\n if (key === 'SlowBuffer' || key === 'Buffer') continue\n safer[key] = buffer[key]\n}\n\nvar Safer = safer.Buffer = {}\nfor (key in Buffer) {\n if (!Buffer.hasOwnProperty(key)) continue\n if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue\n Safer[key] = Buffer[key]\n}\n\nsafer.Buffer.prototype = Buffer.prototype\n\nif (!Safer.from || Safer.from === Uint8Array.from) {\n Safer.from = function (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('The \"value\" argument must not be of type number. Received type ' + typeof value)\n }\n if (value && typeof value.length === 'undefined') {\n throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)\n }\n return Buffer(value, encodingOrOffset, length)\n }\n}\n\nif (!Safer.alloc) {\n Safer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('The \"size\" argument must be of type number. Received type ' + typeof size)\n }\n if (size < 0 || size >= 2 * (1 << 30)) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n var buf = Buffer(size)\n if (!fill || fill.length === 0) {\n buf.fill(0)\n } else if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n return buf\n }\n}\n\nif (!safer.kStringMaxLength) {\n try {\n safer.kStringMaxLength = process.binding('buffer').kStringMaxLength\n } catch (e) {\n // we can't determine kStringMaxLength in environments where process.binding\n // is unsupported, so let's not set it\n }\n}\n\nif (!safer.constants) {\n safer.constants = {\n MAX_LENGTH: safer.kMaxLength\n }\n if (safer.kStringMaxLength) {\n safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength\n }\n}\n\nmodule.exports = safer\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","\"use strict\";\n\nvar punycode = require(\"punycode\");\nvar mappingTable = require(\"./lib/mappingTable.json\");\n\nvar PROCESSING_OPTIONS = {\n TRANSITIONAL: 0,\n NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n return str.split('\\u0000').map(function (s) { return s.normalize('NFC'); }).join('\\u0000');\n}\n\nfunction findStatus(val) {\n var start = 0;\n var end = mappingTable.length - 1;\n\n while (start <= end) {\n var mid = Math.floor((start + end) / 2);\n\n var target = mappingTable[mid];\n if (target[0][0] <= val && target[0][1] >= val) {\n return target;\n } else if (target[0][0] > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n return string\n // replace every surrogate pair with a BMP symbol\n .replace(regexAstralSymbols, '_')\n // then get the length\n .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n var hasError = false;\n var processed = \"\";\n\n var len = countSymbols(domain_name);\n for (var i = 0; i < len; ++i) {\n var codePoint = domain_name.codePointAt(i);\n var status = findStatus(codePoint);\n\n switch (status[1]) {\n case \"disallowed\":\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n break;\n case \"ignored\":\n break;\n case \"mapped\":\n processed += String.fromCodePoint.apply(String, status[2]);\n break;\n case \"deviation\":\n if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n processed += String.fromCodePoint.apply(String, status[2]);\n } else {\n processed += String.fromCodePoint(codePoint);\n }\n break;\n case \"valid\":\n processed += String.fromCodePoint(codePoint);\n break;\n case \"disallowed_STD3_mapped\":\n if (useSTD3) {\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n } else {\n processed += String.fromCodePoint.apply(String, status[2]);\n }\n break;\n case \"disallowed_STD3_valid\":\n if (useSTD3) {\n hasError = true;\n }\n\n processed += String.fromCodePoint(codePoint);\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n if (label.substr(0, 4) === \"xn--\") {\n label = punycode.toUnicode(label);\n processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n }\n\n var error = false;\n\n if (normalize(label) !== label ||\n (label[3] === \"-\" && label[4] === \"-\") ||\n label[0] === \"-\" || label[label.length - 1] === \"-\" ||\n label.indexOf(\".\") !== -1 ||\n label.search(combiningMarksRegex) === 0) {\n error = true;\n }\n\n var len = countSymbols(label);\n for (var i = 0; i < len; ++i) {\n var status = findStatus(label.codePointAt(i));\n if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== \"valid\") ||\n (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n status[1] !== \"valid\" && status[1] !== \"deviation\")) {\n error = true;\n break;\n }\n }\n\n return {\n label: label,\n error: error\n };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n var result = mapChars(domain_name, useSTD3, processing_option);\n result.string = normalize(result.string);\n\n var labels = result.string.split(\".\");\n for (var i = 0; i < labels.length; ++i) {\n try {\n var validation = validateLabel(labels[i]);\n labels[i] = validation.label;\n result.error = result.error || validation.error;\n } catch(e) {\n result.error = true;\n }\n }\n\n return {\n string: labels.join(\".\"),\n error: result.error\n };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n var result = processing(domain_name, useSTD3, processing_option);\n var labels = result.string.split(\".\");\n labels = labels.map(function(l) {\n try {\n return punycode.toASCII(l);\n } catch(e) {\n result.error = true;\n return l;\n }\n });\n\n if (verifyDnsLength) {\n var total = labels.slice(0, labels.length - 1).join(\".\").length;\n if (total.length > 253 || total.length === 0) {\n result.error = true;\n }\n\n for (var i=0; i < labels.length; ++i) {\n if (labels.length > 63 || labels.length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) return null;\n return labels.join(\".\");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n return {\n domain: result.string,\n error: result.error\n };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","'use strict'\n\nconst Client = require('./lib/client')\nconst Dispatcher = require('./lib/dispatcher')\nconst errors = require('./lib/core/errors')\nconst Pool = require('./lib/pool')\nconst BalancedPool = require('./lib/balanced-pool')\nconst Agent = require('./lib/agent')\nconst util = require('./lib/core/util')\nconst { InvalidArgumentError } = errors\nconst api = require('./lib/api')\nconst buildConnector = require('./lib/core/connect')\nconst MockClient = require('./lib/mock/mock-client')\nconst MockAgent = require('./lib/mock/mock-agent')\nconst MockPool = require('./lib/mock/mock-pool')\nconst mockErrors = require('./lib/mock/mock-errors')\nconst ProxyAgent = require('./lib/proxy-agent')\nconst RetryHandler = require('./lib/handler/RetryHandler')\nconst { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')\nconst DecoratorHandler = require('./lib/handler/DecoratorHandler')\nconst RedirectHandler = require('./lib/handler/RedirectHandler')\nconst createRedirectInterceptor = require('./lib/interceptor/redirectInterceptor')\n\nlet hasCrypto\ntry {\n require('crypto')\n hasCrypto = true\n} catch {\n hasCrypto = false\n}\n\nObject.assign(Dispatcher.prototype, api)\n\nmodule.exports.Dispatcher = Dispatcher\nmodule.exports.Client = Client\nmodule.exports.Pool = Pool\nmodule.exports.BalancedPool = BalancedPool\nmodule.exports.Agent = Agent\nmodule.exports.ProxyAgent = ProxyAgent\nmodule.exports.RetryHandler = RetryHandler\n\nmodule.exports.DecoratorHandler = DecoratorHandler\nmodule.exports.RedirectHandler = RedirectHandler\nmodule.exports.createRedirectInterceptor = createRedirectInterceptor\n\nmodule.exports.buildConnector = buildConnector\nmodule.exports.errors = errors\n\nfunction makeDispatcher (fn) {\n return (url, opts, handler) => {\n if (typeof opts === 'function') {\n handler = opts\n opts = null\n }\n\n if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) {\n throw new InvalidArgumentError('invalid url')\n }\n\n if (opts != null && typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (opts && opts.path != null) {\n if (typeof opts.path !== 'string') {\n throw new InvalidArgumentError('invalid opts.path')\n }\n\n let path = opts.path\n if (!opts.path.startsWith('/')) {\n path = `/${path}`\n }\n\n url = new URL(util.parseOrigin(url).origin + path)\n } else {\n if (!opts) {\n opts = typeof url === 'object' ? url : {}\n }\n\n url = util.parseURL(url)\n }\n\n const { agent, dispatcher = getGlobalDispatcher() } = opts\n\n if (agent) {\n throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')\n }\n\n return fn.call(dispatcher, {\n ...opts,\n origin: url.origin,\n path: url.search ? `${url.pathname}${url.search}` : url.pathname,\n method: opts.method || (opts.body ? 'PUT' : 'GET')\n }, handler)\n }\n}\n\nmodule.exports.setGlobalDispatcher = setGlobalDispatcher\nmodule.exports.getGlobalDispatcher = getGlobalDispatcher\n\nif (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) {\n let fetchImpl = null\n module.exports.fetch = async function fetch (resource) {\n if (!fetchImpl) {\n fetchImpl = require('./lib/fetch').fetch\n }\n\n try {\n return await fetchImpl(...arguments)\n } catch (err) {\n if (typeof err === 'object') {\n Error.captureStackTrace(err, this)\n }\n\n throw err\n }\n }\n module.exports.Headers = require('./lib/fetch/headers').Headers\n module.exports.Response = require('./lib/fetch/response').Response\n module.exports.Request = require('./lib/fetch/request').Request\n module.exports.FormData = require('./lib/fetch/formdata').FormData\n module.exports.File = require('./lib/fetch/file').File\n module.exports.FileReader = require('./lib/fileapi/filereader').FileReader\n\n const { setGlobalOrigin, getGlobalOrigin } = require('./lib/fetch/global')\n\n module.exports.setGlobalOrigin = setGlobalOrigin\n module.exports.getGlobalOrigin = getGlobalOrigin\n\n const { CacheStorage } = require('./lib/cache/cachestorage')\n const { kConstruct } = require('./lib/cache/symbols')\n\n // Cache & CacheStorage are tightly coupled with fetch. Even if it may run\n // in an older version of Node, it doesn't have any use without fetch.\n module.exports.caches = new CacheStorage(kConstruct)\n}\n\nif (util.nodeMajor >= 16) {\n const { deleteCookie, getCookies, getSetCookies, setCookie } = require('./lib/cookies')\n\n module.exports.deleteCookie = deleteCookie\n module.exports.getCookies = getCookies\n module.exports.getSetCookies = getSetCookies\n module.exports.setCookie = setCookie\n\n const { parseMIMEType, serializeAMimeType } = require('./lib/fetch/dataURL')\n\n module.exports.parseMIMEType = parseMIMEType\n module.exports.serializeAMimeType = serializeAMimeType\n}\n\nif (util.nodeMajor >= 18 && hasCrypto) {\n const { WebSocket } = require('./lib/websocket/websocket')\n\n module.exports.WebSocket = WebSocket\n}\n\nmodule.exports.request = makeDispatcher(api.request)\nmodule.exports.stream = makeDispatcher(api.stream)\nmodule.exports.pipeline = makeDispatcher(api.pipeline)\nmodule.exports.connect = makeDispatcher(api.connect)\nmodule.exports.upgrade = makeDispatcher(api.upgrade)\n\nmodule.exports.MockClient = MockClient\nmodule.exports.MockPool = MockPool\nmodule.exports.MockAgent = MockAgent\nmodule.exports.mockErrors = mockErrors\n","'use strict'\n\nconst { InvalidArgumentError } = require('./core/errors')\nconst { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require('./core/symbols')\nconst DispatcherBase = require('./dispatcher-base')\nconst Pool = require('./pool')\nconst Client = require('./client')\nconst util = require('./core/util')\nconst createRedirectInterceptor = require('./interceptor/redirectInterceptor')\nconst { WeakRef, FinalizationRegistry } = require('./compat/dispatcher-weakref')()\n\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kMaxRedirections = Symbol('maxRedirections')\nconst kOnDrain = Symbol('onDrain')\nconst kFactory = Symbol('factory')\nconst kFinalizer = Symbol('finalizer')\nconst kOptions = Symbol('options')\n\nfunction defaultFactory (origin, opts) {\n return opts && opts.connections === 1\n ? new Client(origin, opts)\n : new Pool(origin, opts)\n}\n\nclass Agent extends DispatcherBase {\n constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {\n super()\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (!Number.isInteger(maxRedirections) || maxRedirections < 0) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n if (connect && typeof connect !== 'function') {\n connect = { ...connect }\n }\n\n this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent)\n ? options.interceptors.Agent\n : [createRedirectInterceptor({ maxRedirections })]\n\n this[kOptions] = { ...util.deepClone(options), connect }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kMaxRedirections] = maxRedirections\n this[kFactory] = factory\n this[kClients] = new Map()\n this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => {\n const ref = this[kClients].get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this[kClients].delete(key)\n }\n })\n\n const agent = this\n\n this[kOnDrain] = (origin, targets) => {\n agent.emit('drain', origin, [agent, ...targets])\n }\n\n this[kOnConnect] = (origin, targets) => {\n agent.emit('connect', origin, [agent, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n agent.emit('disconnect', origin, [agent, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n agent.emit('connectionError', origin, [agent, ...targets], err)\n }\n }\n\n get [kRunning] () {\n let ret = 0\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore next: gc is undeterministic */\n if (client) {\n ret += client[kRunning]\n }\n }\n return ret\n }\n\n [kDispatch] (opts, handler) {\n let key\n if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {\n key = String(opts.origin)\n } else {\n throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')\n }\n\n const ref = this[kClients].get(key)\n\n let dispatcher = ref ? ref.deref() : null\n if (!dispatcher) {\n dispatcher = this[kFactory](opts.origin, this[kOptions])\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].set(key, new WeakRef(dispatcher))\n this[kFinalizer].register(dispatcher, key)\n }\n\n return dispatcher.dispatch(opts, handler)\n }\n\n async [kClose] () {\n const closePromises = []\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore else: gc is undeterministic */\n if (client) {\n closePromises.push(client.close())\n }\n }\n\n await Promise.all(closePromises)\n }\n\n async [kDestroy] (err) {\n const destroyPromises = []\n for (const ref of this[kClients].values()) {\n const client = ref.deref()\n /* istanbul ignore else: gc is undeterministic */\n if (client) {\n destroyPromises.push(client.destroy(err))\n }\n }\n\n await Promise.all(destroyPromises)\n }\n}\n\nmodule.exports = Agent\n","const { addAbortListener } = require('../core/util')\nconst { RequestAbortedError } = require('../core/errors')\n\nconst kListener = Symbol('kListener')\nconst kSignal = Symbol('kSignal')\n\nfunction abort (self) {\n if (self.abort) {\n self.abort()\n } else {\n self.onError(new RequestAbortedError())\n }\n}\n\nfunction addSignal (self, signal) {\n self[kSignal] = null\n self[kListener] = null\n\n if (!signal) {\n return\n }\n\n if (signal.aborted) {\n abort(self)\n return\n }\n\n self[kSignal] = signal\n self[kListener] = () => {\n abort(self)\n }\n\n addAbortListener(self[kSignal], self[kListener])\n}\n\nfunction removeSignal (self) {\n if (!self[kSignal]) {\n return\n }\n\n if ('removeEventListener' in self[kSignal]) {\n self[kSignal].removeEventListener('abort', self[kListener])\n } else {\n self[kSignal].removeListener('abort', self[kListener])\n }\n\n self[kSignal] = null\n self[kListener] = null\n}\n\nmodule.exports = {\n addSignal,\n removeSignal\n}\n","'use strict'\n\nconst { AsyncResource } = require('async_hooks')\nconst { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass ConnectHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_CONNECT')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.callback = callback\n this.abort = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders () {\n throw new SocketError('bad connect', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n\n let headers = rawHeaders\n // Indicates is an HTTP2Session\n if (headers != null) {\n headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n }\n\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction connect (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n connect.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const connectHandler = new ConnectHandler(opts, callback)\n this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = connect\n","'use strict'\n\nconst {\n Readable,\n Duplex,\n PassThrough\n} = require('stream')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('assert')\n\nconst kResume = Symbol('resume')\n\nclass PipelineRequest extends Readable {\n constructor () {\n super({ autoDestroy: true })\n\n this[kResume] = null\n }\n\n _read () {\n const { [kResume]: resume } = this\n\n if (resume) {\n this[kResume] = null\n resume()\n }\n }\n\n _destroy (err, callback) {\n this._read()\n\n callback(err)\n }\n}\n\nclass PipelineResponse extends Readable {\n constructor (resume) {\n super({ autoDestroy: true })\n this[kResume] = resume\n }\n\n _read () {\n this[kResume]()\n }\n\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n callback(err)\n }\n}\n\nclass PipelineHandler extends AsyncResource {\n constructor (opts, handler) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof handler !== 'function') {\n throw new InvalidArgumentError('invalid handler')\n }\n\n const { signal, method, opaque, onInfo, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_PIPELINE')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.handler = handler\n this.abort = null\n this.context = null\n this.onInfo = onInfo || null\n\n this.req = new PipelineRequest().on('error', util.nop)\n\n this.ret = new Duplex({\n readableObjectMode: opts.objectMode,\n autoDestroy: true,\n read: () => {\n const { body } = this\n\n if (body && body.resume) {\n body.resume()\n }\n },\n write: (chunk, encoding, callback) => {\n const { req } = this\n\n if (req.push(chunk, encoding) || req._readableState.destroyed) {\n callback()\n } else {\n req[kResume] = callback\n }\n },\n destroy: (err, callback) => {\n const { body, req, res, ret, abort } = this\n\n if (!err && !ret._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (abort && err) {\n abort()\n }\n\n util.destroy(body, err)\n util.destroy(req, err)\n util.destroy(res, err)\n\n removeSignal(this)\n\n callback(err)\n }\n }).on('prefinish', () => {\n const { req } = this\n\n // Node < 15 does not call _final in same tick.\n req.push(null)\n })\n\n this.res = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n const { ret, res } = this\n\n assert(!res, 'pipeline cannot be retried')\n\n if (ret.destroyed) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume) {\n const { opaque, handler, context } = this\n\n if (statusCode < 200) {\n if (this.onInfo) {\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.res = new PipelineResponse(resume)\n\n let body\n try {\n this.handler = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n body = this.runInAsyncScope(handler, null, {\n statusCode,\n headers,\n opaque,\n body: this.res,\n context\n })\n } catch (err) {\n this.res.on('error', util.nop)\n throw err\n }\n\n if (!body || typeof body.on !== 'function') {\n throw new InvalidReturnValueError('expected Readable')\n }\n\n body\n .on('data', (chunk) => {\n const { ret, body } = this\n\n if (!ret.push(chunk) && body.pause) {\n body.pause()\n }\n })\n .on('error', (err) => {\n const { ret } = this\n\n util.destroy(ret, err)\n })\n .on('end', () => {\n const { ret } = this\n\n ret.push(null)\n })\n .on('close', () => {\n const { ret } = this\n\n if (!ret._readableState.ended) {\n util.destroy(ret, new RequestAbortedError())\n }\n })\n\n this.body = body\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n res.push(null)\n }\n\n onError (err) {\n const { ret } = this\n this.handler = null\n util.destroy(ret, err)\n }\n}\n\nfunction pipeline (opts, handler) {\n try {\n const pipelineHandler = new PipelineHandler(opts, handler)\n this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)\n return pipelineHandler.ret\n } catch (err) {\n return new PassThrough().destroy(err)\n }\n}\n\nmodule.exports = pipeline\n","'use strict'\n\nconst Readable = require('./readable')\nconst {\n InvalidArgumentError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass RequestHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) {\n throw new InvalidArgumentError('invalid highWaterMark')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_REQUEST')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.res = null\n this.abort = null\n this.body = body\n this.trailers = {}\n this.context = null\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError\n this.highWaterMark = highWaterMark\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n const body = new Readable({ resume, abort, contentType, highWaterMark })\n\n this.callback = null\n this.res = body\n if (callback !== null) {\n if (this.throwOnError && statusCode >= 400) {\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body, contentType, statusCode, statusMessage, headers }\n )\n } else {\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n trailers: this.trailers,\n opaque,\n body,\n context\n })\n }\n }\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n util.parseHeaders(trailers, this.trailers)\n\n res.push(null)\n }\n\n onError (err) {\n const { res, callback, body, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n // TODO: Does this need queueMicrotask?\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (res) {\n this.res = null\n // Ensure all queued handlers are invoked before destroying res.\n queueMicrotask(() => {\n util.destroy(res, err)\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction request (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n request.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new RequestHandler(opts, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = request\nmodule.exports.RequestHandler = RequestHandler\n","'use strict'\n\nconst { finished, PassThrough } = require('stream')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { getResolveErrorBodyCallback } = require('./util')\nconst { AsyncResource } = require('async_hooks')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass StreamHandler extends AsyncResource {\n constructor (opts, factory, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('invalid factory')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_STREAM')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', util.nop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.factory = factory\n this.callback = callback\n this.res = null\n this.abort = null\n this.context = null\n this.trailers = null\n this.body = body\n this.onInfo = onInfo || null\n this.throwOnError = throwOnError || false\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { factory, opaque, context, callback, responseHeaders } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.factory = null\n\n let res\n\n if (this.throwOnError && statusCode >= 400) {\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n res = new PassThrough()\n\n this.callback = null\n this.runInAsyncScope(getResolveErrorBodyCallback, null,\n { callback, body: res, contentType, statusCode, statusMessage, headers }\n )\n } else {\n if (factory === null) {\n return\n }\n\n res = this.runInAsyncScope(factory, null, {\n statusCode,\n headers,\n opaque,\n context\n })\n\n if (\n !res ||\n typeof res.write !== 'function' ||\n typeof res.end !== 'function' ||\n typeof res.on !== 'function'\n ) {\n throw new InvalidReturnValueError('expected Writable')\n }\n\n // TODO: Avoid finished. It registers an unnecessary amount of listeners.\n finished(res, { readable: false }, (err) => {\n const { callback, res, opaque, trailers, abort } = this\n\n this.res = null\n if (err || !res.readable) {\n util.destroy(res, err)\n }\n\n this.callback = null\n this.runInAsyncScope(callback, null, err || null, { opaque, trailers })\n\n if (err) {\n abort()\n }\n })\n }\n\n res.on('drain', resume)\n\n this.res = res\n\n const needDrain = res.writableNeedDrain !== undefined\n ? res.writableNeedDrain\n : res._writableState && res._writableState.needDrain\n\n return needDrain !== true\n }\n\n onData (chunk) {\n const { res } = this\n\n return res ? res.write(chunk) : true\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n if (!res) {\n return\n }\n\n this.trailers = util.parseHeaders(trailers)\n\n res.end()\n }\n\n onError (err) {\n const { res, callback, opaque, body } = this\n\n removeSignal(this)\n\n this.factory = null\n\n if (res) {\n this.res = null\n util.destroy(res, err)\n } else if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction stream (opts, factory, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n stream.call(this, opts, factory, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n this.dispatch(opts, new StreamHandler(opts, factory, callback))\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = stream\n","'use strict'\n\nconst { InvalidArgumentError, RequestAbortedError, SocketError } = require('../core/errors')\nconst { AsyncResource } = require('async_hooks')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\nconst assert = require('assert')\n\nclass UpgradeHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_UPGRADE')\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.abort = null\n this.context = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (!this.callback) {\n throw new RequestAbortedError()\n }\n\n this.abort = abort\n this.context = null\n }\n\n onHeaders () {\n throw new SocketError('bad upgrade', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n assert.strictEqual(statusCode, 101)\n\n removeSignal(this)\n\n this.callback = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.runInAsyncScope(callback, null, null, {\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction upgrade (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n upgrade.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const upgradeHandler = new UpgradeHandler(opts, callback)\n this.dispatch({\n ...opts,\n method: opts.method || 'GET',\n upgrade: opts.protocol || 'Websocket'\n }, upgradeHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts && opts.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = upgrade\n","'use strict'\n\nmodule.exports.request = require('./api-request')\nmodule.exports.stream = require('./api-stream')\nmodule.exports.pipeline = require('./api-pipeline')\nmodule.exports.upgrade = require('./api-upgrade')\nmodule.exports.connect = require('./api-connect')\n","// Ported from https://github.com/nodejs/undici/pull/907\n\n'use strict'\n\nconst assert = require('assert')\nconst { Readable } = require('stream')\nconst { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require('../core/errors')\nconst util = require('../core/util')\nconst { ReadableStreamFrom, toUSVString } = require('../core/util')\n\nlet Blob\n\nconst kConsume = Symbol('kConsume')\nconst kReading = Symbol('kReading')\nconst kBody = Symbol('kBody')\nconst kAbort = Symbol('abort')\nconst kContentType = Symbol('kContentType')\n\nconst noop = () => {}\n\nmodule.exports = class BodyReadable extends Readable {\n constructor ({\n resume,\n abort,\n contentType = '',\n highWaterMark = 64 * 1024 // Same as nodejs fs streams.\n }) {\n super({\n autoDestroy: true,\n read: resume,\n highWaterMark\n })\n\n this._readableState.dataEmitted = false\n\n this[kAbort] = abort\n this[kConsume] = null\n this[kBody] = null\n this[kContentType] = contentType\n\n // Is stream being consumed through Readable API?\n // This is an optimization so that we avoid checking\n // for 'data' and 'readable' listeners in the hot path\n // inside push().\n this[kReading] = false\n }\n\n destroy (err) {\n if (this.destroyed) {\n // Node < 16\n return this\n }\n\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (err) {\n this[kAbort]()\n }\n\n return super.destroy(err)\n }\n\n emit (ev, ...args) {\n if (ev === 'data') {\n // Node < 16.7\n this._readableState.dataEmitted = true\n } else if (ev === 'error') {\n // Node < 16\n this._readableState.errorEmitted = true\n }\n return super.emit(ev, ...args)\n }\n\n on (ev, ...args) {\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = true\n }\n return super.on(ev, ...args)\n }\n\n addListener (ev, ...args) {\n return this.on(ev, ...args)\n }\n\n off (ev, ...args) {\n const ret = super.off(ev, ...args)\n if (ev === 'data' || ev === 'readable') {\n this[kReading] = (\n this.listenerCount('data') > 0 ||\n this.listenerCount('readable') > 0\n )\n }\n return ret\n }\n\n removeListener (ev, ...args) {\n return this.off(ev, ...args)\n }\n\n push (chunk) {\n if (this[kConsume] && chunk !== null && this.readableLength === 0) {\n consumePush(this[kConsume], chunk)\n return this[kReading] ? super.push(chunk) : true\n }\n return super.push(chunk)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-text\n async text () {\n return consume(this, 'text')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-json\n async json () {\n return consume(this, 'json')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-blob\n async blob () {\n return consume(this, 'blob')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-arraybuffer\n async arrayBuffer () {\n return consume(this, 'arrayBuffer')\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-formdata\n async formData () {\n // TODO: Implement.\n throw new NotSupportedError()\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-bodyused\n get bodyUsed () {\n return util.isDisturbed(this)\n }\n\n // https://fetch.spec.whatwg.org/#dom-body-body\n get body () {\n if (!this[kBody]) {\n this[kBody] = ReadableStreamFrom(this)\n if (this[kConsume]) {\n // TODO: Is this the best way to force a lock?\n this[kBody].getReader() // Ensure stream is locked.\n assert(this[kBody].locked)\n }\n }\n return this[kBody]\n }\n\n dump (opts) {\n let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144\n const signal = opts && opts.signal\n\n if (signal) {\n try {\n if (typeof signal !== 'object' || !('aborted' in signal)) {\n throw new InvalidArgumentError('signal must be an AbortSignal')\n }\n util.throwIfAborted(signal)\n } catch (err) {\n return Promise.reject(err)\n }\n }\n\n if (this.closed) {\n return Promise.resolve(null)\n }\n\n return new Promise((resolve, reject) => {\n const signalListenerCleanup = signal\n ? util.addAbortListener(signal, () => {\n this.destroy()\n })\n : noop\n\n this\n .on('close', function () {\n signalListenerCleanup()\n if (signal && signal.aborted) {\n reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' }))\n } else {\n resolve(null)\n }\n })\n .on('error', noop)\n .on('data', function (chunk) {\n limit -= chunk.length\n if (limit <= 0) {\n this.destroy()\n }\n })\n .resume()\n })\n }\n}\n\n// https://streams.spec.whatwg.org/#readablestream-locked\nfunction isLocked (self) {\n // Consume is an implicit lock.\n return (self[kBody] && self[kBody].locked === true) || self[kConsume]\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction isUnusable (self) {\n return util.isDisturbed(self) || isLocked(self)\n}\n\nasync function consume (stream, type) {\n if (isUnusable(stream)) {\n throw new TypeError('unusable')\n }\n\n assert(!stream[kConsume])\n\n return new Promise((resolve, reject) => {\n stream[kConsume] = {\n type,\n stream,\n resolve,\n reject,\n length: 0,\n body: []\n }\n\n stream\n .on('error', function (err) {\n consumeFinish(this[kConsume], err)\n })\n .on('close', function () {\n if (this[kConsume].body !== null) {\n consumeFinish(this[kConsume], new RequestAbortedError())\n }\n })\n\n process.nextTick(consumeStart, stream[kConsume])\n })\n}\n\nfunction consumeStart (consume) {\n if (consume.body === null) {\n return\n }\n\n const { _readableState: state } = consume.stream\n\n for (const chunk of state.buffer) {\n consumePush(consume, chunk)\n }\n\n if (state.endEmitted) {\n consumeEnd(this[kConsume])\n } else {\n consume.stream.on('end', function () {\n consumeEnd(this[kConsume])\n })\n }\n\n consume.stream.resume()\n\n while (consume.stream.read() != null) {\n // Loop\n }\n}\n\nfunction consumeEnd (consume) {\n const { type, body, resolve, stream, length } = consume\n\n try {\n if (type === 'text') {\n resolve(toUSVString(Buffer.concat(body)))\n } else if (type === 'json') {\n resolve(JSON.parse(Buffer.concat(body)))\n } else if (type === 'arrayBuffer') {\n const dst = new Uint8Array(length)\n\n let pos = 0\n for (const buf of body) {\n dst.set(buf, pos)\n pos += buf.byteLength\n }\n\n resolve(dst.buffer)\n } else if (type === 'blob') {\n if (!Blob) {\n Blob = require('buffer').Blob\n }\n resolve(new Blob(body, { type: stream[kContentType] }))\n }\n\n consumeFinish(consume)\n } catch (err) {\n stream.destroy(err)\n }\n}\n\nfunction consumePush (consume, chunk) {\n consume.length += chunk.length\n consume.body.push(chunk)\n}\n\nfunction consumeFinish (consume, err) {\n if (consume.body === null) {\n return\n }\n\n if (err) {\n consume.reject(err)\n } else {\n consume.resolve()\n }\n\n consume.type = null\n consume.stream = null\n consume.resolve = null\n consume.reject = null\n consume.length = 0\n consume.body = null\n}\n","const assert = require('assert')\nconst {\n ResponseStatusCodeError\n} = require('../core/errors')\nconst { toUSVString } = require('../core/util')\n\nasync function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) {\n assert(body)\n\n let chunks = []\n let limit = 0\n\n for await (const chunk of body) {\n chunks.push(chunk)\n limit += chunk.length\n if (limit > 128 * 1024) {\n chunks = null\n break\n }\n }\n\n if (statusCode === 204 || !contentType || !chunks) {\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))\n return\n }\n\n try {\n if (contentType.startsWith('application/json')) {\n const payload = JSON.parse(toUSVString(Buffer.concat(chunks)))\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))\n return\n }\n\n if (contentType.startsWith('text/')) {\n const payload = toUSVString(Buffer.concat(chunks))\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload))\n return\n }\n } catch (err) {\n // Process in a fallback if error\n }\n\n process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers))\n}\n\nmodule.exports = { getResolveErrorBodyCallback }\n","'use strict'\n\nconst {\n BalancedPoolMissingUpstreamError,\n InvalidArgumentError\n} = require('./core/errors')\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Pool = require('./pool')\nconst { kUrl, kInterceptors } = require('./core/symbols')\nconst { parseOrigin } = require('./core/util')\nconst kFactory = Symbol('factory')\n\nconst kOptions = Symbol('options')\nconst kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')\nconst kCurrentWeight = Symbol('kCurrentWeight')\nconst kIndex = Symbol('kIndex')\nconst kWeight = Symbol('kWeight')\nconst kMaxWeightPerServer = Symbol('kMaxWeightPerServer')\nconst kErrorPenalty = Symbol('kErrorPenalty')\n\nfunction getGreatestCommonDivisor (a, b) {\n if (b === 0) return a\n return getGreatestCommonDivisor(b, a % b)\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass BalancedPool extends PoolBase {\n constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {\n super()\n\n this[kOptions] = opts\n this[kIndex] = -1\n this[kCurrentWeight] = 0\n\n this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100\n this[kErrorPenalty] = this[kOptions].errorPenalty || 15\n\n if (!Array.isArray(upstreams)) {\n upstreams = [upstreams]\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool)\n ? opts.interceptors.BalancedPool\n : []\n this[kFactory] = factory\n\n for (const upstream of upstreams) {\n this.addUpstream(upstream)\n }\n this._updateBalancedPoolStats()\n }\n\n addUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n if (this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))) {\n return this\n }\n const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]))\n\n this[kAddClient](pool)\n pool.on('connect', () => {\n pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])\n })\n\n pool.on('connectionError', () => {\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n })\n\n pool.on('disconnect', (...args) => {\n const err = args[2]\n if (err && err.code === 'UND_ERR_SOCKET') {\n // decrease the weight of the pool.\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n }\n })\n\n for (const client of this[kClients]) {\n client[kWeight] = this[kMaxWeightPerServer]\n }\n\n this._updateBalancedPoolStats()\n\n return this\n }\n\n _updateBalancedPoolStats () {\n this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0)\n }\n\n removeUpstream (upstream) {\n const upstreamOrigin = parseOrigin(upstream).origin\n\n const pool = this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n\n if (pool) {\n this[kRemoveClient](pool)\n }\n\n return this\n }\n\n get upstreams () {\n return this[kClients]\n .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)\n .map((p) => p[kUrl].origin)\n }\n\n [kGetDispatcher] () {\n // We validate that pools is greater than 0,\n // otherwise we would have to wait until an upstream\n // is added, which might never happen.\n if (this[kClients].length === 0) {\n throw new BalancedPoolMissingUpstreamError()\n }\n\n const dispatcher = this[kClients].find(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n\n if (!dispatcher) {\n return\n }\n\n const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)\n\n if (allClientsBusy) {\n return\n }\n\n let counter = 0\n\n let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])\n\n while (counter++ < this[kClients].length) {\n this[kIndex] = (this[kIndex] + 1) % this[kClients].length\n const pool = this[kClients][this[kIndex]]\n\n // find pool index with the largest weight\n if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {\n maxWeightIndex = this[kIndex]\n }\n\n // decrease the current weight every `this[kClients].length`.\n if (this[kIndex] === 0) {\n // Set the current weight to the next lower weight.\n this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]\n\n if (this[kCurrentWeight] <= 0) {\n this[kCurrentWeight] = this[kMaxWeightPerServer]\n }\n }\n if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {\n return pool\n }\n }\n\n this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]\n this[kIndex] = maxWeightIndex\n return this[kClients][maxWeightIndex]\n }\n}\n\nmodule.exports = BalancedPool\n","'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { urlEquals, fieldValues: getFieldValues } = require('./util')\nconst { kEnumerableProperty, isDisturbed } = require('../core/util')\nconst { kHeadersList } = require('../core/symbols')\nconst { webidl } = require('../fetch/webidl')\nconst { Response, cloneResponse } = require('../fetch/response')\nconst { Request } = require('../fetch/request')\nconst { kState, kHeaders, kGuard, kRealm } = require('../fetch/symbols')\nconst { fetching } = require('../fetch/index')\nconst { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require('../fetch/util')\nconst assert = require('assert')\nconst { getGlobalDispatcher } = require('../global')\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation\n * @typedef {Object} CacheBatchOperation\n * @property {'delete' | 'put'} type\n * @property {any} request\n * @property {any} response\n * @property {import('../../types/cache').CacheQueryOptions} options\n */\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list\n * @typedef {[any, any][]} requestResponseList\n */\n\nclass Cache {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list\n * @type {requestResponseList}\n */\n #relevantRequestResponseList\n\n constructor () {\n if (arguments[0] !== kConstruct) {\n webidl.illegalConstructor()\n }\n\n this.#relevantRequestResponseList = arguments[1]\n }\n\n async match (request, options = {}) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' })\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n const p = await this.matchAll(request, options)\n\n if (p.length === 0) {\n return\n }\n\n return p[0]\n }\n\n async matchAll (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') {\n // 2.2.1\n r = new Request(request)[kState]\n }\n }\n\n // 5.\n // 5.1\n const responses = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n responses.push(requestResponse[1])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n responses.push(requestResponse[1])\n }\n }\n\n // 5.4\n // We don't implement CORs so we don't need to loop over the responses, yay!\n\n // 5.5.1\n const responseList = []\n\n // 5.5.2\n for (const response of responses) {\n // 5.5.2.1\n const responseObject = new Response(response.body?.source ?? null)\n const body = responseObject[kState].body\n responseObject[kState] = response\n responseObject[kState].body = body\n responseObject[kHeaders][kHeadersList] = response.headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n\n responseList.push(responseObject)\n }\n\n // 6.\n return Object.freeze(responseList)\n }\n\n async add (request) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' })\n\n request = webidl.converters.RequestInfo(request)\n\n // 1.\n const requests = [request]\n\n // 2.\n const responseArrayPromise = this.addAll(requests)\n\n // 3.\n return await responseArrayPromise\n }\n\n async addAll (requests) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' })\n\n requests = webidl.converters['sequence'](requests)\n\n // 1.\n const responsePromises = []\n\n // 2.\n const requestList = []\n\n // 3.\n for (const request of requests) {\n if (typeof request === 'string') {\n continue\n }\n\n // 3.1\n const r = request[kState]\n\n // 3.2\n if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Expected http/s scheme when method is not GET.'\n })\n }\n }\n\n // 4.\n /** @type {ReturnType[]} */\n const fetchControllers = []\n\n // 5.\n for (const request of requests) {\n // 5.1\n const r = new Request(request)[kState]\n\n // 5.2\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Expected http/s scheme.'\n })\n }\n\n // 5.4\n r.initiator = 'fetch'\n r.destination = 'subresource'\n\n // 5.5\n requestList.push(r)\n\n // 5.6\n const responsePromise = createDeferredPromise()\n\n // 5.7\n fetchControllers.push(fetching({\n request: r,\n dispatcher: getGlobalDispatcher(),\n processResponse (response) {\n // 1.\n if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Received an invalid status code or the request failed.'\n }))\n } else if (response.headersList.contains('vary')) { // 2.\n // 2.1\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n // 2.2\n for (const fieldValue of fieldValues) {\n // 2.2.1\n if (fieldValue === '*') {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'invalid vary field value'\n }))\n\n for (const controller of fetchControllers) {\n controller.abort()\n }\n\n return\n }\n }\n }\n },\n processResponseEndOfBody (response) {\n // 1.\n if (response.aborted) {\n responsePromise.reject(new DOMException('aborted', 'AbortError'))\n return\n }\n\n // 2.\n responsePromise.resolve(response)\n }\n }))\n\n // 5.8\n responsePromises.push(responsePromise.promise)\n }\n\n // 6.\n const p = Promise.all(responsePromises)\n\n // 7.\n const responses = await p\n\n // 7.1\n const operations = []\n\n // 7.2\n let index = 0\n\n // 7.3\n for (const response of responses) {\n // 7.3.1\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 7.3.2\n request: requestList[index], // 7.3.3\n response // 7.3.4\n }\n\n operations.push(operation) // 7.3.5\n\n index++ // 7.3.6\n }\n\n // 7.5\n const cacheJobPromise = createDeferredPromise()\n\n // 7.6.1\n let errorData = null\n\n // 7.6.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 7.6.3\n queueMicrotask(() => {\n // 7.6.3.1\n if (errorData === null) {\n cacheJobPromise.resolve(undefined)\n } else {\n // 7.6.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n // 7.7\n return cacheJobPromise.promise\n }\n\n async put (request, response) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' })\n\n request = webidl.converters.RequestInfo(request)\n response = webidl.converters.Response(response)\n\n // 1.\n let innerRequest = null\n\n // 2.\n if (request instanceof Request) {\n innerRequest = request[kState]\n } else { // 3.\n innerRequest = new Request(request)[kState]\n }\n\n // 4.\n if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Expected an http/s scheme when method is not GET'\n })\n }\n\n // 5.\n const innerResponse = response[kState]\n\n // 6.\n if (innerResponse.status === 206) {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Got 206 status'\n })\n }\n\n // 7.\n if (innerResponse.headersList.contains('vary')) {\n // 7.1.\n const fieldValues = getFieldValues(innerResponse.headersList.get('vary'))\n\n // 7.2.\n for (const fieldValue of fieldValues) {\n // 7.2.1\n if (fieldValue === '*') {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Got * vary field value'\n })\n }\n }\n }\n\n // 8.\n if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {\n throw webidl.errors.exception({\n header: 'Cache.put',\n message: 'Response body is locked or disturbed'\n })\n }\n\n // 9.\n const clonedResponse = cloneResponse(innerResponse)\n\n // 10.\n const bodyReadPromise = createDeferredPromise()\n\n // 11.\n if (innerResponse.body != null) {\n // 11.1\n const stream = innerResponse.body.stream\n\n // 11.2\n const reader = stream.getReader()\n\n // 11.3\n readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject)\n } else {\n bodyReadPromise.resolve(undefined)\n }\n\n // 12.\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n // 13.\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 14.\n request: innerRequest, // 15.\n response: clonedResponse // 16.\n }\n\n // 17.\n operations.push(operation)\n\n // 19.\n const bytes = await bodyReadPromise.promise\n\n if (clonedResponse.body != null) {\n clonedResponse.body.source = bytes\n }\n\n // 19.1\n const cacheJobPromise = createDeferredPromise()\n\n // 19.2.1\n let errorData = null\n\n // 19.2.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 19.2.3\n queueMicrotask(() => {\n // 19.2.3.1\n if (errorData === null) {\n cacheJobPromise.resolve()\n } else { // 19.2.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n async delete (request, options = {}) {\n webidl.brandCheck(this, Cache)\n webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' })\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n /**\n * @type {Request}\n */\n let r = null\n\n if (request instanceof Request) {\n r = request[kState]\n\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return false\n }\n } else {\n assert(typeof request === 'string')\n\n r = new Request(request)[kState]\n }\n\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'delete',\n request: r,\n options\n }\n\n operations.push(operation)\n\n const cacheJobPromise = createDeferredPromise()\n\n let errorData = null\n let requestResponses\n\n try {\n requestResponses = this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n queueMicrotask(() => {\n if (errorData === null) {\n cacheJobPromise.resolve(!!requestResponses?.length)\n } else {\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys\n * @param {any} request\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @returns {readonly Request[]}\n */\n async keys (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options)\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n // 2.1\n if (request instanceof Request) {\n // 2.1.1\n r = request[kState]\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') { // 2.2\n r = new Request(request)[kState]\n }\n }\n\n // 4.\n const promise = createDeferredPromise()\n\n // 5.\n // 5.1\n const requests = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n // 5.2.1.1\n requests.push(requestResponse[0])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n // 5.3.2.1\n requests.push(requestResponse[0])\n }\n }\n\n // 5.4\n queueMicrotask(() => {\n // 5.4.1\n const requestList = []\n\n // 5.4.2\n for (const request of requests) {\n const requestObject = new Request('https://a')\n requestObject[kState] = request\n requestObject[kHeaders][kHeadersList] = request.headersList\n requestObject[kHeaders][kGuard] = 'immutable'\n requestObject[kRealm] = request.client\n\n // 5.4.2.1\n requestList.push(requestObject)\n }\n\n // 5.4.3\n promise.resolve(Object.freeze(requestList))\n })\n\n return promise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm\n * @param {CacheBatchOperation[]} operations\n * @returns {requestResponseList}\n */\n #batchCacheOperations (operations) {\n // 1.\n const cache = this.#relevantRequestResponseList\n\n // 2.\n const backupCache = [...cache]\n\n // 3.\n const addedItems = []\n\n // 4.1\n const resultList = []\n\n try {\n // 4.2\n for (const operation of operations) {\n // 4.2.1\n if (operation.type !== 'delete' && operation.type !== 'put') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'operation type does not match \"delete\" or \"put\"'\n })\n }\n\n // 4.2.2\n if (operation.type === 'delete' && operation.response != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'delete operation should not have an associated response'\n })\n }\n\n // 4.2.3\n if (this.#queryCache(operation.request, operation.options, addedItems).length) {\n throw new DOMException('???', 'InvalidStateError')\n }\n\n // 4.2.4\n let requestResponses\n\n // 4.2.5\n if (operation.type === 'delete') {\n // 4.2.5.1\n requestResponses = this.#queryCache(operation.request, operation.options)\n\n // TODO: the spec is wrong, this is needed to pass WPTs\n if (requestResponses.length === 0) {\n return []\n }\n\n // 4.2.5.2\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.5.2.1\n cache.splice(idx, 1)\n }\n } else if (operation.type === 'put') { // 4.2.6\n // 4.2.6.1\n if (operation.response == null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'put operation should have an associated response'\n })\n }\n\n // 4.2.6.2\n const r = operation.request\n\n // 4.2.6.3\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'expected http or https scheme'\n })\n }\n\n // 4.2.6.4\n if (r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'not get method'\n })\n }\n\n // 4.2.6.5\n if (operation.options != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'options must not be defined'\n })\n }\n\n // 4.2.6.6\n requestResponses = this.#queryCache(operation.request)\n\n // 4.2.6.7\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.6.7.1\n cache.splice(idx, 1)\n }\n\n // 4.2.6.8\n cache.push([operation.request, operation.response])\n\n // 4.2.6.10\n addedItems.push([operation.request, operation.response])\n }\n\n // 4.2.7\n resultList.push([operation.request, operation.response])\n }\n\n // 4.3\n return resultList\n } catch (e) { // 5.\n // 5.1\n this.#relevantRequestResponseList.length = 0\n\n // 5.2\n this.#relevantRequestResponseList = backupCache\n\n // 5.3\n throw e\n }\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#query-cache\n * @param {any} requestQuery\n * @param {import('../../types/cache').CacheQueryOptions} options\n * @param {requestResponseList} targetStorage\n * @returns {requestResponseList}\n */\n #queryCache (requestQuery, options, targetStorage) {\n /** @type {requestResponseList} */\n const resultList = []\n\n const storage = targetStorage ?? this.#relevantRequestResponseList\n\n for (const requestResponse of storage) {\n const [cachedRequest, cachedResponse] = requestResponse\n if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) {\n resultList.push(requestResponse)\n }\n }\n\n return resultList\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm\n * @param {any} requestQuery\n * @param {any} request\n * @param {any | null} response\n * @param {import('../../types/cache').CacheQueryOptions | undefined} options\n * @returns {boolean}\n */\n #requestMatchesCachedItem (requestQuery, request, response = null, options) {\n // if (options?.ignoreMethod === false && request.method === 'GET') {\n // return false\n // }\n\n const queryURL = new URL(requestQuery.url)\n\n const cachedURL = new URL(request.url)\n\n if (options?.ignoreSearch) {\n cachedURL.search = ''\n\n queryURL.search = ''\n }\n\n if (!urlEquals(queryURL, cachedURL, true)) {\n return false\n }\n\n if (\n response == null ||\n options?.ignoreVary ||\n !response.headersList.contains('vary')\n ) {\n return true\n }\n\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n for (const fieldValue of fieldValues) {\n if (fieldValue === '*') {\n return false\n }\n\n const requestValue = request.headersList.get(fieldValue)\n const queryValue = requestQuery.headersList.get(fieldValue)\n\n // If one has the header and the other doesn't, or one has\n // a different value than the other, return false\n if (requestValue !== queryValue) {\n return false\n }\n }\n\n return true\n }\n}\n\nObject.defineProperties(Cache.prototype, {\n [Symbol.toStringTag]: {\n value: 'Cache',\n configurable: true\n },\n match: kEnumerableProperty,\n matchAll: kEnumerableProperty,\n add: kEnumerableProperty,\n addAll: kEnumerableProperty,\n put: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nconst cacheQueryOptionConverters = [\n {\n key: 'ignoreSearch',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'ignoreMethod',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'ignoreVary',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n]\n\nwebidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters)\n\nwebidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([\n ...cacheQueryOptionConverters,\n {\n key: 'cacheName',\n converter: webidl.converters.DOMString\n }\n])\n\nwebidl.converters.Response = webidl.interfaceConverter(Response)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.RequestInfo\n)\n\nmodule.exports = {\n Cache\n}\n","'use strict'\n\nconst { kConstruct } = require('./symbols')\nconst { Cache } = require('./cache')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\n\nclass CacheStorage {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map\n * @type {Map}\n */\n async has (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n // 2.1.1\n // 2.2\n return this.#caches.has(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open\n * @param {string} cacheName\n * @returns {Promise}\n */\n async open (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n // 2.1\n if (this.#caches.has(cacheName)) {\n // await caches.open('v1') !== await caches.open('v1')\n\n // 2.1.1\n const cache = this.#caches.get(cacheName)\n\n // 2.1.1.1\n return new Cache(kConstruct, cache)\n }\n\n // 2.2\n const cache = []\n\n // 2.3\n this.#caches.set(cacheName, cache)\n\n // 2.4\n return new Cache(kConstruct, cache)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete\n * @param {string} cacheName\n * @returns {Promise}\n */\n async delete (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' })\n\n cacheName = webidl.converters.DOMString(cacheName)\n\n return this.#caches.delete(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys\n * @returns {string[]}\n */\n async keys () {\n webidl.brandCheck(this, CacheStorage)\n\n // 2.1\n const keys = this.#caches.keys()\n\n // 2.2\n return [...keys]\n }\n}\n\nObject.defineProperties(CacheStorage.prototype, {\n [Symbol.toStringTag]: {\n value: 'CacheStorage',\n configurable: true\n },\n match: kEnumerableProperty,\n has: kEnumerableProperty,\n open: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nmodule.exports = {\n CacheStorage\n}\n","'use strict'\n\nmodule.exports = {\n kConstruct: require('../core/symbols').kConstruct\n}\n","'use strict'\n\nconst assert = require('assert')\nconst { URLSerializer } = require('../fetch/dataURL')\nconst { isValidHeaderName } = require('../fetch/util')\n\n/**\n * @see https://url.spec.whatwg.org/#concept-url-equals\n * @param {URL} A\n * @param {URL} B\n * @param {boolean | undefined} excludeFragment\n * @returns {boolean}\n */\nfunction urlEquals (A, B, excludeFragment = false) {\n const serializedA = URLSerializer(A, excludeFragment)\n\n const serializedB = URLSerializer(B, excludeFragment)\n\n return serializedA === serializedB\n}\n\n/**\n * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262\n * @param {string} header\n */\nfunction fieldValues (header) {\n assert(header !== null)\n\n const values = []\n\n for (let value of header.split(',')) {\n value = value.trim()\n\n if (!value.length) {\n continue\n } else if (!isValidHeaderName(value)) {\n continue\n }\n\n values.push(value)\n }\n\n return values\n}\n\nmodule.exports = {\n urlEquals,\n fieldValues\n}\n","// @ts-check\n\n'use strict'\n\n/* global WebAssembly */\n\nconst assert = require('assert')\nconst net = require('net')\nconst http = require('http')\nconst { pipeline } = require('stream')\nconst util = require('./core/util')\nconst timers = require('./timers')\nconst Request = require('./core/request')\nconst DispatcherBase = require('./dispatcher-base')\nconst {\n RequestContentLengthMismatchError,\n ResponseContentLengthMismatchError,\n InvalidArgumentError,\n RequestAbortedError,\n HeadersTimeoutError,\n HeadersOverflowError,\n SocketError,\n InformationalError,\n BodyTimeoutError,\n HTTPParserError,\n ResponseExceededMaxSizeError,\n ClientDestroyedError\n} = require('./core/errors')\nconst buildConnector = require('./core/connect')\nconst {\n kUrl,\n kReset,\n kServerName,\n kClient,\n kBusy,\n kParser,\n kConnect,\n kBlocking,\n kResuming,\n kRunning,\n kPending,\n kSize,\n kWriting,\n kQueue,\n kConnected,\n kConnecting,\n kNeedDrain,\n kNoRef,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kSocket,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kConnector,\n kMaxRedirections,\n kMaxRequests,\n kCounter,\n kClose,\n kDestroy,\n kDispatch,\n kInterceptors,\n kLocalAddress,\n kMaxResponseSize,\n kHTTPConnVersion,\n // HTTP2\n kHost,\n kHTTP2Session,\n kHTTP2SessionState,\n kHTTP2BuildRequest,\n kHTTP2CopyHeaders,\n kHTTP1BuildRequest\n} = require('./core/symbols')\n\n/** @type {import('http2')} */\nlet http2\ntry {\n http2 = require('http2')\n} catch {\n // @ts-ignore\n http2 = { constants: {} }\n}\n\nconst {\n constants: {\n HTTP2_HEADER_AUTHORITY,\n HTTP2_HEADER_METHOD,\n HTTP2_HEADER_PATH,\n HTTP2_HEADER_SCHEME,\n HTTP2_HEADER_CONTENT_LENGTH,\n HTTP2_HEADER_EXPECT,\n HTTP2_HEADER_STATUS\n }\n} = http2\n\n// Experimental\nlet h2ExperimentalWarned = false\n\nconst FastBuffer = Buffer[Symbol.species]\n\nconst kClosedResolve = Symbol('kClosedResolve')\n\nconst channels = {}\n\ntry {\n const diagnosticsChannel = require('diagnostics_channel')\n channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders')\n channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect')\n channels.connectError = diagnosticsChannel.channel('undici:client:connectError')\n channels.connected = diagnosticsChannel.channel('undici:client:connected')\n} catch {\n channels.sendHeaders = { hasSubscribers: false }\n channels.beforeConnect = { hasSubscribers: false }\n channels.connectError = { hasSubscribers: false }\n channels.connected = { hasSubscribers: false }\n}\n\n/**\n * @type {import('../types/client').default}\n */\nclass Client extends DispatcherBase {\n /**\n *\n * @param {string|URL} url\n * @param {import('../types/client').Client.Options} options\n */\n constructor (url, {\n interceptors,\n maxHeaderSize,\n headersTimeout,\n socketTimeout,\n requestTimeout,\n connectTimeout,\n bodyTimeout,\n idleTimeout,\n keepAlive,\n keepAliveTimeout,\n maxKeepAliveTimeout,\n keepAliveMaxTimeout,\n keepAliveTimeoutThreshold,\n socketPath,\n pipelining,\n tls,\n strictContentLength,\n maxCachedSessions,\n maxRedirections,\n connect,\n maxRequestsPerClient,\n localAddress,\n maxResponseSize,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n // h2\n allowH2,\n maxConcurrentStreams\n } = {}) {\n super()\n\n if (keepAlive !== undefined) {\n throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')\n }\n\n if (socketTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (requestTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (idleTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead')\n }\n\n if (maxKeepAliveTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead')\n }\n\n if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) {\n throw new InvalidArgumentError('invalid maxHeaderSize')\n }\n\n if (socketPath != null && typeof socketPath !== 'string') {\n throw new InvalidArgumentError('invalid socketPath')\n }\n\n if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {\n throw new InvalidArgumentError('invalid connectTimeout')\n }\n\n if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveTimeout')\n }\n\n if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveMaxTimeout')\n }\n\n if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {\n throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold')\n }\n\n if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('headersTimeout must be a positive integer or zero')\n }\n\n if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {\n throw new InvalidArgumentError('maxRequestsPerClient must be a positive number')\n }\n\n if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) {\n throw new InvalidArgumentError('localAddress must be valid string IP address')\n }\n\n if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {\n throw new InvalidArgumentError('maxResponseSize must be a positive number')\n }\n\n if (\n autoSelectFamilyAttemptTimeout != null &&\n (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)\n ) {\n throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number')\n }\n\n // h2\n if (allowH2 != null && typeof allowH2 !== 'boolean') {\n throw new InvalidArgumentError('allowH2 must be a valid boolean value')\n }\n\n if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) {\n throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client)\n ? interceptors.Client\n : [createRedirectInterceptor({ maxRedirections })]\n this[kUrl] = util.parseOrigin(url)\n this[kConnector] = connect\n this[kSocket] = null\n this[kPipelining] = pipelining != null ? pipelining : 1\n this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize\n this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout\n this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout\n this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold\n this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]\n this[kServerName] = null\n this[kLocalAddress] = localAddress != null ? localAddress : null\n this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\\r\\n`\n this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3\n this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3\n this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength\n this[kMaxRedirections] = maxRedirections\n this[kMaxRequests] = maxRequestsPerClient\n this[kClosedResolve] = null\n this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1\n this[kHTTPConnVersion] = 'h1'\n\n // HTTP/2\n this[kHTTP2Session] = null\n this[kHTTP2SessionState] = !allowH2\n ? null\n : {\n // streams: null, // Fixed queue of streams - For future support of `push`\n openStreams: 0, // Keep track of them to decide wether or not unref the session\n maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server\n }\n this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}`\n\n // kQueue is built up of 3 sections separated by\n // the kRunningIdx and kPendingIdx indices.\n // | complete | running | pending |\n // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length\n // kRunningIdx points to the first running element.\n // kPendingIdx points to the first pending element.\n // This implements a fast queue with an amortized\n // time of O(1).\n\n this[kQueue] = []\n this[kRunningIdx] = 0\n this[kPendingIdx] = 0\n }\n\n get pipelining () {\n return this[kPipelining]\n }\n\n set pipelining (value) {\n this[kPipelining] = value\n resume(this, true)\n }\n\n get [kPending] () {\n return this[kQueue].length - this[kPendingIdx]\n }\n\n get [kRunning] () {\n return this[kPendingIdx] - this[kRunningIdx]\n }\n\n get [kSize] () {\n return this[kQueue].length - this[kRunningIdx]\n }\n\n get [kConnected] () {\n return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed\n }\n\n get [kBusy] () {\n const socket = this[kSocket]\n return (\n (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) ||\n (this[kSize] >= (this[kPipelining] || 1)) ||\n this[kPending] > 0\n )\n }\n\n /* istanbul ignore: only used for test */\n [kConnect] (cb) {\n connect(this)\n this.once('connect', cb)\n }\n\n [kDispatch] (opts, handler) {\n const origin = opts.origin || this[kUrl].origin\n\n const request = this[kHTTPConnVersion] === 'h2'\n ? Request[kHTTP2BuildRequest](origin, opts, handler)\n : Request[kHTTP1BuildRequest](origin, opts, handler)\n\n this[kQueue].push(request)\n if (this[kResuming]) {\n // Do nothing.\n } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {\n // Wait a tick in case stream/iterator is ended in the same tick.\n this[kResuming] = 1\n process.nextTick(resume, this)\n } else {\n resume(this, true)\n }\n\n if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {\n this[kNeedDrain] = 2\n }\n\n return this[kNeedDrain] < 2\n }\n\n async [kClose] () {\n // TODO: for H2 we need to gracefully flush the remaining enqueued\n // request and close each stream.\n return new Promise((resolve) => {\n if (!this[kSize]) {\n resolve(null)\n } else {\n this[kClosedResolve] = resolve\n }\n })\n }\n\n async [kDestroy] (err) {\n return new Promise((resolve) => {\n const requests = this[kQueue].splice(this[kPendingIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(this, request, err)\n }\n\n const callback = () => {\n if (this[kClosedResolve]) {\n // TODO (fix): Should we error here with ClientDestroyedError?\n this[kClosedResolve]()\n this[kClosedResolve] = null\n }\n resolve()\n }\n\n if (this[kHTTP2Session] != null) {\n util.destroy(this[kHTTP2Session], err)\n this[kHTTP2Session] = null\n this[kHTTP2SessionState] = null\n }\n\n if (!this[kSocket]) {\n queueMicrotask(callback)\n } else {\n util.destroy(this[kSocket].on('close', callback), err)\n }\n\n resume(this)\n })\n }\n}\n\nfunction onHttp2SessionError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kSocket][kError] = err\n\n onError(this[kClient], err)\n}\n\nfunction onHttp2FrameError (type, code, id) {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n\n if (id === 0) {\n this[kSocket][kError] = err\n onError(this[kClient], err)\n }\n}\n\nfunction onHttp2SessionEnd () {\n util.destroy(this, new SocketError('other side closed'))\n util.destroy(this[kSocket], new SocketError('other side closed'))\n}\n\nfunction onHTTP2GoAway (code) {\n const client = this[kClient]\n const err = new InformationalError(`HTTP/2: \"GOAWAY\" frame received with code ${code}`)\n client[kSocket] = null\n client[kHTTP2Session] = null\n\n if (client.destroyed) {\n assert(this[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(this, request, err)\n }\n } else if (client[kRunning] > 0) {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect',\n client[kUrl],\n [client],\n err\n )\n\n resume(client)\n}\n\nconst constants = require('./llhttp/constants')\nconst createRedirectInterceptor = require('./interceptor/redirectInterceptor')\nconst EMPTY_BUF = Buffer.alloc(0)\n\nasync function lazyllhttp () {\n const llhttpWasmData = process.env.JEST_WORKER_ID ? require('./llhttp/llhttp-wasm.js') : undefined\n\n let mod\n try {\n mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd-wasm.js'), 'base64'))\n } catch (e) {\n /* istanbul ignore next */\n\n // We could check if the error was caused by the simd option not\n // being enabled, but the occurring of this other error\n // * https://github.com/emscripten-core/emscripten/issues/11495\n // got me to remove that check to avoid breaking Node 12.\n mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require('./llhttp/llhttp-wasm.js'), 'base64'))\n }\n\n return await WebAssembly.instantiate(mod, {\n env: {\n /* eslint-disable camelcase */\n\n wasm_on_url: (p, at, len) => {\n /* istanbul ignore next */\n return 0\n },\n wasm_on_status: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_begin: (p) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onMessageBegin() || 0\n },\n wasm_on_header_field: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_header_value: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0\n },\n wasm_on_body: (p, at, len) => {\n assert.strictEqual(currentParser.ptr, p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0\n },\n wasm_on_message_complete: (p) => {\n assert.strictEqual(currentParser.ptr, p)\n return currentParser.onMessageComplete() || 0\n }\n\n /* eslint-enable camelcase */\n }\n })\n}\n\nlet llhttpInstance = null\nlet llhttpPromise = lazyllhttp()\nllhttpPromise.catch()\n\nlet currentParser = null\nlet currentBufferRef = null\nlet currentBufferSize = 0\nlet currentBufferPtr = null\n\nconst TIMEOUT_HEADERS = 1\nconst TIMEOUT_BODY = 2\nconst TIMEOUT_IDLE = 3\n\nclass Parser {\n constructor (client, socket, { exports }) {\n assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0)\n\n this.llhttp = exports\n this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)\n this.client = client\n this.socket = socket\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n this.statusCode = null\n this.statusText = ''\n this.upgrade = false\n this.headers = []\n this.headersSize = 0\n this.headersMaxSize = client[kMaxHeadersSize]\n this.shouldKeepAlive = false\n this.paused = false\n this.resume = this.resume.bind(this)\n\n this.bytesRead = 0\n\n this.keepAlive = ''\n this.contentLength = ''\n this.connection = ''\n this.maxResponseSize = client[kMaxResponseSize]\n }\n\n setTimeout (value, type) {\n this.timeoutType = type\n if (value !== this.timeoutValue) {\n timers.clearTimeout(this.timeout)\n if (value) {\n this.timeout = timers.setTimeout(onParserTimeout, value, this)\n // istanbul ignore else: only for jest\n if (this.timeout.unref) {\n this.timeout.unref()\n }\n } else {\n this.timeout = null\n }\n this.timeoutValue = value\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n }\n\n resume () {\n if (this.socket.destroyed || !this.paused) {\n return\n }\n\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_resume(this.ptr)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.paused = false\n this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.\n this.readMore()\n }\n\n readMore () {\n while (!this.paused && this.ptr) {\n const chunk = this.socket.read()\n if (chunk === null) {\n break\n }\n this.execute(chunk)\n }\n }\n\n execute (data) {\n assert(this.ptr != null)\n assert(currentParser == null)\n assert(!this.paused)\n\n const { socket, llhttp } = this\n\n if (data.length > currentBufferSize) {\n if (currentBufferPtr) {\n llhttp.free(currentBufferPtr)\n }\n currentBufferSize = Math.ceil(data.length / 4096) * 4096\n currentBufferPtr = llhttp.malloc(currentBufferSize)\n }\n\n new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data)\n\n // Call `execute` on the wasm parser.\n // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,\n // and finally the length of bytes to parse.\n // The return value is an error code or `constants.ERROR.OK`.\n try {\n let ret\n\n try {\n currentBufferRef = data\n currentParser = this\n ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length)\n /* eslint-disable-next-line no-useless-catch */\n } catch (err) {\n /* istanbul ignore next: difficult to make a test case for */\n throw err\n } finally {\n currentParser = null\n currentBufferRef = null\n }\n\n const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr\n\n if (ret === constants.ERROR.PAUSED_UPGRADE) {\n this.onUpgrade(data.slice(offset))\n } else if (ret === constants.ERROR.PAUSED) {\n this.paused = true\n socket.unshift(data.slice(offset))\n } else if (ret !== constants.ERROR.OK) {\n const ptr = llhttp.llhttp_get_error_reason(this.ptr)\n let message = ''\n /* istanbul ignore else: difficult to make a test case for */\n if (ptr) {\n const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)\n message =\n 'Response does not match the HTTP/1.1 protocol (' +\n Buffer.from(llhttp.memory.buffer, ptr, len).toString() +\n ')'\n }\n throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset))\n }\n } catch (err) {\n util.destroy(socket, err)\n }\n }\n\n destroy () {\n assert(this.ptr != null)\n assert(currentParser == null)\n\n this.llhttp.llhttp_free(this.ptr)\n this.ptr = null\n\n timers.clearTimeout(this.timeout)\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n\n this.paused = false\n }\n\n onStatus (buf) {\n this.statusText = buf.toString()\n }\n\n onMessageBegin () {\n const { socket, client } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n if (!request) {\n return -1\n }\n }\n\n onHeaderField (buf) {\n const len = this.headers.length\n\n if ((len & 1) === 0) {\n this.headers.push(buf)\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n this.trackHeader(buf.length)\n }\n\n onHeaderValue (buf) {\n let len = this.headers.length\n\n if ((len & 1) === 1) {\n this.headers.push(buf)\n len += 1\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n const key = this.headers[len - 2]\n if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') {\n this.keepAlive += buf.toString()\n } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') {\n this.connection += buf.toString()\n } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') {\n this.contentLength += buf.toString()\n }\n\n this.trackHeader(buf.length)\n }\n\n trackHeader (len) {\n this.headersSize += len\n if (this.headersSize >= this.headersMaxSize) {\n util.destroy(this.socket, new HeadersOverflowError())\n }\n }\n\n onUpgrade (head) {\n const { upgrade, client, socket, headers, statusCode } = this\n\n assert(upgrade)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(!socket.destroyed)\n assert(socket === client[kSocket])\n assert(!this.paused)\n assert(request.upgrade || request.method === 'CONNECT')\n\n this.statusCode = null\n this.statusText = ''\n this.shouldKeepAlive = null\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n socket.unshift(head)\n\n socket[kParser].destroy()\n socket[kParser] = null\n\n socket[kClient] = null\n socket[kError] = null\n socket\n .removeListener('error', onSocketError)\n .removeListener('readable', onSocketReadable)\n .removeListener('end', onSocketEnd)\n .removeListener('close', onSocketClose)\n\n client[kSocket] = null\n client[kQueue][client[kRunningIdx]++] = null\n client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))\n\n try {\n request.onUpgrade(statusCode, headers, socket)\n } catch (err) {\n util.destroy(socket, err)\n }\n\n resume(client)\n }\n\n onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {\n const { client, socket, headers, statusText } = this\n\n /* istanbul ignore next: difficult to make a test case for */\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n\n /* istanbul ignore next: difficult to make a test case for */\n if (!request) {\n return -1\n }\n\n assert(!this.upgrade)\n assert(this.statusCode < 200)\n\n if (statusCode === 100) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n /* this can only happen if server is misbehaving */\n if (upgrade && !request.upgrade) {\n util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))\n return -1\n }\n\n assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS)\n\n this.statusCode = statusCode\n this.shouldKeepAlive = (\n shouldKeepAlive ||\n // Override llhttp value which does not allow keepAlive for HEAD.\n (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')\n )\n\n if (this.statusCode >= 200) {\n const bodyTimeout = request.bodyTimeout != null\n ? request.bodyTimeout\n : client[kBodyTimeout]\n this.setTimeout(bodyTimeout, TIMEOUT_BODY)\n } else if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n if (request.method === 'CONNECT') {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n if (upgrade) {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n if (this.shouldKeepAlive && client[kPipelining]) {\n const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null\n\n if (keepAliveTimeout != null) {\n const timeout = Math.min(\n keepAliveTimeout - client[kKeepAliveTimeoutThreshold],\n client[kKeepAliveMaxTimeout]\n )\n if (timeout <= 0) {\n socket[kReset] = true\n } else {\n client[kKeepAliveTimeoutValue] = timeout\n }\n } else {\n client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]\n }\n } else {\n // Stop more requests from being dispatched.\n socket[kReset] = true\n }\n\n const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false\n\n if (request.aborted) {\n return -1\n }\n\n if (request.method === 'HEAD') {\n return 1\n }\n\n if (statusCode < 200) {\n return 1\n }\n\n if (socket[kBlocking]) {\n socket[kBlocking] = false\n resume(client)\n }\n\n return pause ? constants.ERROR.PAUSED : 0\n }\n\n onBody (buf) {\n const { client, socket, statusCode, maxResponseSize } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert.strictEqual(this.timeoutType, TIMEOUT_BODY)\n if (this.timeout) {\n // istanbul ignore else: only for jest\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n assert(statusCode >= 200)\n\n if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {\n util.destroy(socket, new ResponseExceededMaxSizeError())\n return -1\n }\n\n this.bytesRead += buf.length\n\n if (request.onData(buf) === false) {\n return constants.ERROR.PAUSED\n }\n }\n\n onMessageComplete () {\n const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this\n\n if (socket.destroyed && (!statusCode || shouldKeepAlive)) {\n return -1\n }\n\n if (upgrade) {\n return\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(statusCode >= 100)\n\n this.statusCode = null\n this.statusText = ''\n this.bytesRead = 0\n this.contentLength = ''\n this.keepAlive = ''\n this.connection = ''\n\n assert(this.headers.length % 2 === 0)\n this.headers = []\n this.headersSize = 0\n\n if (statusCode < 200) {\n return\n }\n\n /* istanbul ignore next: should be handled by llhttp? */\n if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {\n util.destroy(socket, new ResponseContentLengthMismatchError())\n return -1\n }\n\n request.onComplete(headers)\n\n client[kQueue][client[kRunningIdx]++] = null\n\n if (socket[kWriting]) {\n assert.strictEqual(client[kRunning], 0)\n // Response completed before request.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (!shouldKeepAlive) {\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (socket[kReset] && client[kRunning] === 0) {\n // Destroy socket once all requests have completed.\n // The request at the tail of the pipeline is the one\n // that requested reset and no further requests should\n // have been queued since then.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (client[kPipelining] === 1) {\n // We must wait a full event loop cycle to reuse this socket to make sure\n // that non-spec compliant servers are not closing the connection even if they\n // said they won't.\n setImmediate(resume, client)\n } else {\n resume(client)\n }\n }\n}\n\nfunction onParserTimeout (parser) {\n const { socket, timeoutType, client } = parser\n\n /* istanbul ignore else */\n if (timeoutType === TIMEOUT_HEADERS) {\n if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {\n assert(!parser.paused, 'cannot be paused while waiting for headers')\n util.destroy(socket, new HeadersTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_BODY) {\n if (!parser.paused) {\n util.destroy(socket, new BodyTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_IDLE) {\n assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])\n util.destroy(socket, new InformationalError('socket idle timeout'))\n }\n}\n\nfunction onSocketReadable () {\n const { [kParser]: parser } = this\n if (parser) {\n parser.readMore()\n }\n}\n\nfunction onSocketError (err) {\n const { [kClient]: client, [kParser]: parser } = this\n\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n if (client[kHTTPConnVersion] !== 'h2') {\n // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded\n // to the user.\n if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so for as a valid response.\n parser.onMessageComplete()\n return\n }\n }\n\n this[kError] = err\n\n onError(this[kClient], err)\n}\n\nfunction onError (client, err) {\n if (\n client[kRunning] === 0 &&\n err.code !== 'UND_ERR_INFO' &&\n err.code !== 'UND_ERR_SOCKET'\n ) {\n // Error is not caused by running request and not a recoverable\n // socket error.\n\n assert(client[kPendingIdx] === client[kRunningIdx])\n\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(client, request, err)\n }\n assert(client[kSize] === 0)\n }\n}\n\nfunction onSocketEnd () {\n const { [kParser]: parser, [kClient]: client } = this\n\n if (client[kHTTPConnVersion] !== 'h2') {\n if (parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n return\n }\n }\n\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n}\n\nfunction onSocketClose () {\n const { [kClient]: client, [kParser]: parser } = this\n\n if (client[kHTTPConnVersion] === 'h1' && parser) {\n if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n }\n\n this[kParser].destroy()\n this[kParser] = null\n }\n\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n client[kSocket] = null\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n errorRequest(client, request, err)\n }\n } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n resume(client)\n}\n\nasync function connect (client) {\n assert(!client[kConnecting])\n assert(!client[kSocket])\n\n let { host, hostname, protocol, port } = client[kUrl]\n\n // Resolve ipv6\n if (hostname[0] === '[') {\n const idx = hostname.indexOf(']')\n\n assert(idx !== -1)\n const ip = hostname.substring(1, idx)\n\n assert(net.isIP(ip))\n hostname = ip\n }\n\n client[kConnecting] = true\n\n if (channels.beforeConnect.hasSubscribers) {\n channels.beforeConnect.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector]\n })\n }\n\n try {\n const socket = await new Promise((resolve, reject) => {\n client[kConnector]({\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n }, (err, socket) => {\n if (err) {\n reject(err)\n } else {\n resolve(socket)\n }\n })\n })\n\n if (client.destroyed) {\n util.destroy(socket.on('error', () => {}), new ClientDestroyedError())\n return\n }\n\n client[kConnecting] = false\n\n assert(socket)\n\n const isH2 = socket.alpnProtocol === 'h2'\n if (isH2) {\n if (!h2ExperimentalWarned) {\n h2ExperimentalWarned = true\n process.emitWarning('H2 support is experimental, expect them to change at any time.', {\n code: 'UNDICI-H2'\n })\n }\n\n const session = http2.connect(client[kUrl], {\n createConnection: () => socket,\n peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams\n })\n\n client[kHTTPConnVersion] = 'h2'\n session[kClient] = client\n session[kSocket] = socket\n session.on('error', onHttp2SessionError)\n session.on('frameError', onHttp2FrameError)\n session.on('end', onHttp2SessionEnd)\n session.on('goaway', onHTTP2GoAway)\n session.on('close', onSocketClose)\n session.unref()\n\n client[kHTTP2Session] = session\n socket[kHTTP2Session] = session\n } else {\n if (!llhttpInstance) {\n llhttpInstance = await llhttpPromise\n llhttpPromise = null\n }\n\n socket[kNoRef] = false\n socket[kWriting] = false\n socket[kReset] = false\n socket[kBlocking] = false\n socket[kParser] = new Parser(client, socket, llhttpInstance)\n }\n\n socket[kCounter] = 0\n socket[kMaxRequests] = client[kMaxRequests]\n socket[kClient] = client\n socket[kError] = null\n\n socket\n .on('error', onSocketError)\n .on('readable', onSocketReadable)\n .on('end', onSocketEnd)\n .on('close', onSocketClose)\n\n client[kSocket] = socket\n\n if (channels.connected.hasSubscribers) {\n channels.connected.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n socket\n })\n }\n client.emit('connect', client[kUrl], [client])\n } catch (err) {\n if (client.destroyed) {\n return\n }\n\n client[kConnecting] = false\n\n if (channels.connectError.hasSubscribers) {\n channels.connectError.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n error: err\n })\n }\n\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n assert(client[kRunning] === 0)\n while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {\n const request = client[kQueue][client[kPendingIdx]++]\n errorRequest(client, request, err)\n }\n } else {\n onError(client, err)\n }\n\n client.emit('connectionError', client[kUrl], [client], err)\n }\n\n resume(client)\n}\n\nfunction emitDrain (client) {\n client[kNeedDrain] = 0\n client.emit('drain', client[kUrl], [client])\n}\n\nfunction resume (client, sync) {\n if (client[kResuming] === 2) {\n return\n }\n\n client[kResuming] = 2\n\n _resume(client, sync)\n client[kResuming] = 0\n\n if (client[kRunningIdx] > 256) {\n client[kQueue].splice(0, client[kRunningIdx])\n client[kPendingIdx] -= client[kRunningIdx]\n client[kRunningIdx] = 0\n }\n}\n\nfunction _resume (client, sync) {\n while (true) {\n if (client.destroyed) {\n assert(client[kPending] === 0)\n return\n }\n\n if (client[kClosedResolve] && !client[kSize]) {\n client[kClosedResolve]()\n client[kClosedResolve] = null\n return\n }\n\n const socket = client[kSocket]\n\n if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') {\n if (client[kSize] === 0) {\n if (!socket[kNoRef] && socket.unref) {\n socket.unref()\n socket[kNoRef] = true\n }\n } else if (socket[kNoRef] && socket.ref) {\n socket.ref()\n socket[kNoRef] = false\n }\n\n if (client[kSize] === 0) {\n if (socket[kParser].timeoutType !== TIMEOUT_IDLE) {\n socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE)\n }\n } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {\n if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {\n const request = client[kQueue][client[kRunningIdx]]\n const headersTimeout = request.headersTimeout != null\n ? request.headersTimeout\n : client[kHeadersTimeout]\n socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)\n }\n }\n }\n\n if (client[kBusy]) {\n client[kNeedDrain] = 2\n } else if (client[kNeedDrain] === 2) {\n if (sync) {\n client[kNeedDrain] = 1\n process.nextTick(emitDrain, client)\n } else {\n emitDrain(client)\n }\n continue\n }\n\n if (client[kPending] === 0) {\n return\n }\n\n if (client[kRunning] >= (client[kPipelining] || 1)) {\n return\n }\n\n const request = client[kQueue][client[kPendingIdx]]\n\n if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) {\n if (client[kRunning] > 0) {\n return\n }\n\n client[kServerName] = request.servername\n\n if (socket && socket.servername !== request.servername) {\n util.destroy(socket, new InformationalError('servername changed'))\n return\n }\n }\n\n if (client[kConnecting]) {\n return\n }\n\n if (!socket && !client[kHTTP2Session]) {\n connect(client)\n return\n }\n\n if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) {\n return\n }\n\n if (client[kRunning] > 0 && !request.idempotent) {\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return\n }\n\n if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {\n // Don't dispatch an upgrade until all preceding requests have completed.\n // A misbehaving server might upgrade the connection before all pipelined\n // request has completed.\n return\n }\n\n if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body))) {\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return\n }\n\n if (!request.aborted && write(client, request)) {\n client[kPendingIdx]++\n } else {\n client[kQueue].splice(client[kPendingIdx], 1)\n }\n }\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\nfunction write (client, request) {\n if (client[kHTTPConnVersion] === 'h2') {\n writeH2(client, client[kHTTP2Session], request)\n return\n }\n\n const { body, method, path, host, upgrade, headers, blocking, reset } = request\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n const bodyLength = util.bodyLength(body)\n\n let contentLength = bodyLength\n\n if (contentLength === null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 && !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n const socket = client[kSocket]\n\n try {\n request.onConnect((err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n errorRequest(client, request, err || new RequestAbortedError())\n\n util.destroy(socket, new InformationalError('aborted'))\n })\n } catch (err) {\n errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (method === 'HEAD') {\n // https://github.com/mcollina/undici/issues/258\n // Close after a HEAD request to interop with misbehaving servers\n // that may send a body in the response.\n\n socket[kReset] = true\n }\n\n if (upgrade || method === 'CONNECT') {\n // On CONNECT or upgrade, block pipeline from dispatching further\n // requests on this connection.\n\n socket[kReset] = true\n }\n\n if (reset != null) {\n socket[kReset] = reset\n }\n\n if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {\n socket[kReset] = true\n }\n\n if (blocking) {\n socket[kBlocking] = true\n }\n\n let header = `${method} ${path} HTTP/1.1\\r\\n`\n\n if (typeof host === 'string') {\n header += `host: ${host}\\r\\n`\n } else {\n header += client[kHostHeader]\n }\n\n if (upgrade) {\n header += `connection: upgrade\\r\\nupgrade: ${upgrade}\\r\\n`\n } else if (client[kPipelining] && !socket[kReset]) {\n header += 'connection: keep-alive\\r\\n'\n } else {\n header += 'connection: close\\r\\n'\n }\n\n if (headers) {\n header += headers\n }\n\n if (channels.sendHeaders.hasSubscribers) {\n channels.sendHeaders.publish({ request, headers: header, socket })\n }\n\n /* istanbul ignore else: assertion */\n if (!body || bodyLength === 0) {\n if (contentLength === 0) {\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n assert(contentLength === null, 'no body must not have content length')\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n request.onRequestSent()\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(body)\n socket.uncork()\n request.onBodySent(body)\n request.onRequestSent()\n if (!expectsPayload) {\n socket[kReset] = true\n }\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload })\n } else {\n writeBlob({ body, client, request, socket, contentLength, header, expectsPayload })\n }\n } else if (util.isStream(body)) {\n writeStream({ body, client, request, socket, contentLength, header, expectsPayload })\n } else if (util.isIterable(body)) {\n writeIterable({ body, client, request, socket, contentLength, header, expectsPayload })\n } else {\n assert(false)\n }\n\n return true\n}\n\nfunction writeH2 (client, session, request) {\n const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request\n\n let headers\n if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim())\n else headers = reqHeaders\n\n if (upgrade) {\n errorRequest(client, request, new Error('Upgrade not supported for H2'))\n return false\n }\n\n try {\n // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event?\n request.onConnect((err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n errorRequest(client, request, err || new RequestAbortedError())\n })\n } catch (err) {\n errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n /** @type {import('node:http2').ClientHttp2Stream} */\n let stream\n const h2State = client[kHTTP2SessionState]\n\n headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]\n headers[HTTP2_HEADER_METHOD] = method\n\n if (method === 'CONNECT') {\n session.ref()\n // we are already connected, streams are pending, first request\n // will create a new stream. We trigger a request to create the stream and wait until\n // `ready` event is triggered\n // We disabled endStream to allow the user to write to the stream\n stream = session.request(headers, { endStream: false, signal })\n\n if (stream.id && !stream.pending) {\n request.onUpgrade(null, null, stream)\n ++h2State.openStreams\n } else {\n stream.once('ready', () => {\n request.onUpgrade(null, null, stream)\n ++h2State.openStreams\n })\n }\n\n stream.once('close', () => {\n h2State.openStreams -= 1\n // TODO(HTTP/2): unref only if current streams count is 0\n if (h2State.openStreams === 0) session.unref()\n })\n\n return true\n }\n\n // https://tools.ietf.org/html/rfc7540#section-8.3\n // :path and :scheme headers must be omited when sending CONNECT\n\n headers[HTTP2_HEADER_PATH] = path\n headers[HTTP2_HEADER_SCHEME] = 'https'\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n let contentLength = util.bodyLength(body)\n\n if (contentLength == null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 || !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n if (contentLength != null) {\n assert(body, 'no body must not have content length')\n headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`\n }\n\n session.ref()\n\n const shouldEndStream = method === 'GET' || method === 'HEAD'\n if (expectContinue) {\n headers[HTTP2_HEADER_EXPECT] = '100-continue'\n stream = session.request(headers, { endStream: shouldEndStream, signal })\n\n stream.once('continue', writeBodyH2)\n } else {\n stream = session.request(headers, {\n endStream: shouldEndStream,\n signal\n })\n writeBodyH2()\n }\n\n // Increment counter as we have new several streams open\n ++h2State.openStreams\n\n stream.once('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n\n if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) {\n stream.pause()\n }\n })\n\n stream.once('end', () => {\n request.onComplete([])\n })\n\n stream.on('data', (chunk) => {\n if (request.onData(chunk) === false) {\n stream.pause()\n }\n })\n\n stream.once('close', () => {\n h2State.openStreams -= 1\n // TODO(HTTP/2): unref only if current streams count is 0\n if (h2State.openStreams === 0) {\n session.unref()\n }\n })\n\n stream.once('error', function (err) {\n if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) {\n h2State.streams -= 1\n util.destroy(stream, err)\n }\n })\n\n stream.once('frameError', (type, code) => {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n errorRequest(client, request, err)\n\n if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) {\n h2State.streams -= 1\n util.destroy(stream, err)\n }\n })\n\n // stream.on('aborted', () => {\n // // TODO(HTTP/2): Support aborted\n // })\n\n // stream.on('timeout', () => {\n // // TODO(HTTP/2): Support timeout\n // })\n\n // stream.on('push', headers => {\n // // TODO(HTTP/2): Suppor push\n // })\n\n // stream.on('trailers', headers => {\n // // TODO(HTTP/2): Support trailers\n // })\n\n return true\n\n function writeBodyH2 () {\n /* istanbul ignore else: assertion */\n if (!body) {\n request.onRequestSent()\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n stream.cork()\n stream.write(body)\n stream.uncork()\n stream.end()\n request.onBodySent(body)\n request.onRequestSent()\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable({\n client,\n request,\n contentLength,\n h2stream: stream,\n expectsPayload,\n body: body.stream(),\n socket: client[kSocket],\n header: ''\n })\n } else {\n writeBlob({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n h2stream: stream,\n header: '',\n socket: client[kSocket]\n })\n }\n } else if (util.isStream(body)) {\n writeStream({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n socket: client[kSocket],\n h2stream: stream,\n header: ''\n })\n } else if (util.isIterable(body)) {\n writeIterable({\n body,\n client,\n request,\n contentLength,\n expectsPayload,\n header: '',\n h2stream: stream,\n socket: client[kSocket]\n })\n } else {\n assert(false)\n }\n }\n}\n\nfunction writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n if (client[kHTTPConnVersion] === 'h2') {\n // For HTTP/2, is enough to pipe the stream\n const pipe = pipeline(\n body,\n h2stream,\n (err) => {\n if (err) {\n util.destroy(body, err)\n util.destroy(h2stream, err)\n } else {\n request.onRequestSent()\n }\n }\n )\n\n pipe.on('data', onPipeData)\n pipe.once('end', () => {\n pipe.removeListener('data', onPipeData)\n util.destroy(pipe)\n })\n\n function onPipeData (chunk) {\n request.onBodySent(chunk)\n }\n\n return\n }\n\n let finished = false\n\n const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })\n\n const onData = function (chunk) {\n if (finished) {\n return\n }\n\n try {\n if (!writer.write(chunk) && this.pause) {\n this.pause()\n }\n } catch (err) {\n util.destroy(this, err)\n }\n }\n const onDrain = function () {\n if (finished) {\n return\n }\n\n if (body.resume) {\n body.resume()\n }\n }\n const onAbort = function () {\n if (finished) {\n return\n }\n const err = new RequestAbortedError()\n queueMicrotask(() => onFinished(err))\n }\n const onFinished = function (err) {\n if (finished) {\n return\n }\n\n finished = true\n\n assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))\n\n socket\n .off('drain', onDrain)\n .off('error', onFinished)\n\n body\n .removeListener('data', onData)\n .removeListener('end', onFinished)\n .removeListener('error', onFinished)\n .removeListener('close', onAbort)\n\n if (!err) {\n try {\n writer.end()\n } catch (er) {\n err = er\n }\n }\n\n writer.destroy(err)\n\n if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {\n util.destroy(body, err)\n } else {\n util.destroy(body)\n }\n }\n\n body\n .on('data', onData)\n .on('end', onFinished)\n .on('error', onFinished)\n .on('close', onAbort)\n\n if (body.resume) {\n body.resume()\n }\n\n socket\n .on('drain', onDrain)\n .on('error', onFinished)\n}\n\nasync function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n const isH2 = client[kHTTPConnVersion] === 'h2'\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n if (isH2) {\n h2stream.cork()\n h2stream.write(buffer)\n h2stream.uncork()\n } else {\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(buffer)\n socket.uncork()\n }\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n resume(client)\n } catch (err) {\n util.destroy(isH2 ? h2stream : socket, err)\n }\n}\n\nasync function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n if (client[kHTTPConnVersion] === 'h2') {\n h2stream\n .on('close', onDrain)\n .on('drain', onDrain)\n\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n const res = h2stream.write(chunk)\n request.onBodySent(chunk)\n if (!res) {\n await waitForDrain()\n }\n }\n } catch (err) {\n h2stream.destroy(err)\n } finally {\n request.onRequestSent()\n h2stream.end()\n h2stream\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n\n return\n }\n\n socket\n .on('close', onDrain)\n .on('drain', onDrain)\n\n const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header })\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (!writer.write(chunk)) {\n await waitForDrain()\n }\n }\n\n writer.end()\n } catch (err) {\n writer.destroy(err)\n } finally {\n socket\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nclass AsyncWriter {\n constructor ({ socket, request, contentLength, client, expectsPayload, header }) {\n this.socket = socket\n this.request = request\n this.contentLength = contentLength\n this.client = client\n this.bytesWritten = 0\n this.expectsPayload = expectsPayload\n this.header = header\n\n socket[kWriting] = true\n }\n\n write (chunk) {\n const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return false\n }\n\n const len = Buffer.byteLength(chunk)\n if (!len) {\n return true\n }\n\n // We should defer writing chunks.\n if (contentLength !== null && bytesWritten + len > contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n socket.cork()\n\n if (bytesWritten === 0) {\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n if (contentLength === null) {\n socket.write(`${header}transfer-encoding: chunked\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n }\n }\n\n if (contentLength === null) {\n socket.write(`\\r\\n${len.toString(16)}\\r\\n`, 'latin1')\n }\n\n this.bytesWritten += len\n\n const ret = socket.write(chunk)\n\n socket.uncork()\n\n request.onBodySent(chunk)\n\n if (!ret) {\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n }\n\n return ret\n }\n\n end () {\n const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this\n request.onRequestSent()\n\n socket[kWriting] = false\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return\n }\n\n if (bytesWritten === 0) {\n if (expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD send a Content-Length in a request message when\n // no Transfer-Encoding is sent and the request method defines a meaning\n // for an enclosed payload body.\n\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (contentLength === null) {\n socket.write('\\r\\n0\\r\\n\\r\\n', 'latin1')\n }\n\n if (contentLength !== null && bytesWritten !== contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n } else {\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n }\n\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n // istanbul ignore else: only for jest\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n\n resume(client)\n }\n\n destroy (err) {\n const { socket, client } = this\n\n socket[kWriting] = false\n\n if (err) {\n assert(client[kRunning] <= 1, 'pipeline should only contain this request')\n util.destroy(socket, err)\n }\n }\n}\n\nfunction errorRequest (client, request, err) {\n try {\n request.onError(err)\n assert(request.aborted)\n } catch (err) {\n client.emit('error', err)\n }\n}\n\nmodule.exports = Client\n","'use strict'\n\n/* istanbul ignore file: only for Node 12 */\n\nconst { kConnected, kSize } = require('../core/symbols')\n\nclass CompatWeakRef {\n constructor (value) {\n this.value = value\n }\n\n deref () {\n return this.value[kConnected] === 0 && this.value[kSize] === 0\n ? undefined\n : this.value\n }\n}\n\nclass CompatFinalizer {\n constructor (finalizer) {\n this.finalizer = finalizer\n }\n\n register (dispatcher, key) {\n if (dispatcher.on) {\n dispatcher.on('disconnect', () => {\n if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {\n this.finalizer(key)\n }\n })\n }\n }\n}\n\nmodule.exports = function () {\n // FIXME: remove workaround when the Node bug is fixed\n // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\n if (process.env.NODE_V8_COVERAGE) {\n return {\n WeakRef: CompatWeakRef,\n FinalizationRegistry: CompatFinalizer\n }\n }\n return {\n WeakRef: global.WeakRef || CompatWeakRef,\n FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer\n }\n}\n","'use strict'\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size\nconst maxAttributeValueSize = 1024\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size\nconst maxNameValuePairSize = 4096\n\nmodule.exports = {\n maxAttributeValueSize,\n maxNameValuePairSize\n}\n","'use strict'\n\nconst { parseSetCookie } = require('./parse')\nconst { stringify, getHeadersList } = require('./util')\nconst { webidl } = require('../fetch/webidl')\nconst { Headers } = require('../fetch/headers')\n\n/**\n * @typedef {Object} Cookie\n * @property {string} name\n * @property {string} value\n * @property {Date|number|undefined} expires\n * @property {number|undefined} maxAge\n * @property {string|undefined} domain\n * @property {string|undefined} path\n * @property {boolean|undefined} secure\n * @property {boolean|undefined} httpOnly\n * @property {'Strict'|'Lax'|'None'} sameSite\n * @property {string[]} unparsed\n */\n\n/**\n * @param {Headers} headers\n * @returns {Record}\n */\nfunction getCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookie = headers.get('cookie')\n const out = {}\n\n if (!cookie) {\n return out\n }\n\n for (const piece of cookie.split(';')) {\n const [name, ...value] = piece.split('=')\n\n out[name.trim()] = value.join('=')\n }\n\n return out\n}\n\n/**\n * @param {Headers} headers\n * @param {string} name\n * @param {{ path?: string, domain?: string }|undefined} attributes\n * @returns {void}\n */\nfunction deleteCookie (headers, name, attributes) {\n webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n name = webidl.converters.DOMString(name)\n attributes = webidl.converters.DeleteCookieAttributes(attributes)\n\n // Matches behavior of\n // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278\n setCookie(headers, {\n name,\n value: '',\n expires: new Date(0),\n ...attributes\n })\n}\n\n/**\n * @param {Headers} headers\n * @returns {Cookie[]}\n */\nfunction getSetCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n const cookies = getHeadersList(headers).cookies\n\n if (!cookies) {\n return []\n }\n\n // In older versions of undici, cookies is a list of name:value.\n return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))\n}\n\n/**\n * @param {Headers} headers\n * @param {Cookie} cookie\n * @returns {void}\n */\nfunction setCookie (headers, cookie) {\n webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' })\n\n webidl.brandCheck(headers, Headers, { strict: false })\n\n cookie = webidl.converters.Cookie(cookie)\n\n const str = stringify(cookie)\n\n if (str) {\n headers.append('Set-Cookie', stringify(cookie))\n }\n}\n\nwebidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: null\n }\n])\n\nwebidl.converters.Cookie = webidl.dictionaryConverter([\n {\n converter: webidl.converters.DOMString,\n key: 'name'\n },\n {\n converter: webidl.converters.DOMString,\n key: 'value'\n },\n {\n converter: webidl.nullableConverter((value) => {\n if (typeof value === 'number') {\n return webidl.converters['unsigned long long'](value)\n }\n\n return new Date(value)\n }),\n key: 'expires',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters['long long']),\n key: 'maxAge',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'secure',\n defaultValue: null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'httpOnly',\n defaultValue: null\n },\n {\n converter: webidl.converters.USVString,\n key: 'sameSite',\n allowedValues: ['Strict', 'Lax', 'None']\n },\n {\n converter: webidl.sequenceConverter(webidl.converters.DOMString),\n key: 'unparsed',\n defaultValue: []\n }\n])\n\nmodule.exports = {\n getCookies,\n deleteCookie,\n getSetCookies,\n setCookie\n}\n","'use strict'\n\nconst { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')\nconst { isCTLExcludingHtab } = require('./util')\nconst { collectASequenceOfCodePointsFast } = require('../fetch/dataURL')\nconst assert = require('assert')\n\n/**\n * @description Parses the field-value attributes of a set-cookie header string.\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} header\n * @returns if the header is invalid, null will be returned\n */\nfunction parseSetCookie (header) {\n // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F\n // character (CTL characters excluding HTAB): Abort these steps and\n // ignore the set-cookie-string entirely.\n if (isCTLExcludingHtab(header)) {\n return null\n }\n\n let nameValuePair = ''\n let unparsedAttributes = ''\n let name = ''\n let value = ''\n\n // 2. If the set-cookie-string contains a %x3B (\";\") character:\n if (header.includes(';')) {\n // 1. The name-value-pair string consists of the characters up to,\n // but not including, the first %x3B (\";\"), and the unparsed-\n // attributes consist of the remainder of the set-cookie-string\n // (including the %x3B (\";\") in question).\n const position = { position: 0 }\n\n nameValuePair = collectASequenceOfCodePointsFast(';', header, position)\n unparsedAttributes = header.slice(position.position)\n } else {\n // Otherwise:\n\n // 1. The name-value-pair string consists of all the characters\n // contained in the set-cookie-string, and the unparsed-\n // attributes is the empty string.\n nameValuePair = header\n }\n\n // 3. If the name-value-pair string lacks a %x3D (\"=\") character, then\n // the name string is empty, and the value string is the value of\n // name-value-pair.\n if (!nameValuePair.includes('=')) {\n value = nameValuePair\n } else {\n // Otherwise, the name string consists of the characters up to, but\n // not including, the first %x3D (\"=\") character, and the (possibly\n // empty) value string consists of the characters after the first\n // %x3D (\"=\") character.\n const position = { position: 0 }\n name = collectASequenceOfCodePointsFast(\n '=',\n nameValuePair,\n position\n )\n value = nameValuePair.slice(position.position + 1)\n }\n\n // 4. Remove any leading or trailing WSP characters from the name\n // string and the value string.\n name = name.trim()\n value = value.trim()\n\n // 5. If the sum of the lengths of the name string and the value string\n // is more than 4096 octets, abort these steps and ignore the set-\n // cookie-string entirely.\n if (name.length + value.length > maxNameValuePairSize) {\n return null\n }\n\n // 6. The cookie-name is the name string, and the cookie-value is the\n // value string.\n return {\n name, value, ...parseUnparsedAttributes(unparsedAttributes)\n }\n}\n\n/**\n * Parses the remaining attributes of a set-cookie header\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} unparsedAttributes\n * @param {[Object.]={}} cookieAttributeList\n */\nfunction parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) {\n // 1. If the unparsed-attributes string is empty, skip the rest of\n // these steps.\n if (unparsedAttributes.length === 0) {\n return cookieAttributeList\n }\n\n // 2. Discard the first character of the unparsed-attributes (which\n // will be a %x3B (\";\") character).\n assert(unparsedAttributes[0] === ';')\n unparsedAttributes = unparsedAttributes.slice(1)\n\n let cookieAv = ''\n\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n if (unparsedAttributes.includes(';')) {\n // 1. Consume the characters of the unparsed-attributes up to, but\n // not including, the first %x3B (\";\") character.\n cookieAv = collectASequenceOfCodePointsFast(\n ';',\n unparsedAttributes,\n { position: 0 }\n )\n unparsedAttributes = unparsedAttributes.slice(cookieAv.length)\n } else {\n // Otherwise:\n\n // 1. Consume the remainder of the unparsed-attributes.\n cookieAv = unparsedAttributes\n unparsedAttributes = ''\n }\n\n // Let the cookie-av string be the characters consumed in this step.\n\n let attributeName = ''\n let attributeValue = ''\n\n // 4. If the cookie-av string contains a %x3D (\"=\") character:\n if (cookieAv.includes('=')) {\n // 1. The (possibly empty) attribute-name string consists of the\n // characters up to, but not including, the first %x3D (\"=\")\n // character, and the (possibly empty) attribute-value string\n // consists of the characters after the first %x3D (\"=\")\n // character.\n const position = { position: 0 }\n\n attributeName = collectASequenceOfCodePointsFast(\n '=',\n cookieAv,\n position\n )\n attributeValue = cookieAv.slice(position.position + 1)\n } else {\n // Otherwise:\n\n // 1. The attribute-name string consists of the entire cookie-av\n // string, and the attribute-value string is empty.\n attributeName = cookieAv\n }\n\n // 5. Remove any leading or trailing WSP characters from the attribute-\n // name string and the attribute-value string.\n attributeName = attributeName.trim()\n attributeValue = attributeValue.trim()\n\n // 6. If the attribute-value is longer than 1024 octets, ignore the\n // cookie-av string and return to Step 1 of this algorithm.\n if (attributeValue.length > maxAttributeValueSize) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 7. Process the attribute-name and attribute-value according to the\n // requirements in the following subsections. (Notice that\n // attributes with unrecognized attribute-names are ignored.)\n const attributeNameLowercase = attributeName.toLowerCase()\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1\n // If the attribute-name case-insensitively matches the string\n // \"Expires\", the user agent MUST process the cookie-av as follows.\n if (attributeNameLowercase === 'expires') {\n // 1. Let the expiry-time be the result of parsing the attribute-value\n // as cookie-date (see Section 5.1.1).\n const expiryTime = new Date(attributeValue)\n\n // 2. If the attribute-value failed to parse as a cookie date, ignore\n // the cookie-av.\n\n cookieAttributeList.expires = expiryTime\n } else if (attributeNameLowercase === 'max-age') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2\n // If the attribute-name case-insensitively matches the string \"Max-\n // Age\", the user agent MUST process the cookie-av as follows.\n\n // 1. If the first character of the attribute-value is not a DIGIT or a\n // \"-\" character, ignore the cookie-av.\n const charCode = attributeValue.charCodeAt(0)\n\n if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 2. If the remainder of attribute-value contains a non-DIGIT\n // character, ignore the cookie-av.\n if (!/^\\d+$/.test(attributeValue)) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 3. Let delta-seconds be the attribute-value converted to an integer.\n const deltaSeconds = Number(attributeValue)\n\n // 4. Let cookie-age-limit be the maximum age of the cookie (which\n // SHOULD be 400 days or less, see Section 4.1.2.2).\n\n // 5. Set delta-seconds to the smaller of its present value and cookie-\n // age-limit.\n // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs)\n\n // 6. If delta-seconds is less than or equal to zero (0), let expiry-\n // time be the earliest representable date and time. Otherwise, let\n // the expiry-time be the current date and time plus delta-seconds\n // seconds.\n // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds\n\n // 7. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Max-Age and an attribute-value of expiry-time.\n cookieAttributeList.maxAge = deltaSeconds\n } else if (attributeNameLowercase === 'domain') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3\n // If the attribute-name case-insensitively matches the string \"Domain\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. Let cookie-domain be the attribute-value.\n let cookieDomain = attributeValue\n\n // 2. If cookie-domain starts with %x2E (\".\"), let cookie-domain be\n // cookie-domain without its leading %x2E (\".\").\n if (cookieDomain[0] === '.') {\n cookieDomain = cookieDomain.slice(1)\n }\n\n // 3. Convert the cookie-domain to lower case.\n cookieDomain = cookieDomain.toLowerCase()\n\n // 4. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Domain and an attribute-value of cookie-domain.\n cookieAttributeList.domain = cookieDomain\n } else if (attributeNameLowercase === 'path') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4\n // If the attribute-name case-insensitively matches the string \"Path\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. If the attribute-value is empty or if the first character of the\n // attribute-value is not %x2F (\"/\"):\n let cookiePath = ''\n if (attributeValue.length === 0 || attributeValue[0] !== '/') {\n // 1. Let cookie-path be the default-path.\n cookiePath = '/'\n } else {\n // Otherwise:\n\n // 1. Let cookie-path be the attribute-value.\n cookiePath = attributeValue\n }\n\n // 2. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Path and an attribute-value of cookie-path.\n cookieAttributeList.path = cookiePath\n } else if (attributeNameLowercase === 'secure') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5\n // If the attribute-name case-insensitively matches the string \"Secure\",\n // the user agent MUST append an attribute to the cookie-attribute-list\n // with an attribute-name of Secure and an empty attribute-value.\n\n cookieAttributeList.secure = true\n } else if (attributeNameLowercase === 'httponly') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6\n // If the attribute-name case-insensitively matches the string\n // \"HttpOnly\", the user agent MUST append an attribute to the cookie-\n // attribute-list with an attribute-name of HttpOnly and an empty\n // attribute-value.\n\n cookieAttributeList.httpOnly = true\n } else if (attributeNameLowercase === 'samesite') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7\n // If the attribute-name case-insensitively matches the string\n // \"SameSite\", the user agent MUST process the cookie-av as follows:\n\n // 1. Let enforcement be \"Default\".\n let enforcement = 'Default'\n\n const attributeValueLowercase = attributeValue.toLowerCase()\n // 2. If cookie-av's attribute-value is a case-insensitive match for\n // \"None\", set enforcement to \"None\".\n if (attributeValueLowercase.includes('none')) {\n enforcement = 'None'\n }\n\n // 3. If cookie-av's attribute-value is a case-insensitive match for\n // \"Strict\", set enforcement to \"Strict\".\n if (attributeValueLowercase.includes('strict')) {\n enforcement = 'Strict'\n }\n\n // 4. If cookie-av's attribute-value is a case-insensitive match for\n // \"Lax\", set enforcement to \"Lax\".\n if (attributeValueLowercase.includes('lax')) {\n enforcement = 'Lax'\n }\n\n // 5. Append an attribute to the cookie-attribute-list with an\n // attribute-name of \"SameSite\" and an attribute-value of\n // enforcement.\n cookieAttributeList.sameSite = enforcement\n } else {\n cookieAttributeList.unparsed ??= []\n\n cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`)\n }\n\n // 8. Return to Step 1 of this algorithm.\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n}\n\nmodule.exports = {\n parseSetCookie,\n parseUnparsedAttributes\n}\n","'use strict'\n\nconst assert = require('assert')\nconst { kHeadersList } = require('../core/symbols')\n\nfunction isCTLExcludingHtab (value) {\n if (value.length === 0) {\n return false\n }\n\n for (const char of value) {\n const code = char.charCodeAt(0)\n\n if (\n (code >= 0x00 || code <= 0x08) ||\n (code >= 0x0A || code <= 0x1F) ||\n code === 0x7F\n ) {\n return false\n }\n }\n}\n\n/**\n CHAR = \n token = 1*\n separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n | \",\" | \";\" | \":\" | \"\\\" | <\">\n | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n | \"{\" | \"}\" | SP | HT\n * @param {string} name\n */\nfunction validateCookieName (name) {\n for (const char of name) {\n const code = char.charCodeAt(0)\n\n if (\n (code <= 0x20 || code > 0x7F) ||\n char === '(' ||\n char === ')' ||\n char === '>' ||\n char === '<' ||\n char === '@' ||\n char === ',' ||\n char === ';' ||\n char === ':' ||\n char === '\\\\' ||\n char === '\"' ||\n char === '/' ||\n char === '[' ||\n char === ']' ||\n char === '?' ||\n char === '=' ||\n char === '{' ||\n char === '}'\n ) {\n throw new Error('Invalid cookie name')\n }\n }\n}\n\n/**\n cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n ; US-ASCII characters excluding CTLs,\n ; whitespace DQUOTE, comma, semicolon,\n ; and backslash\n * @param {string} value\n */\nfunction validateCookieValue (value) {\n for (const char of value) {\n const code = char.charCodeAt(0)\n\n if (\n code < 0x21 || // exclude CTLs (0-31)\n code === 0x22 ||\n code === 0x2C ||\n code === 0x3B ||\n code === 0x5C ||\n code > 0x7E // non-ascii\n ) {\n throw new Error('Invalid header value')\n }\n }\n}\n\n/**\n * path-value = \n * @param {string} path\n */\nfunction validateCookiePath (path) {\n for (const char of path) {\n const code = char.charCodeAt(0)\n\n if (code < 0x21 || char === ';') {\n throw new Error('Invalid cookie path')\n }\n }\n}\n\n/**\n * I have no idea why these values aren't allowed to be honest,\n * but Deno tests these. - Khafra\n * @param {string} domain\n */\nfunction validateCookieDomain (domain) {\n if (\n domain.startsWith('-') ||\n domain.endsWith('.') ||\n domain.endsWith('-')\n ) {\n throw new Error('Invalid cookie domain')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1\n * @param {number|Date} date\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322]\n\n day-name = %x4D.6F.6E ; \"Mon\", case-sensitive\n / %x54.75.65 ; \"Tue\", case-sensitive\n / %x57.65.64 ; \"Wed\", case-sensitive\n / %x54.68.75 ; \"Thu\", case-sensitive\n / %x46.72.69 ; \"Fri\", case-sensitive\n / %x53.61.74 ; \"Sat\", case-sensitive\n / %x53.75.6E ; \"Sun\", case-sensitive\n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT\n month = %x4A.61.6E ; \"Jan\", case-sensitive\n / %x46.65.62 ; \"Feb\", case-sensitive\n / %x4D.61.72 ; \"Mar\", case-sensitive\n / %x41.70.72 ; \"Apr\", case-sensitive\n / %x4D.61.79 ; \"May\", case-sensitive\n / %x4A.75.6E ; \"Jun\", case-sensitive\n / %x4A.75.6C ; \"Jul\", case-sensitive\n / %x41.75.67 ; \"Aug\", case-sensitive\n / %x53.65.70 ; \"Sep\", case-sensitive\n / %x4F.63.74 ; \"Oct\", case-sensitive\n / %x4E.6F.76 ; \"Nov\", case-sensitive\n / %x44.65.63 ; \"Dec\", case-sensitive\n year = 4DIGIT\n\n GMT = %x47.4D.54 ; \"GMT\", case-sensitive\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n\n hour = 2DIGIT\n minute = 2DIGIT\n second = 2DIGIT\n */\nfunction toIMFDate (date) {\n if (typeof date === 'number') {\n date = new Date(date)\n }\n\n const days = [\n 'Sun', 'Mon', 'Tue', 'Wed',\n 'Thu', 'Fri', 'Sat'\n ]\n\n const months = [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n ]\n\n const dayName = days[date.getUTCDay()]\n const day = date.getUTCDate().toString().padStart(2, '0')\n const month = months[date.getUTCMonth()]\n const year = date.getUTCFullYear()\n const hour = date.getUTCHours().toString().padStart(2, '0')\n const minute = date.getUTCMinutes().toString().padStart(2, '0')\n const second = date.getUTCSeconds().toString().padStart(2, '0')\n\n return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`\n}\n\n/**\n max-age-av = \"Max-Age=\" non-zero-digit *DIGIT\n ; In practice, both expires-av and max-age-av\n ; are limited to dates representable by the\n ; user agent.\n * @param {number} maxAge\n */\nfunction validateCookieMaxAge (maxAge) {\n if (maxAge < 0) {\n throw new Error('Invalid cookie max-age')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1\n * @param {import('./index').Cookie} cookie\n */\nfunction stringify (cookie) {\n if (cookie.name.length === 0) {\n return null\n }\n\n validateCookieName(cookie.name)\n validateCookieValue(cookie.value)\n\n const out = [`${cookie.name}=${cookie.value}`]\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2\n if (cookie.name.startsWith('__Secure-')) {\n cookie.secure = true\n }\n\n if (cookie.name.startsWith('__Host-')) {\n cookie.secure = true\n cookie.domain = null\n cookie.path = '/'\n }\n\n if (cookie.secure) {\n out.push('Secure')\n }\n\n if (cookie.httpOnly) {\n out.push('HttpOnly')\n }\n\n if (typeof cookie.maxAge === 'number') {\n validateCookieMaxAge(cookie.maxAge)\n out.push(`Max-Age=${cookie.maxAge}`)\n }\n\n if (cookie.domain) {\n validateCookieDomain(cookie.domain)\n out.push(`Domain=${cookie.domain}`)\n }\n\n if (cookie.path) {\n validateCookiePath(cookie.path)\n out.push(`Path=${cookie.path}`)\n }\n\n if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') {\n out.push(`Expires=${toIMFDate(cookie.expires)}`)\n }\n\n if (cookie.sameSite) {\n out.push(`SameSite=${cookie.sameSite}`)\n }\n\n for (const part of cookie.unparsed) {\n if (!part.includes('=')) {\n throw new Error('Invalid unparsed')\n }\n\n const [key, ...value] = part.split('=')\n\n out.push(`${key.trim()}=${value.join('=')}`)\n }\n\n return out.join('; ')\n}\n\nlet kHeadersListNode\n\nfunction getHeadersList (headers) {\n if (headers[kHeadersList]) {\n return headers[kHeadersList]\n }\n\n if (!kHeadersListNode) {\n kHeadersListNode = Object.getOwnPropertySymbols(headers).find(\n (symbol) => symbol.description === 'headers list'\n )\n\n assert(kHeadersListNode, 'Headers cannot be parsed')\n }\n\n const headersList = headers[kHeadersListNode]\n assert(headersList)\n\n return headersList\n}\n\nmodule.exports = {\n isCTLExcludingHtab,\n stringify,\n getHeadersList\n}\n","'use strict'\n\nconst net = require('net')\nconst assert = require('assert')\nconst util = require('./util')\nconst { InvalidArgumentError, ConnectTimeoutError } = require('./errors')\n\nlet tls // include tls conditionally since it is not always available\n\n// TODO: session re-use does not wait for the first\n// connection to resolve the session and might therefore\n// resolve the same servername multiple times even when\n// re-use is enabled.\n\nlet SessionCache\n// FIXME: remove workaround when the Node bug is fixed\n// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308\nif (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) {\n SessionCache = class WeakSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n this._sessionRegistry = new global.FinalizationRegistry((key) => {\n if (this._sessionCache.size < this._maxCachedSessions) {\n return\n }\n\n const ref = this._sessionCache.get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this._sessionCache.delete(key)\n }\n })\n }\n\n get (sessionKey) {\n const ref = this._sessionCache.get(sessionKey)\n return ref ? ref.deref() : null\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n this._sessionCache.set(sessionKey, new WeakRef(session))\n this._sessionRegistry.register(session, sessionKey)\n }\n }\n} else {\n SessionCache = class SimpleSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n }\n\n get (sessionKey) {\n return this._sessionCache.get(sessionKey)\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n if (this._sessionCache.size >= this._maxCachedSessions) {\n // remove the oldest session\n const { value: oldestKey } = this._sessionCache.keys().next()\n this._sessionCache.delete(oldestKey)\n }\n\n this._sessionCache.set(sessionKey, session)\n }\n }\n}\n\nfunction buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) {\n if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {\n throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')\n }\n\n const options = { path: socketPath, ...opts }\n const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)\n timeout = timeout == null ? 10e3 : timeout\n allowH2 = allowH2 != null ? allowH2 : false\n return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {\n let socket\n if (protocol === 'https:') {\n if (!tls) {\n tls = require('tls')\n }\n servername = servername || options.servername || util.getServerName(host) || null\n\n const sessionKey = servername || hostname\n const session = sessionCache.get(sessionKey) || null\n\n assert(sessionKey)\n\n socket = tls.connect({\n highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...\n ...options,\n servername,\n session,\n localAddress,\n // TODO(HTTP/2): Add support for h2c\n ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'],\n socket: httpSocket, // upgrade socket connection\n port: port || 443,\n host: hostname\n })\n\n socket\n .on('session', function (session) {\n // TODO (fix): Can a session become invalid once established? Don't think so?\n sessionCache.set(sessionKey, session)\n })\n } else {\n assert(!httpSocket, 'httpSocket can only be sent on TLS update')\n socket = net.connect({\n highWaterMark: 64 * 1024, // Same as nodejs fs streams.\n ...options,\n localAddress,\n port: port || 80,\n host: hostname\n })\n }\n\n // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket\n if (options.keepAlive == null || options.keepAlive) {\n const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay\n socket.setKeepAlive(true, keepAliveInitialDelay)\n }\n\n const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout)\n\n socket\n .setNoDelay(true)\n .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {\n cancelTimeout()\n\n if (callback) {\n const cb = callback\n callback = null\n cb(null, this)\n }\n })\n .on('error', function (err) {\n cancelTimeout()\n\n if (callback) {\n const cb = callback\n callback = null\n cb(err)\n }\n })\n\n return socket\n }\n}\n\nfunction setupTimeout (onConnectTimeout, timeout) {\n if (!timeout) {\n return () => {}\n }\n\n let s1 = null\n let s2 = null\n const timeoutId = setTimeout(() => {\n // setImmediate is added to make sure that we priotorise socket error events over timeouts\n s1 = setImmediate(() => {\n if (process.platform === 'win32') {\n // Windows needs an extra setImmediate probably due to implementation differences in the socket logic\n s2 = setImmediate(() => onConnectTimeout())\n } else {\n onConnectTimeout()\n }\n })\n }, timeout)\n return () => {\n clearTimeout(timeoutId)\n clearImmediate(s1)\n clearImmediate(s2)\n }\n}\n\nfunction onConnectTimeout (socket) {\n util.destroy(socket, new ConnectTimeoutError())\n}\n\nmodule.exports = buildConnector\n","'use strict'\n\nclass UndiciError extends Error {\n constructor (message) {\n super(message)\n this.name = 'UndiciError'\n this.code = 'UND_ERR'\n }\n}\n\nclass ConnectTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ConnectTimeoutError)\n this.name = 'ConnectTimeoutError'\n this.message = message || 'Connect Timeout Error'\n this.code = 'UND_ERR_CONNECT_TIMEOUT'\n }\n}\n\nclass HeadersTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, HeadersTimeoutError)\n this.name = 'HeadersTimeoutError'\n this.message = message || 'Headers Timeout Error'\n this.code = 'UND_ERR_HEADERS_TIMEOUT'\n }\n}\n\nclass HeadersOverflowError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, HeadersOverflowError)\n this.name = 'HeadersOverflowError'\n this.message = message || 'Headers Overflow Error'\n this.code = 'UND_ERR_HEADERS_OVERFLOW'\n }\n}\n\nclass BodyTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, BodyTimeoutError)\n this.name = 'BodyTimeoutError'\n this.message = message || 'Body Timeout Error'\n this.code = 'UND_ERR_BODY_TIMEOUT'\n }\n}\n\nclass ResponseStatusCodeError extends UndiciError {\n constructor (message, statusCode, headers, body) {\n super(message)\n Error.captureStackTrace(this, ResponseStatusCodeError)\n this.name = 'ResponseStatusCodeError'\n this.message = message || 'Response Status Code Error'\n this.code = 'UND_ERR_RESPONSE_STATUS_CODE'\n this.body = body\n this.status = statusCode\n this.statusCode = statusCode\n this.headers = headers\n }\n}\n\nclass InvalidArgumentError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InvalidArgumentError)\n this.name = 'InvalidArgumentError'\n this.message = message || 'Invalid Argument Error'\n this.code = 'UND_ERR_INVALID_ARG'\n }\n}\n\nclass InvalidReturnValueError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InvalidReturnValueError)\n this.name = 'InvalidReturnValueError'\n this.message = message || 'Invalid Return Value Error'\n this.code = 'UND_ERR_INVALID_RETURN_VALUE'\n }\n}\n\nclass RequestAbortedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, RequestAbortedError)\n this.name = 'AbortError'\n this.message = message || 'Request aborted'\n this.code = 'UND_ERR_ABORTED'\n }\n}\n\nclass InformationalError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, InformationalError)\n this.name = 'InformationalError'\n this.message = message || 'Request information'\n this.code = 'UND_ERR_INFO'\n }\n}\n\nclass RequestContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, RequestContentLengthMismatchError)\n this.name = 'RequestContentLengthMismatchError'\n this.message = message || 'Request body length does not match content-length header'\n this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'\n }\n}\n\nclass ResponseContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ResponseContentLengthMismatchError)\n this.name = 'ResponseContentLengthMismatchError'\n this.message = message || 'Response body length does not match content-length header'\n this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'\n }\n}\n\nclass ClientDestroyedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ClientDestroyedError)\n this.name = 'ClientDestroyedError'\n this.message = message || 'The client is destroyed'\n this.code = 'UND_ERR_DESTROYED'\n }\n}\n\nclass ClientClosedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ClientClosedError)\n this.name = 'ClientClosedError'\n this.message = message || 'The client is closed'\n this.code = 'UND_ERR_CLOSED'\n }\n}\n\nclass SocketError extends UndiciError {\n constructor (message, socket) {\n super(message)\n Error.captureStackTrace(this, SocketError)\n this.name = 'SocketError'\n this.message = message || 'Socket error'\n this.code = 'UND_ERR_SOCKET'\n this.socket = socket\n }\n}\n\nclass NotSupportedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, NotSupportedError)\n this.name = 'NotSupportedError'\n this.message = message || 'Not supported error'\n this.code = 'UND_ERR_NOT_SUPPORTED'\n }\n}\n\nclass BalancedPoolMissingUpstreamError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, NotSupportedError)\n this.name = 'MissingUpstreamError'\n this.message = message || 'No upstream has been added to the BalancedPool'\n this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'\n }\n}\n\nclass HTTPParserError extends Error {\n constructor (message, code, data) {\n super(message)\n Error.captureStackTrace(this, HTTPParserError)\n this.name = 'HTTPParserError'\n this.code = code ? `HPE_${code}` : undefined\n this.data = data ? data.toString() : undefined\n }\n}\n\nclass ResponseExceededMaxSizeError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, ResponseExceededMaxSizeError)\n this.name = 'ResponseExceededMaxSizeError'\n this.message = message || 'Response content exceeded max size'\n this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'\n }\n}\n\nclass RequestRetryError extends UndiciError {\n constructor (message, code, { headers, data }) {\n super(message)\n Error.captureStackTrace(this, RequestRetryError)\n this.name = 'RequestRetryError'\n this.message = message || 'Request retry error'\n this.code = 'UND_ERR_REQ_RETRY'\n this.statusCode = code\n this.data = data\n this.headers = headers\n }\n}\n\nmodule.exports = {\n HTTPParserError,\n UndiciError,\n HeadersTimeoutError,\n HeadersOverflowError,\n BodyTimeoutError,\n RequestContentLengthMismatchError,\n ConnectTimeoutError,\n ResponseStatusCodeError,\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError,\n ClientDestroyedError,\n ClientClosedError,\n InformationalError,\n SocketError,\n NotSupportedError,\n ResponseContentLengthMismatchError,\n BalancedPoolMissingUpstreamError,\n ResponseExceededMaxSizeError,\n RequestRetryError\n}\n","'use strict'\n\nconst {\n InvalidArgumentError,\n NotSupportedError\n} = require('./errors')\nconst assert = require('assert')\nconst { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require('./symbols')\nconst util = require('./util')\n\n// tokenRegExp and headerCharRegex have been lifted from\n// https://github.com/nodejs/node/blob/main/lib/_http_common.js\n\n/**\n * Verifies that the given val is a valid HTTP token\n * per the rules defined in RFC 7230\n * See https://tools.ietf.org/html/rfc7230#section-3.2.6\n */\nconst tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/\n\n/**\n * Matches if val contains an invalid field-vchar\n * field-value = *( field-content / obs-fold )\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n */\nconst headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/\n\n// Verifies that a given path is valid does not contain control chars \\x00 to \\x20\nconst invalidPathRegex = /[^\\u0021-\\u00ff]/\n\nconst kHandler = Symbol('handler')\n\nconst channels = {}\n\nlet extractBody\n\ntry {\n const diagnosticsChannel = require('diagnostics_channel')\n channels.create = diagnosticsChannel.channel('undici:request:create')\n channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent')\n channels.headers = diagnosticsChannel.channel('undici:request:headers')\n channels.trailers = diagnosticsChannel.channel('undici:request:trailers')\n channels.error = diagnosticsChannel.channel('undici:request:error')\n} catch {\n channels.create = { hasSubscribers: false }\n channels.bodySent = { hasSubscribers: false }\n channels.headers = { hasSubscribers: false }\n channels.trailers = { hasSubscribers: false }\n channels.error = { hasSubscribers: false }\n}\n\nclass Request {\n constructor (origin, {\n path,\n method,\n body,\n headers,\n query,\n idempotent,\n blocking,\n upgrade,\n headersTimeout,\n bodyTimeout,\n reset,\n throwOnError,\n expectContinue\n }, handler) {\n if (typeof path !== 'string') {\n throw new InvalidArgumentError('path must be a string')\n } else if (\n path[0] !== '/' &&\n !(path.startsWith('http://') || path.startsWith('https://')) &&\n method !== 'CONNECT'\n ) {\n throw new InvalidArgumentError('path must be an absolute URL or start with a slash')\n } else if (invalidPathRegex.exec(path) !== null) {\n throw new InvalidArgumentError('invalid request path')\n }\n\n if (typeof method !== 'string') {\n throw new InvalidArgumentError('method must be a string')\n } else if (tokenRegExp.exec(method) === null) {\n throw new InvalidArgumentError('invalid request method')\n }\n\n if (upgrade && typeof upgrade !== 'string') {\n throw new InvalidArgumentError('upgrade must be a string')\n }\n\n if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('invalid headersTimeout')\n }\n\n if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('invalid bodyTimeout')\n }\n\n if (reset != null && typeof reset !== 'boolean') {\n throw new InvalidArgumentError('invalid reset')\n }\n\n if (expectContinue != null && typeof expectContinue !== 'boolean') {\n throw new InvalidArgumentError('invalid expectContinue')\n }\n\n this.headersTimeout = headersTimeout\n\n this.bodyTimeout = bodyTimeout\n\n this.throwOnError = throwOnError === true\n\n this.method = method\n\n this.abort = null\n\n if (body == null) {\n this.body = null\n } else if (util.isStream(body)) {\n this.body = body\n\n const rState = this.body._readableState\n if (!rState || !rState.autoDestroy) {\n this.endHandler = function autoDestroy () {\n util.destroy(this)\n }\n this.body.on('end', this.endHandler)\n }\n\n this.errorHandler = err => {\n if (this.abort) {\n this.abort(err)\n } else {\n this.error = err\n }\n }\n this.body.on('error', this.errorHandler)\n } else if (util.isBuffer(body)) {\n this.body = body.byteLength ? body : null\n } else if (ArrayBuffer.isView(body)) {\n this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null\n } else if (body instanceof ArrayBuffer) {\n this.body = body.byteLength ? Buffer.from(body) : null\n } else if (typeof body === 'string') {\n this.body = body.length ? Buffer.from(body) : null\n } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) {\n this.body = body\n } else {\n throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')\n }\n\n this.completed = false\n\n this.aborted = false\n\n this.upgrade = upgrade || null\n\n this.path = query ? util.buildURL(path, query) : path\n\n this.origin = origin\n\n this.idempotent = idempotent == null\n ? method === 'HEAD' || method === 'GET'\n : idempotent\n\n this.blocking = blocking == null ? false : blocking\n\n this.reset = reset == null ? null : reset\n\n this.host = null\n\n this.contentLength = null\n\n this.contentType = null\n\n this.headers = ''\n\n // Only for H2\n this.expectContinue = expectContinue != null ? expectContinue : false\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(this, headers[i], headers[i + 1])\n }\n } else if (headers && typeof headers === 'object') {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n processHeader(this, key, headers[key])\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n if (util.isFormDataLike(this.body)) {\n if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) {\n throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.')\n }\n\n if (!extractBody) {\n extractBody = require('../fetch/body.js').extractBody\n }\n\n const [bodyStream, contentType] = extractBody(body)\n if (this.contentType == null) {\n this.contentType = contentType\n this.headers += `content-type: ${contentType}\\r\\n`\n }\n this.body = bodyStream.stream\n this.contentLength = bodyStream.length\n } else if (util.isBlobLike(body) && this.contentType == null && body.type) {\n this.contentType = body.type\n this.headers += `content-type: ${body.type}\\r\\n`\n }\n\n util.validateHandler(handler, method, upgrade)\n\n this.servername = util.getServerName(this.host)\n\n this[kHandler] = handler\n\n if (channels.create.hasSubscribers) {\n channels.create.publish({ request: this })\n }\n }\n\n onBodySent (chunk) {\n if (this[kHandler].onBodySent) {\n try {\n return this[kHandler].onBodySent(chunk)\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onRequestSent () {\n if (channels.bodySent.hasSubscribers) {\n channels.bodySent.publish({ request: this })\n }\n\n if (this[kHandler].onRequestSent) {\n try {\n return this[kHandler].onRequestSent()\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onConnect (abort) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (this.error) {\n abort(this.error)\n } else {\n this.abort = abort\n return this[kHandler].onConnect(abort)\n }\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.headers.hasSubscribers) {\n channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })\n }\n\n try {\n return this[kHandler].onHeaders(statusCode, headers, resume, statusText)\n } catch (err) {\n this.abort(err)\n }\n }\n\n onData (chunk) {\n assert(!this.aborted)\n assert(!this.completed)\n\n try {\n return this[kHandler].onData(chunk)\n } catch (err) {\n this.abort(err)\n return false\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n assert(!this.aborted)\n assert(!this.completed)\n\n return this[kHandler].onUpgrade(statusCode, headers, socket)\n }\n\n onComplete (trailers) {\n this.onFinally()\n\n assert(!this.aborted)\n\n this.completed = true\n if (channels.trailers.hasSubscribers) {\n channels.trailers.publish({ request: this, trailers })\n }\n\n try {\n return this[kHandler].onComplete(trailers)\n } catch (err) {\n // TODO (fix): This might be a bad idea?\n this.onError(err)\n }\n }\n\n onError (error) {\n this.onFinally()\n\n if (channels.error.hasSubscribers) {\n channels.error.publish({ request: this, error })\n }\n\n if (this.aborted) {\n return\n }\n this.aborted = true\n\n return this[kHandler].onError(error)\n }\n\n onFinally () {\n if (this.errorHandler) {\n this.body.off('error', this.errorHandler)\n this.errorHandler = null\n }\n\n if (this.endHandler) {\n this.body.off('end', this.endHandler)\n this.endHandler = null\n }\n }\n\n // TODO: adjust to support H2\n addHeader (key, value) {\n processHeader(this, key, value)\n return this\n }\n\n static [kHTTP1BuildRequest] (origin, opts, handler) {\n // TODO: Migrate header parsing here, to make Requests\n // HTTP agnostic\n return new Request(origin, opts, handler)\n }\n\n static [kHTTP2BuildRequest] (origin, opts, handler) {\n const headers = opts.headers\n opts = { ...opts, headers: null }\n\n const request = new Request(origin, opts, handler)\n\n request.headers = {}\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(request, headers[i], headers[i + 1], true)\n }\n } else if (headers && typeof headers === 'object') {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n processHeader(request, key, headers[key], true)\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n return request\n }\n\n static [kHTTP2CopyHeaders] (raw) {\n const rawHeaders = raw.split('\\r\\n')\n const headers = {}\n\n for (const header of rawHeaders) {\n const [key, value] = header.split(': ')\n\n if (value == null || value.length === 0) continue\n\n if (headers[key]) headers[key] += `,${value}`\n else headers[key] = value\n }\n\n return headers\n }\n}\n\nfunction processHeaderValue (key, val, skipAppend) {\n if (val && typeof val === 'object') {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n\n val = val != null ? `${val}` : ''\n\n if (headerCharRegex.exec(val) !== null) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n\n return skipAppend ? val : `${key}: ${val}\\r\\n`\n}\n\nfunction processHeader (request, key, val, skipAppend = false) {\n if (val && (typeof val === 'object' && !Array.isArray(val))) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else if (val === undefined) {\n return\n }\n\n if (\n request.host === null &&\n key.length === 4 &&\n key.toLowerCase() === 'host'\n ) {\n if (headerCharRegex.exec(val) !== null) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n // Consumed by Client\n request.host = val\n } else if (\n request.contentLength === null &&\n key.length === 14 &&\n key.toLowerCase() === 'content-length'\n ) {\n request.contentLength = parseInt(val, 10)\n if (!Number.isFinite(request.contentLength)) {\n throw new InvalidArgumentError('invalid content-length header')\n }\n } else if (\n request.contentType === null &&\n key.length === 12 &&\n key.toLowerCase() === 'content-type'\n ) {\n request.contentType = val\n if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)\n else request.headers += processHeaderValue(key, val)\n } else if (\n key.length === 17 &&\n key.toLowerCase() === 'transfer-encoding'\n ) {\n throw new InvalidArgumentError('invalid transfer-encoding header')\n } else if (\n key.length === 10 &&\n key.toLowerCase() === 'connection'\n ) {\n const value = typeof val === 'string' ? val.toLowerCase() : null\n if (value !== 'close' && value !== 'keep-alive') {\n throw new InvalidArgumentError('invalid connection header')\n } else if (value === 'close') {\n request.reset = true\n }\n } else if (\n key.length === 10 &&\n key.toLowerCase() === 'keep-alive'\n ) {\n throw new InvalidArgumentError('invalid keep-alive header')\n } else if (\n key.length === 7 &&\n key.toLowerCase() === 'upgrade'\n ) {\n throw new InvalidArgumentError('invalid upgrade header')\n } else if (\n key.length === 6 &&\n key.toLowerCase() === 'expect'\n ) {\n throw new NotSupportedError('expect header not supported')\n } else if (tokenRegExp.exec(key) === null) {\n throw new InvalidArgumentError('invalid header key')\n } else {\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n if (skipAppend) {\n if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`\n else request.headers[key] = processHeaderValue(key, val[i], skipAppend)\n } else {\n request.headers += processHeaderValue(key, val[i])\n }\n }\n } else {\n if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)\n else request.headers += processHeaderValue(key, val)\n }\n }\n}\n\nmodule.exports = Request\n","module.exports = {\n kClose: Symbol('close'),\n kDestroy: Symbol('destroy'),\n kDispatch: Symbol('dispatch'),\n kUrl: Symbol('url'),\n kWriting: Symbol('writing'),\n kResuming: Symbol('resuming'),\n kQueue: Symbol('queue'),\n kConnect: Symbol('connect'),\n kConnecting: Symbol('connecting'),\n kHeadersList: Symbol('headers list'),\n kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),\n kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),\n kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),\n kKeepAliveTimeoutValue: Symbol('keep alive timeout'),\n kKeepAlive: Symbol('keep alive'),\n kHeadersTimeout: Symbol('headers timeout'),\n kBodyTimeout: Symbol('body timeout'),\n kServerName: Symbol('server name'),\n kLocalAddress: Symbol('local address'),\n kHost: Symbol('host'),\n kNoRef: Symbol('no ref'),\n kBodyUsed: Symbol('used'),\n kRunning: Symbol('running'),\n kBlocking: Symbol('blocking'),\n kPending: Symbol('pending'),\n kSize: Symbol('size'),\n kBusy: Symbol('busy'),\n kQueued: Symbol('queued'),\n kFree: Symbol('free'),\n kConnected: Symbol('connected'),\n kClosed: Symbol('closed'),\n kNeedDrain: Symbol('need drain'),\n kReset: Symbol('reset'),\n kDestroyed: Symbol.for('nodejs.stream.destroyed'),\n kMaxHeadersSize: Symbol('max headers size'),\n kRunningIdx: Symbol('running index'),\n kPendingIdx: Symbol('pending index'),\n kError: Symbol('error'),\n kClients: Symbol('clients'),\n kClient: Symbol('client'),\n kParser: Symbol('parser'),\n kOnDestroyed: Symbol('destroy callbacks'),\n kPipelining: Symbol('pipelining'),\n kSocket: Symbol('socket'),\n kHostHeader: Symbol('host header'),\n kConnector: Symbol('connector'),\n kStrictContentLength: Symbol('strict content length'),\n kMaxRedirections: Symbol('maxRedirections'),\n kMaxRequests: Symbol('maxRequestsPerClient'),\n kProxy: Symbol('proxy agent options'),\n kCounter: Symbol('socket request counter'),\n kInterceptors: Symbol('dispatch interceptors'),\n kMaxResponseSize: Symbol('max response size'),\n kHTTP2Session: Symbol('http2Session'),\n kHTTP2SessionState: Symbol('http2Session state'),\n kHTTP2BuildRequest: Symbol('http2 build request'),\n kHTTP1BuildRequest: Symbol('http1 build request'),\n kHTTP2CopyHeaders: Symbol('http2 copy headers'),\n kHTTPConnVersion: Symbol('http connection version'),\n kRetryHandlerDefaultRetry: Symbol('retry agent default retry'),\n kConstruct: Symbol('constructable')\n}\n","'use strict'\n\nconst assert = require('assert')\nconst { kDestroyed, kBodyUsed } = require('./symbols')\nconst { IncomingMessage } = require('http')\nconst stream = require('stream')\nconst net = require('net')\nconst { InvalidArgumentError } = require('./errors')\nconst { Blob } = require('buffer')\nconst nodeUtil = require('util')\nconst { stringify } = require('querystring')\n\nconst [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))\n\nfunction nop () {}\n\nfunction isStream (obj) {\n return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'\n}\n\n// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License)\nfunction isBlobLike (object) {\n return (Blob && object instanceof Blob) || (\n object &&\n typeof object === 'object' &&\n (typeof object.stream === 'function' ||\n typeof object.arrayBuffer === 'function') &&\n /^(Blob|File)$/.test(object[Symbol.toStringTag])\n )\n}\n\nfunction buildURL (url, queryParams) {\n if (url.includes('?') || url.includes('#')) {\n throw new Error('Query params cannot be passed when url already contains \"?\" or \"#\".')\n }\n\n const stringified = stringify(queryParams)\n\n if (stringified) {\n url += '?' + stringified\n }\n\n return url\n}\n\nfunction parseURL (url) {\n if (typeof url === 'string') {\n url = new URL(url)\n\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n }\n\n if (!url || typeof url !== 'object') {\n throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.')\n }\n\n if (!/^https?:/.test(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n if (!(url instanceof URL)) {\n if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) {\n throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.')\n }\n\n if (url.path != null && typeof url.path !== 'string') {\n throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.')\n }\n\n if (url.pathname != null && typeof url.pathname !== 'string') {\n throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.')\n }\n\n if (url.hostname != null && typeof url.hostname !== 'string') {\n throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.')\n }\n\n if (url.origin != null && typeof url.origin !== 'string') {\n throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.')\n }\n\n const port = url.port != null\n ? url.port\n : (url.protocol === 'https:' ? 443 : 80)\n let origin = url.origin != null\n ? url.origin\n : `${url.protocol}//${url.hostname}:${port}`\n let path = url.path != null\n ? url.path\n : `${url.pathname || ''}${url.search || ''}`\n\n if (origin.endsWith('/')) {\n origin = origin.substring(0, origin.length - 1)\n }\n\n if (path && !path.startsWith('/')) {\n path = `/${path}`\n }\n // new URL(path, origin) is unsafe when `path` contains an absolute URL\n // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL:\n // If first parameter is a relative URL, second param is required, and will be used as the base URL.\n // If first parameter is an absolute URL, a given second param will be ignored.\n url = new URL(origin + path)\n }\n\n return url\n}\n\nfunction parseOrigin (url) {\n url = parseURL(url)\n\n if (url.pathname !== '/' || url.search || url.hash) {\n throw new InvalidArgumentError('invalid url')\n }\n\n return url\n}\n\nfunction getHostname (host) {\n if (host[0] === '[') {\n const idx = host.indexOf(']')\n\n assert(idx !== -1)\n return host.substring(1, idx)\n }\n\n const idx = host.indexOf(':')\n if (idx === -1) return host\n\n return host.substring(0, idx)\n}\n\n// IP addresses are not valid server names per RFC6066\n// > Currently, the only server names supported are DNS hostnames\nfunction getServerName (host) {\n if (!host) {\n return null\n }\n\n assert.strictEqual(typeof host, 'string')\n\n const servername = getHostname(host)\n if (net.isIP(servername)) {\n return ''\n }\n\n return servername\n}\n\nfunction deepClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction isAsyncIterable (obj) {\n return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function')\n}\n\nfunction isIterable (obj) {\n return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))\n}\n\nfunction bodyLength (body) {\n if (body == null) {\n return 0\n } else if (isStream(body)) {\n const state = body._readableState\n return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length)\n ? state.length\n : null\n } else if (isBlobLike(body)) {\n return body.size != null ? body.size : null\n } else if (isBuffer(body)) {\n return body.byteLength\n }\n\n return null\n}\n\nfunction isDestroyed (stream) {\n return !stream || !!(stream.destroyed || stream[kDestroyed])\n}\n\nfunction isReadableAborted (stream) {\n const state = stream && stream._readableState\n return isDestroyed(stream) && state && !state.endEmitted\n}\n\nfunction destroy (stream, err) {\n if (stream == null || !isStream(stream) || isDestroyed(stream)) {\n return\n }\n\n if (typeof stream.destroy === 'function') {\n if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {\n // See: https://github.com/nodejs/node/pull/38505/files\n stream.socket = null\n }\n\n stream.destroy(err)\n } else if (err) {\n process.nextTick((stream, err) => {\n stream.emit('error', err)\n }, stream, err)\n }\n\n if (stream.destroyed !== true) {\n stream[kDestroyed] = true\n }\n}\n\nconst KEEPALIVE_TIMEOUT_EXPR = /timeout=(\\d+)/\nfunction parseKeepAliveTimeout (val) {\n const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR)\n return m ? parseInt(m[1], 10) * 1000 : null\n}\n\nfunction parseHeaders (headers, obj = {}) {\n // For H2 support\n if (!Array.isArray(headers)) return headers\n\n for (let i = 0; i < headers.length; i += 2) {\n const key = headers[i].toString().toLowerCase()\n let val = obj[key]\n\n if (!val) {\n if (Array.isArray(headers[i + 1])) {\n obj[key] = headers[i + 1].map(x => x.toString('utf8'))\n } else {\n obj[key] = headers[i + 1].toString('utf8')\n }\n } else {\n if (!Array.isArray(val)) {\n val = [val]\n obj[key] = val\n }\n val.push(headers[i + 1].toString('utf8'))\n }\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if ('content-length' in obj && 'content-disposition' in obj) {\n obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1')\n }\n\n return obj\n}\n\nfunction parseRawHeaders (headers) {\n const ret = []\n let hasContentLength = false\n let contentDispositionIdx = -1\n\n for (let n = 0; n < headers.length; n += 2) {\n const key = headers[n + 0].toString()\n const val = headers[n + 1].toString('utf8')\n\n if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) {\n ret.push(key, val)\n hasContentLength = true\n } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) {\n contentDispositionIdx = ret.push(key, val) - 1\n } else {\n ret.push(key, val)\n }\n }\n\n // See https://github.com/nodejs/node/pull/46528\n if (hasContentLength && contentDispositionIdx !== -1) {\n ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1')\n }\n\n return ret\n}\n\nfunction isBuffer (buffer) {\n // See, https://github.com/mcollina/undici/pull/319\n return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)\n}\n\nfunction validateHandler (handler, method, upgrade) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n if (typeof handler.onConnect !== 'function') {\n throw new InvalidArgumentError('invalid onConnect method')\n }\n\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) {\n throw new InvalidArgumentError('invalid onBodySent method')\n }\n\n if (upgrade || method === 'CONNECT') {\n if (typeof handler.onUpgrade !== 'function') {\n throw new InvalidArgumentError('invalid onUpgrade method')\n }\n } else {\n if (typeof handler.onHeaders !== 'function') {\n throw new InvalidArgumentError('invalid onHeaders method')\n }\n\n if (typeof handler.onData !== 'function') {\n throw new InvalidArgumentError('invalid onData method')\n }\n\n if (typeof handler.onComplete !== 'function') {\n throw new InvalidArgumentError('invalid onComplete method')\n }\n }\n}\n\n// A body is disturbed if it has been read from and it cannot\n// be re-used without losing state or data.\nfunction isDisturbed (body) {\n return !!(body && (\n stream.isDisturbed\n ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed?\n : body[kBodyUsed] ||\n body.readableDidRead ||\n (body._readableState && body._readableState.dataEmitted) ||\n isReadableAborted(body)\n ))\n}\n\nfunction isErrored (body) {\n return !!(body && (\n stream.isErrored\n ? stream.isErrored(body)\n : /state: 'errored'/.test(nodeUtil.inspect(body)\n )))\n}\n\nfunction isReadable (body) {\n return !!(body && (\n stream.isReadable\n ? stream.isReadable(body)\n : /state: 'readable'/.test(nodeUtil.inspect(body)\n )))\n}\n\nfunction getSocketInfo (socket) {\n return {\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort,\n remoteFamily: socket.remoteFamily,\n timeout: socket.timeout,\n bytesWritten: socket.bytesWritten,\n bytesRead: socket.bytesRead\n }\n}\n\nasync function * convertIterableToBuffer (iterable) {\n for await (const chunk of iterable) {\n yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)\n }\n}\n\nlet ReadableStream\nfunction ReadableStreamFrom (iterable) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n if (ReadableStream.from) {\n return ReadableStream.from(convertIterableToBuffer(iterable))\n }\n\n let iterator\n return new ReadableStream(\n {\n async start () {\n iterator = iterable[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { done, value } = await iterator.next()\n if (done) {\n queueMicrotask(() => {\n controller.close()\n })\n } else {\n const buf = Buffer.isBuffer(value) ? value : Buffer.from(value)\n controller.enqueue(new Uint8Array(buf))\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n }\n },\n 0\n )\n}\n\n// The chunk should be a FormData instance and contains\n// all the required methods.\nfunction isFormDataLike (object) {\n return (\n object &&\n typeof object === 'object' &&\n typeof object.append === 'function' &&\n typeof object.delete === 'function' &&\n typeof object.get === 'function' &&\n typeof object.getAll === 'function' &&\n typeof object.has === 'function' &&\n typeof object.set === 'function' &&\n object[Symbol.toStringTag] === 'FormData'\n )\n}\n\nfunction throwIfAborted (signal) {\n if (!signal) { return }\n if (typeof signal.throwIfAborted === 'function') {\n signal.throwIfAborted()\n } else {\n if (signal.aborted) {\n // DOMException not available < v17.0.0\n const err = new Error('The operation was aborted')\n err.name = 'AbortError'\n throw err\n }\n }\n}\n\nfunction addAbortListener (signal, listener) {\n if ('addEventListener' in signal) {\n signal.addEventListener('abort', listener, { once: true })\n return () => signal.removeEventListener('abort', listener)\n }\n signal.addListener('abort', listener)\n return () => signal.removeListener('abort', listener)\n}\n\nconst hasToWellFormed = !!String.prototype.toWellFormed\n\n/**\n * @param {string} val\n */\nfunction toUSVString (val) {\n if (hasToWellFormed) {\n return `${val}`.toWellFormed()\n } else if (nodeUtil.toUSVString) {\n return nodeUtil.toUSVString(val)\n }\n\n return `${val}`\n}\n\n// Parsed accordingly to RFC 9110\n// https://www.rfc-editor.org/rfc/rfc9110#field.content-range\nfunction parseRangeHeader (range) {\n if (range == null || range === '') return { start: 0, end: null, size: null }\n\n const m = range ? range.match(/^bytes (\\d+)-(\\d+)\\/(\\d+)?$/) : null\n return m\n ? {\n start: parseInt(m[1]),\n end: m[2] ? parseInt(m[2]) : null,\n size: m[3] ? parseInt(m[3]) : null\n }\n : null\n}\n\nconst kEnumerableProperty = Object.create(null)\nkEnumerableProperty.enumerable = true\n\nmodule.exports = {\n kEnumerableProperty,\n nop,\n isDisturbed,\n isErrored,\n isReadable,\n toUSVString,\n isReadableAborted,\n isBlobLike,\n parseOrigin,\n parseURL,\n getServerName,\n isStream,\n isIterable,\n isAsyncIterable,\n isDestroyed,\n parseRawHeaders,\n parseHeaders,\n parseKeepAliveTimeout,\n destroy,\n bodyLength,\n deepClone,\n ReadableStreamFrom,\n isBuffer,\n validateHandler,\n getSocketInfo,\n isFormDataLike,\n buildURL,\n throwIfAborted,\n addAbortListener,\n parseRangeHeader,\n nodeMajor,\n nodeMinor,\n nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13),\n safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE']\n}\n","'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst {\n ClientDestroyedError,\n ClientClosedError,\n InvalidArgumentError\n} = require('./core/errors')\nconst { kDestroy, kClose, kDispatch, kInterceptors } = require('./core/symbols')\n\nconst kDestroyed = Symbol('destroyed')\nconst kClosed = Symbol('closed')\nconst kOnDestroyed = Symbol('onDestroyed')\nconst kOnClosed = Symbol('onClosed')\nconst kInterceptedDispatch = Symbol('Intercepted Dispatch')\n\nclass DispatcherBase extends Dispatcher {\n constructor () {\n super()\n\n this[kDestroyed] = false\n this[kOnDestroyed] = null\n this[kClosed] = false\n this[kOnClosed] = []\n }\n\n get destroyed () {\n return this[kDestroyed]\n }\n\n get closed () {\n return this[kClosed]\n }\n\n get interceptors () {\n return this[kInterceptors]\n }\n\n set interceptors (newInterceptors) {\n if (newInterceptors) {\n for (let i = newInterceptors.length - 1; i >= 0; i--) {\n const interceptor = this[kInterceptors][i]\n if (typeof interceptor !== 'function') {\n throw new InvalidArgumentError('interceptor must be an function')\n }\n }\n }\n\n this[kInterceptors] = newInterceptors\n }\n\n close (callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.close((err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n queueMicrotask(() => callback(new ClientDestroyedError(), null))\n return\n }\n\n if (this[kClosed]) {\n if (this[kOnClosed]) {\n this[kOnClosed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n this[kClosed] = true\n this[kOnClosed].push(callback)\n\n const onClosed = () => {\n const callbacks = this[kOnClosed]\n this[kOnClosed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kClose]()\n .then(() => this.destroy())\n .then(() => {\n queueMicrotask(onClosed)\n })\n }\n\n destroy (err, callback) {\n if (typeof err === 'function') {\n callback = err\n err = null\n }\n\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.destroy(err, (err, data) => {\n return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n if (this[kOnDestroyed]) {\n this[kOnDestroyed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n if (!err) {\n err = new ClientDestroyedError()\n }\n\n this[kDestroyed] = true\n this[kOnDestroyed] = this[kOnDestroyed] || []\n this[kOnDestroyed].push(callback)\n\n const onDestroyed = () => {\n const callbacks = this[kOnDestroyed]\n this[kOnDestroyed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kDestroy](err).then(() => {\n queueMicrotask(onDestroyed)\n })\n }\n\n [kInterceptedDispatch] (opts, handler) {\n if (!this[kInterceptors] || this[kInterceptors].length === 0) {\n this[kInterceptedDispatch] = this[kDispatch]\n return this[kDispatch](opts, handler)\n }\n\n let dispatch = this[kDispatch].bind(this)\n for (let i = this[kInterceptors].length - 1; i >= 0; i--) {\n dispatch = this[kInterceptors][i](dispatch)\n }\n this[kInterceptedDispatch] = dispatch\n return dispatch(opts, handler)\n }\n\n dispatch (opts, handler) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n try {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object.')\n }\n\n if (this[kDestroyed] || this[kOnDestroyed]) {\n throw new ClientDestroyedError()\n }\n\n if (this[kClosed]) {\n throw new ClientClosedError()\n }\n\n return this[kInterceptedDispatch](opts, handler)\n } catch (err) {\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n handler.onError(err)\n\n return false\n }\n }\n}\n\nmodule.exports = DispatcherBase\n","'use strict'\n\nconst EventEmitter = require('events')\n\nclass Dispatcher extends EventEmitter {\n dispatch () {\n throw new Error('not implemented')\n }\n\n close () {\n throw new Error('not implemented')\n }\n\n destroy () {\n throw new Error('not implemented')\n }\n}\n\nmodule.exports = Dispatcher\n","'use strict'\n\nconst Busboy = require('@fastify/busboy')\nconst util = require('../core/util')\nconst {\n ReadableStreamFrom,\n isBlobLike,\n isReadableStreamLike,\n readableStreamClose,\n createDeferredPromise,\n fullyReadBody\n} = require('./util')\nconst { FormData } = require('./formdata')\nconst { kState } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { DOMException, structuredClone } = require('./constants')\nconst { Blob, File: NativeFile } = require('buffer')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('assert')\nconst { isErrored } = require('../core/util')\nconst { isUint8Array, isArrayBuffer } = require('util/types')\nconst { File: UndiciFile } = require('./file')\nconst { parseMIMEType, serializeAMimeType } = require('./dataURL')\n\nlet ReadableStream = globalThis.ReadableStream\n\n/** @type {globalThis['File']} */\nconst File = NativeFile ?? UndiciFile\nconst textEncoder = new TextEncoder()\nconst textDecoder = new TextDecoder()\n\n// https://fetch.spec.whatwg.org/#concept-bodyinit-extract\nfunction extractBody (object, keepalive = false) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n // 1. Let stream be null.\n let stream = null\n\n // 2. If object is a ReadableStream object, then set stream to object.\n if (object instanceof ReadableStream) {\n stream = object\n } else if (isBlobLike(object)) {\n // 3. Otherwise, if object is a Blob object, set stream to the\n // result of running object’s get stream.\n stream = object.stream()\n } else {\n // 4. Otherwise, set stream to a new ReadableStream object, and set\n // up stream.\n stream = new ReadableStream({\n async pull (controller) {\n controller.enqueue(\n typeof source === 'string' ? textEncoder.encode(source) : source\n )\n queueMicrotask(() => readableStreamClose(controller))\n },\n start () {},\n type: undefined\n })\n }\n\n // 5. Assert: stream is a ReadableStream object.\n assert(isReadableStreamLike(stream))\n\n // 6. Let action be null.\n let action = null\n\n // 7. Let source be null.\n let source = null\n\n // 8. Let length be null.\n let length = null\n\n // 9. Let type be null.\n let type = null\n\n // 10. Switch on object:\n if (typeof object === 'string') {\n // Set source to the UTF-8 encoding of object.\n // Note: setting source to a Uint8Array here breaks some mocking assumptions.\n source = object\n\n // Set type to `text/plain;charset=UTF-8`.\n type = 'text/plain;charset=UTF-8'\n } else if (object instanceof URLSearchParams) {\n // URLSearchParams\n\n // spec says to run application/x-www-form-urlencoded on body.list\n // this is implemented in Node.js as apart of an URLSearchParams instance toString method\n // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490\n // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100\n\n // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list.\n source = object.toString()\n\n // Set type to `application/x-www-form-urlencoded;charset=UTF-8`.\n type = 'application/x-www-form-urlencoded;charset=UTF-8'\n } else if (isArrayBuffer(object)) {\n // BufferSource/ArrayBuffer\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.slice())\n } else if (ArrayBuffer.isView(object)) {\n // BufferSource/ArrayBufferView\n\n // Set source to a copy of the bytes held by object.\n source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))\n } else if (util.isFormDataLike(object)) {\n const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`\n const prefix = `--${boundary}\\r\\nContent-Disposition: form-data`\n\n /*! formdata-polyfill. MIT License. Jimmy Wärting */\n const escape = (str) =>\n str.replace(/\\n/g, '%0A').replace(/\\r/g, '%0D').replace(/\"/g, '%22')\n const normalizeLinefeeds = (value) => value.replace(/\\r?\\n|\\r/g, '\\r\\n')\n\n // Set action to this step: run the multipart/form-data\n // encoding algorithm, with object’s entry list and UTF-8.\n // - This ensures that the body is immutable and can't be changed afterwords\n // - That the content-length is calculated in advance.\n // - And that all parts are pre-encoded and ready to be sent.\n\n const blobParts = []\n const rn = new Uint8Array([13, 10]) // '\\r\\n'\n length = 0\n let hasUnknownSizeValue = false\n\n for (const [name, value] of object) {\n if (typeof value === 'string') {\n const chunk = textEncoder.encode(prefix +\n `; name=\"${escape(normalizeLinefeeds(name))}\"` +\n `\\r\\n\\r\\n${normalizeLinefeeds(value)}\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n } else {\n const chunk = textEncoder.encode(`${prefix}; name=\"${escape(normalizeLinefeeds(name))}\"` +\n (value.name ? `; filename=\"${escape(value.name)}\"` : '') + '\\r\\n' +\n `Content-Type: ${\n value.type || 'application/octet-stream'\n }\\r\\n\\r\\n`)\n blobParts.push(chunk, value, rn)\n if (typeof value.size === 'number') {\n length += chunk.byteLength + value.size + rn.byteLength\n } else {\n hasUnknownSizeValue = true\n }\n }\n }\n\n const chunk = textEncoder.encode(`--${boundary}--`)\n blobParts.push(chunk)\n length += chunk.byteLength\n if (hasUnknownSizeValue) {\n length = null\n }\n\n // Set source to object.\n source = object\n\n action = async function * () {\n for (const part of blobParts) {\n if (part.stream) {\n yield * part.stream()\n } else {\n yield part\n }\n }\n }\n\n // Set type to `multipart/form-data; boundary=`,\n // followed by the multipart/form-data boundary string generated\n // by the multipart/form-data encoding algorithm.\n type = 'multipart/form-data; boundary=' + boundary\n } else if (isBlobLike(object)) {\n // Blob\n\n // Set source to object.\n source = object\n\n // Set length to object’s size.\n length = object.size\n\n // If object’s type attribute is not the empty byte sequence, set\n // type to its value.\n if (object.type) {\n type = object.type\n }\n } else if (typeof object[Symbol.asyncIterator] === 'function') {\n // If keepalive is true, then throw a TypeError.\n if (keepalive) {\n throw new TypeError('keepalive')\n }\n\n // If object is disturbed or locked, then throw a TypeError.\n if (util.isDisturbed(object) || object.locked) {\n throw new TypeError(\n 'Response body object should not be disturbed or locked'\n )\n }\n\n stream =\n object instanceof ReadableStream ? object : ReadableStreamFrom(object)\n }\n\n // 11. If source is a byte sequence, then set action to a\n // step that returns source and length to source’s length.\n if (typeof source === 'string' || util.isBuffer(source)) {\n length = Buffer.byteLength(source)\n }\n\n // 12. If action is non-null, then run these steps in in parallel:\n if (action != null) {\n // Run action.\n let iterator\n stream = new ReadableStream({\n async start () {\n iterator = action(object)[Symbol.asyncIterator]()\n },\n async pull (controller) {\n const { value, done } = await iterator.next()\n if (done) {\n // When running action is done, close stream.\n queueMicrotask(() => {\n controller.close()\n })\n } else {\n // Whenever one or more bytes are available and stream is not errored,\n // enqueue a Uint8Array wrapping an ArrayBuffer containing the available\n // bytes into stream.\n if (!isErrored(stream)) {\n controller.enqueue(new Uint8Array(value))\n }\n }\n return controller.desiredSize > 0\n },\n async cancel (reason) {\n await iterator.return()\n },\n type: undefined\n })\n }\n\n // 13. Let body be a body whose stream is stream, source is source,\n // and length is length.\n const body = { stream, source, length }\n\n // 14. Return (body, type).\n return [body, type]\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit-safely-extract\nfunction safelyExtractBody (object, keepalive = false) {\n if (!ReadableStream) {\n // istanbul ignore next\n ReadableStream = require('stream/web').ReadableStream\n }\n\n // To safely extract a body and a `Content-Type` value from\n // a byte sequence or BodyInit object object, run these steps:\n\n // 1. If object is a ReadableStream object, then:\n if (object instanceof ReadableStream) {\n // Assert: object is neither disturbed nor locked.\n // istanbul ignore next\n assert(!util.isDisturbed(object), 'The body has already been consumed.')\n // istanbul ignore next\n assert(!object.locked, 'The stream is locked.')\n }\n\n // 2. Return the results of extracting object.\n return extractBody(object, keepalive)\n}\n\nfunction cloneBody (body) {\n // To clone a body body, run these steps:\n\n // https://fetch.spec.whatwg.org/#concept-body-clone\n\n // 1. Let « out1, out2 » be the result of teeing body’s stream.\n const [out1, out2] = body.stream.tee()\n const out2Clone = structuredClone(out2, { transfer: [out2] })\n // This, for whatever reasons, unrefs out2Clone which allows\n // the process to exit by itself.\n const [, finalClone] = out2Clone.tee()\n\n // 2. Set body’s stream to out1.\n body.stream = out1\n\n // 3. Return a body whose stream is out2 and other members are copied from body.\n return {\n stream: finalClone,\n length: body.length,\n source: body.source\n }\n}\n\nasync function * consumeBody (body) {\n if (body) {\n if (isUint8Array(body)) {\n yield body\n } else {\n const stream = body.stream\n\n if (util.isDisturbed(stream)) {\n throw new TypeError('The body has already been consumed.')\n }\n\n if (stream.locked) {\n throw new TypeError('The stream is locked.')\n }\n\n // Compat.\n stream[kBodyUsed] = true\n\n yield * stream\n }\n }\n}\n\nfunction throwIfAborted (state) {\n if (state.aborted) {\n throw new DOMException('The operation was aborted.', 'AbortError')\n }\n}\n\nfunction bodyMixinMethods (instance) {\n const methods = {\n blob () {\n // The blob() method steps are to return the result of\n // running consume body with this and the following step\n // given a byte sequence bytes: return a Blob whose\n // contents are bytes and whose type attribute is this’s\n // MIME type.\n return specConsumeBody(this, (bytes) => {\n let mimeType = bodyMimeType(this)\n\n if (mimeType === 'failure') {\n mimeType = ''\n } else if (mimeType) {\n mimeType = serializeAMimeType(mimeType)\n }\n\n // Return a Blob whose contents are bytes and type attribute\n // is mimeType.\n return new Blob([bytes], { type: mimeType })\n }, instance)\n },\n\n arrayBuffer () {\n // The arrayBuffer() method steps are to return the result\n // of running consume body with this and the following step\n // given a byte sequence bytes: return a new ArrayBuffer\n // whose contents are bytes.\n return specConsumeBody(this, (bytes) => {\n return new Uint8Array(bytes).buffer\n }, instance)\n },\n\n text () {\n // The text() method steps are to return the result of running\n // consume body with this and UTF-8 decode.\n return specConsumeBody(this, utf8DecodeBytes, instance)\n },\n\n json () {\n // The json() method steps are to return the result of running\n // consume body with this and parse JSON from bytes.\n return specConsumeBody(this, parseJSONFromBytes, instance)\n },\n\n async formData () {\n webidl.brandCheck(this, instance)\n\n throwIfAborted(this[kState])\n\n const contentType = this.headers.get('Content-Type')\n\n // If mimeType’s essence is \"multipart/form-data\", then:\n if (/multipart\\/form-data/.test(contentType)) {\n const headers = {}\n for (const [key, value] of this.headers) headers[key.toLowerCase()] = value\n\n const responseFormData = new FormData()\n\n let busboy\n\n try {\n busboy = new Busboy({\n headers,\n preservePath: true\n })\n } catch (err) {\n throw new DOMException(`${err}`, 'AbortError')\n }\n\n busboy.on('field', (name, value) => {\n responseFormData.append(name, value)\n })\n busboy.on('file', (name, value, filename, encoding, mimeType) => {\n const chunks = []\n\n if (encoding === 'base64' || encoding.toLowerCase() === 'base64') {\n let base64chunk = ''\n\n value.on('data', (chunk) => {\n base64chunk += chunk.toString().replace(/[\\r\\n]/gm, '')\n\n const end = base64chunk.length - base64chunk.length % 4\n chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64'))\n\n base64chunk = base64chunk.slice(end)\n })\n value.on('end', () => {\n chunks.push(Buffer.from(base64chunk, 'base64'))\n responseFormData.append(name, new File(chunks, filename, { type: mimeType }))\n })\n } else {\n value.on('data', (chunk) => {\n chunks.push(chunk)\n })\n value.on('end', () => {\n responseFormData.append(name, new File(chunks, filename, { type: mimeType }))\n })\n }\n })\n\n const busboyResolve = new Promise((resolve, reject) => {\n busboy.on('finish', resolve)\n busboy.on('error', (err) => reject(new TypeError(err)))\n })\n\n if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk)\n busboy.end()\n await busboyResolve\n\n return responseFormData\n } else if (/application\\/x-www-form-urlencoded/.test(contentType)) {\n // Otherwise, if mimeType’s essence is \"application/x-www-form-urlencoded\", then:\n\n // 1. Let entries be the result of parsing bytes.\n let entries\n try {\n let text = ''\n // application/x-www-form-urlencoded parser will keep the BOM.\n // https://url.spec.whatwg.org/#concept-urlencoded-parser\n // Note that streaming decoder is stateful and cannot be reused\n const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true })\n\n for await (const chunk of consumeBody(this[kState].body)) {\n if (!isUint8Array(chunk)) {\n throw new TypeError('Expected Uint8Array chunk')\n }\n text += streamingDecoder.decode(chunk, { stream: true })\n }\n text += streamingDecoder.decode()\n entries = new URLSearchParams(text)\n } catch (err) {\n // istanbul ignore next: Unclear when new URLSearchParams can fail on a string.\n // 2. If entries is failure, then throw a TypeError.\n throw Object.assign(new TypeError(), { cause: err })\n }\n\n // 3. Return a new FormData object whose entries are entries.\n const formData = new FormData()\n for (const [name, value] of entries) {\n formData.append(name, value)\n }\n return formData\n } else {\n // Wait a tick before checking if the request has been aborted.\n // Otherwise, a TypeError can be thrown when an AbortError should.\n await Promise.resolve()\n\n throwIfAborted(this[kState])\n\n // Otherwise, throw a TypeError.\n throw webidl.errors.exception({\n header: `${instance.name}.formData`,\n message: 'Could not parse content as FormData.'\n })\n }\n }\n }\n\n return methods\n}\n\nfunction mixinBody (prototype) {\n Object.assign(prototype.prototype, bodyMixinMethods(prototype))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-consume-body\n * @param {Response|Request} object\n * @param {(value: unknown) => unknown} convertBytesToJSValue\n * @param {Response|Request} instance\n */\nasync function specConsumeBody (object, convertBytesToJSValue, instance) {\n webidl.brandCheck(object, instance)\n\n throwIfAborted(object[kState])\n\n // 1. If object is unusable, then return a promise rejected\n // with a TypeError.\n if (bodyUnusable(object[kState].body)) {\n throw new TypeError('Body is unusable')\n }\n\n // 2. Let promise be a new promise.\n const promise = createDeferredPromise()\n\n // 3. Let errorSteps given error be to reject promise with error.\n const errorSteps = (error) => promise.reject(error)\n\n // 4. Let successSteps given a byte sequence data be to resolve\n // promise with the result of running convertBytesToJSValue\n // with data. If that threw an exception, then run errorSteps\n // with that exception.\n const successSteps = (data) => {\n try {\n promise.resolve(convertBytesToJSValue(data))\n } catch (e) {\n errorSteps(e)\n }\n }\n\n // 5. If object’s body is null, then run successSteps with an\n // empty byte sequence.\n if (object[kState].body == null) {\n successSteps(new Uint8Array())\n return promise.promise\n }\n\n // 6. Otherwise, fully read object’s body given successSteps,\n // errorSteps, and object’s relevant global object.\n await fullyReadBody(object[kState].body, successSteps, errorSteps)\n\n // 7. Return promise.\n return promise.promise\n}\n\n// https://fetch.spec.whatwg.org/#body-unusable\nfunction bodyUnusable (body) {\n // An object including the Body interface mixin is\n // said to be unusable if its body is non-null and\n // its body’s stream is disturbed or locked.\n return body != null && (body.stream.locked || util.isDisturbed(body.stream))\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#utf-8-decode\n * @param {Buffer} buffer\n */\nfunction utf8DecodeBytes (buffer) {\n if (buffer.length === 0) {\n return ''\n }\n\n // 1. Let buffer be the result of peeking three bytes from\n // ioQueue, converted to a byte sequence.\n\n // 2. If buffer is 0xEF 0xBB 0xBF, then read three\n // bytes from ioQueue. (Do nothing with those bytes.)\n if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {\n buffer = buffer.subarray(3)\n }\n\n // 3. Process a queue with an instance of UTF-8’s\n // decoder, ioQueue, output, and \"replacement\".\n const output = textDecoder.decode(buffer)\n\n // 4. Return output.\n return output\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value\n * @param {Uint8Array} bytes\n */\nfunction parseJSONFromBytes (bytes) {\n return JSON.parse(utf8DecodeBytes(bytes))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-mime-type\n * @param {import('./response').Response|import('./request').Request} object\n */\nfunction bodyMimeType (object) {\n const { headersList } = object[kState]\n const contentType = headersList.get('content-type')\n\n if (contentType === null) {\n return 'failure'\n }\n\n return parseMIMEType(contentType)\n}\n\nmodule.exports = {\n extractBody,\n safelyExtractBody,\n cloneBody,\n mixinBody\n}\n","'use strict'\n\nconst { MessageChannel, receiveMessageOnPort } = require('worker_threads')\n\nconst corsSafeListedMethods = ['GET', 'HEAD', 'POST']\nconst corsSafeListedMethodsSet = new Set(corsSafeListedMethods)\n\nconst nullBodyStatus = [101, 204, 205, 304]\n\nconst redirectStatus = [301, 302, 303, 307, 308]\nconst redirectStatusSet = new Set(redirectStatus)\n\n// https://fetch.spec.whatwg.org/#block-bad-port\nconst badPorts = [\n '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',\n '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',\n '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',\n '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',\n '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697',\n '10080'\n]\n\nconst badPortsSet = new Set(badPorts)\n\n// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies\nconst referrerPolicy = [\n '',\n 'no-referrer',\n 'no-referrer-when-downgrade',\n 'same-origin',\n 'origin',\n 'strict-origin',\n 'origin-when-cross-origin',\n 'strict-origin-when-cross-origin',\n 'unsafe-url'\n]\nconst referrerPolicySet = new Set(referrerPolicy)\n\nconst requestRedirect = ['follow', 'manual', 'error']\n\nconst safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE']\nconst safeMethodsSet = new Set(safeMethods)\n\nconst requestMode = ['navigate', 'same-origin', 'no-cors', 'cors']\n\nconst requestCredentials = ['omit', 'same-origin', 'include']\n\nconst requestCache = [\n 'default',\n 'no-store',\n 'reload',\n 'no-cache',\n 'force-cache',\n 'only-if-cached'\n]\n\n// https://fetch.spec.whatwg.org/#request-body-header-name\nconst requestBodyHeader = [\n 'content-encoding',\n 'content-language',\n 'content-location',\n 'content-type',\n // See https://github.com/nodejs/undici/issues/2021\n // 'Content-Length' is a forbidden header name, which is typically\n // removed in the Headers implementation. However, undici doesn't\n // filter out headers, so we add it here.\n 'content-length'\n]\n\n// https://fetch.spec.whatwg.org/#enumdef-requestduplex\nconst requestDuplex = [\n 'half'\n]\n\n// http://fetch.spec.whatwg.org/#forbidden-method\nconst forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK']\nconst forbiddenMethodsSet = new Set(forbiddenMethods)\n\nconst subresource = [\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'manifest',\n 'paintworklet',\n 'script',\n 'style',\n 'track',\n 'video',\n 'xslt',\n ''\n]\nconst subresourceSet = new Set(subresource)\n\n/** @type {globalThis['DOMException']} */\nconst DOMException = globalThis.DOMException ?? (() => {\n // DOMException was only made a global in Node v17.0.0,\n // but fetch supports >= v16.8.\n try {\n atob('~')\n } catch (err) {\n return Object.getPrototypeOf(err).constructor\n }\n})()\n\nlet channel\n\n/** @type {globalThis['structuredClone']} */\nconst structuredClone =\n globalThis.structuredClone ??\n // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js\n // structuredClone was added in v17.0.0, but fetch supports v16.8\n function structuredClone (value, options = undefined) {\n if (arguments.length === 0) {\n throw new TypeError('missing argument')\n }\n\n if (!channel) {\n channel = new MessageChannel()\n }\n channel.port1.unref()\n channel.port2.unref()\n channel.port1.postMessage(value, options?.transfer)\n return receiveMessageOnPort(channel.port2).message\n }\n\nmodule.exports = {\n DOMException,\n structuredClone,\n subresource,\n forbiddenMethods,\n requestBodyHeader,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n redirectStatus,\n corsSafeListedMethods,\n nullBodyStatus,\n safeMethods,\n badPorts,\n requestDuplex,\n subresourceSet,\n badPortsSet,\n redirectStatusSet,\n corsSafeListedMethodsSet,\n safeMethodsSet,\n forbiddenMethodsSet,\n referrerPolicySet\n}\n","const assert = require('assert')\nconst { atob } = require('buffer')\nconst { isomorphicDecode } = require('./util')\n\nconst encoder = new TextEncoder()\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-token-code-point\n */\nconst HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/\nconst HTTP_WHITESPACE_REGEX = /(\\u000A|\\u000D|\\u0009|\\u0020)/ // eslint-disable-line\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point\n */\nconst HTTP_QUOTED_STRING_TOKENS = /[\\u0009|\\u0020-\\u007E|\\u0080-\\u00FF]/ // eslint-disable-line\n\n// https://fetch.spec.whatwg.org/#data-url-processor\n/** @param {URL} dataURL */\nfunction dataURLProcessor (dataURL) {\n // 1. Assert: dataURL’s scheme is \"data\".\n assert(dataURL.protocol === 'data:')\n\n // 2. Let input be the result of running the URL\n // serializer on dataURL with exclude fragment\n // set to true.\n let input = URLSerializer(dataURL, true)\n\n // 3. Remove the leading \"data:\" string from input.\n input = input.slice(5)\n\n // 4. Let position point at the start of input.\n const position = { position: 0 }\n\n // 5. Let mimeType be the result of collecting a\n // sequence of code points that are not equal\n // to U+002C (,), given position.\n let mimeType = collectASequenceOfCodePointsFast(\n ',',\n input,\n position\n )\n\n // 6. Strip leading and trailing ASCII whitespace\n // from mimeType.\n // Undici implementation note: we need to store the\n // length because if the mimetype has spaces removed,\n // the wrong amount will be sliced from the input in\n // step #9\n const mimeTypeLength = mimeType.length\n mimeType = removeASCIIWhitespace(mimeType, true, true)\n\n // 7. If position is past the end of input, then\n // return failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 8. Advance position by 1.\n position.position++\n\n // 9. Let encodedBody be the remainder of input.\n const encodedBody = input.slice(mimeTypeLength + 1)\n\n // 10. Let body be the percent-decoding of encodedBody.\n let body = stringPercentDecode(encodedBody)\n\n // 11. If mimeType ends with U+003B (;), followed by\n // zero or more U+0020 SPACE, followed by an ASCII\n // case-insensitive match for \"base64\", then:\n if (/;(\\u0020){0,}base64$/i.test(mimeType)) {\n // 1. Let stringBody be the isomorphic decode of body.\n const stringBody = isomorphicDecode(body)\n\n // 2. Set body to the forgiving-base64 decode of\n // stringBody.\n body = forgivingBase64(stringBody)\n\n // 3. If body is failure, then return failure.\n if (body === 'failure') {\n return 'failure'\n }\n\n // 4. Remove the last 6 code points from mimeType.\n mimeType = mimeType.slice(0, -6)\n\n // 5. Remove trailing U+0020 SPACE code points from mimeType,\n // if any.\n mimeType = mimeType.replace(/(\\u0020)+$/, '')\n\n // 6. Remove the last U+003B (;) code point from mimeType.\n mimeType = mimeType.slice(0, -1)\n }\n\n // 12. If mimeType starts with U+003B (;), then prepend\n // \"text/plain\" to mimeType.\n if (mimeType.startsWith(';')) {\n mimeType = 'text/plain' + mimeType\n }\n\n // 13. Let mimeTypeRecord be the result of parsing\n // mimeType.\n let mimeTypeRecord = parseMIMEType(mimeType)\n\n // 14. If mimeTypeRecord is failure, then set\n // mimeTypeRecord to text/plain;charset=US-ASCII.\n if (mimeTypeRecord === 'failure') {\n mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII')\n }\n\n // 15. Return a new data: URL struct whose MIME\n // type is mimeTypeRecord and body is body.\n // https://fetch.spec.whatwg.org/#data-url-struct\n return { mimeType: mimeTypeRecord, body }\n}\n\n// https://url.spec.whatwg.org/#concept-url-serializer\n/**\n * @param {URL} url\n * @param {boolean} excludeFragment\n */\nfunction URLSerializer (url, excludeFragment = false) {\n if (!excludeFragment) {\n return url.href\n }\n\n const href = url.href\n const hashLength = url.hash.length\n\n return hashLength === 0 ? href : href.substring(0, href.length - hashLength)\n}\n\n// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n/**\n * @param {(char: string) => boolean} condition\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePoints (condition, input, position) {\n // 1. Let result be the empty string.\n let result = ''\n\n // 2. While position doesn’t point past the end of input and the\n // code point at position within input meets the condition condition:\n while (position.position < input.length && condition(input[position.position])) {\n // 1. Append that code point to the end of result.\n result += input[position.position]\n\n // 2. Advance position by 1.\n position.position++\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * A faster collectASequenceOfCodePoints that only works when comparing a single character.\n * @param {string} char\n * @param {string} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfCodePointsFast (char, input, position) {\n const idx = input.indexOf(char, position.position)\n const start = position.position\n\n if (idx === -1) {\n position.position = input.length\n return input.slice(start)\n }\n\n position.position = idx\n return input.slice(start, position.position)\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\n/** @param {string} input */\nfunction stringPercentDecode (input) {\n // 1. Let bytes be the UTF-8 encoding of input.\n const bytes = encoder.encode(input)\n\n // 2. Return the percent-decoding of bytes.\n return percentDecode(bytes)\n}\n\n// https://url.spec.whatwg.org/#percent-decode\n/** @param {Uint8Array} input */\nfunction percentDecode (input) {\n // 1. Let output be an empty byte sequence.\n /** @type {number[]} */\n const output = []\n\n // 2. For each byte byte in input:\n for (let i = 0; i < input.length; i++) {\n const byte = input[i]\n\n // 1. If byte is not 0x25 (%), then append byte to output.\n if (byte !== 0x25) {\n output.push(byte)\n\n // 2. Otherwise, if byte is 0x25 (%) and the next two bytes\n // after byte in input are not in the ranges\n // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),\n // and 0x61 (a) to 0x66 (f), all inclusive, append byte\n // to output.\n } else if (\n byte === 0x25 &&\n !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))\n ) {\n output.push(0x25)\n\n // 3. Otherwise:\n } else {\n // 1. Let bytePoint be the two bytes after byte in input,\n // decoded, and then interpreted as hexadecimal number.\n const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2])\n const bytePoint = Number.parseInt(nextTwoBytes, 16)\n\n // 2. Append a byte whose value is bytePoint to output.\n output.push(bytePoint)\n\n // 3. Skip the next two bytes in input.\n i += 2\n }\n }\n\n // 3. Return output.\n return Uint8Array.from(output)\n}\n\n// https://mimesniff.spec.whatwg.org/#parse-a-mime-type\n/** @param {string} input */\nfunction parseMIMEType (input) {\n // 1. Remove any leading and trailing HTTP whitespace\n // from input.\n input = removeHTTPWhitespace(input, true, true)\n\n // 2. Let position be a position variable for input,\n // initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let type be the result of collecting a sequence\n // of code points that are not U+002F (/) from\n // input, given position.\n const type = collectASequenceOfCodePointsFast(\n '/',\n input,\n position\n )\n\n // 4. If type is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n // https://mimesniff.spec.whatwg.org/#http-token-code-point\n if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {\n return 'failure'\n }\n\n // 5. If position is past the end of input, then return\n // failure\n if (position.position > input.length) {\n return 'failure'\n }\n\n // 6. Advance position by 1. (This skips past U+002F (/).)\n position.position++\n\n // 7. Let subtype be the result of collecting a sequence of\n // code points that are not U+003B (;) from input, given\n // position.\n let subtype = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 8. Remove any trailing HTTP whitespace from subtype.\n subtype = removeHTTPWhitespace(subtype, false, true)\n\n // 9. If subtype is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {\n return 'failure'\n }\n\n const typeLowercase = type.toLowerCase()\n const subtypeLowercase = subtype.toLowerCase()\n\n // 10. Let mimeType be a new MIME type record whose type\n // is type, in ASCII lowercase, and subtype is subtype,\n // in ASCII lowercase.\n // https://mimesniff.spec.whatwg.org/#mime-type\n const mimeType = {\n type: typeLowercase,\n subtype: subtypeLowercase,\n /** @type {Map} */\n parameters: new Map(),\n // https://mimesniff.spec.whatwg.org/#mime-type-essence\n essence: `${typeLowercase}/${subtypeLowercase}`\n }\n\n // 11. While position is not past the end of input:\n while (position.position < input.length) {\n // 1. Advance position by 1. (This skips past U+003B (;).)\n position.position++\n\n // 2. Collect a sequence of code points that are HTTP\n // whitespace from input given position.\n collectASequenceOfCodePoints(\n // https://fetch.spec.whatwg.org/#http-whitespace\n char => HTTP_WHITESPACE_REGEX.test(char),\n input,\n position\n )\n\n // 3. Let parameterName be the result of collecting a\n // sequence of code points that are not U+003B (;)\n // or U+003D (=) from input, given position.\n let parameterName = collectASequenceOfCodePoints(\n (char) => char !== ';' && char !== '=',\n input,\n position\n )\n\n // 4. Set parameterName to parameterName, in ASCII\n // lowercase.\n parameterName = parameterName.toLowerCase()\n\n // 5. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 1. If the code point at position within input is\n // U+003B (;), then continue.\n if (input[position.position] === ';') {\n continue\n }\n\n // 2. Advance position by 1. (This skips past U+003D (=).)\n position.position++\n }\n\n // 6. If position is past the end of input, then break.\n if (position.position > input.length) {\n break\n }\n\n // 7. Let parameterValue be null.\n let parameterValue = null\n\n // 8. If the code point at position within input is\n // U+0022 (\"), then:\n if (input[position.position] === '\"') {\n // 1. Set parameterValue to the result of collecting\n // an HTTP quoted string from input, given position\n // and the extract-value flag.\n parameterValue = collectAnHTTPQuotedString(input, position, true)\n\n // 2. Collect a sequence of code points that are not\n // U+003B (;) from input, given position.\n collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 9. Otherwise:\n } else {\n // 1. Set parameterValue to the result of collecting\n // a sequence of code points that are not U+003B (;)\n // from input, given position.\n parameterValue = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 2. Remove any trailing HTTP whitespace from parameterValue.\n parameterValue = removeHTTPWhitespace(parameterValue, false, true)\n\n // 3. If parameterValue is the empty string, then continue.\n if (parameterValue.length === 0) {\n continue\n }\n }\n\n // 10. If all of the following are true\n // - parameterName is not the empty string\n // - parameterName solely contains HTTP token code points\n // - parameterValue solely contains HTTP quoted-string token code points\n // - mimeType’s parameters[parameterName] does not exist\n // then set mimeType’s parameters[parameterName] to parameterValue.\n if (\n parameterName.length !== 0 &&\n HTTP_TOKEN_CODEPOINTS.test(parameterName) &&\n (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) &&\n !mimeType.parameters.has(parameterName)\n ) {\n mimeType.parameters.set(parameterName, parameterValue)\n }\n }\n\n // 12. Return mimeType.\n return mimeType\n}\n\n// https://infra.spec.whatwg.org/#forgiving-base64-decode\n/** @param {string} data */\nfunction forgivingBase64 (data) {\n // 1. Remove all ASCII whitespace from data.\n data = data.replace(/[\\u0009\\u000A\\u000C\\u000D\\u0020]/g, '') // eslint-disable-line\n\n // 2. If data’s code point length divides by 4 leaving\n // no remainder, then:\n if (data.length % 4 === 0) {\n // 1. If data ends with one or two U+003D (=) code points,\n // then remove them from data.\n data = data.replace(/=?=$/, '')\n }\n\n // 3. If data’s code point length divides by 4 leaving\n // a remainder of 1, then return failure.\n if (data.length % 4 === 1) {\n return 'failure'\n }\n\n // 4. If data contains a code point that is not one of\n // U+002B (+)\n // U+002F (/)\n // ASCII alphanumeric\n // then return failure.\n if (/[^+/0-9A-Za-z]/.test(data)) {\n return 'failure'\n }\n\n const binary = atob(data)\n const bytes = new Uint8Array(binary.length)\n\n for (let byte = 0; byte < binary.length; byte++) {\n bytes[byte] = binary.charCodeAt(byte)\n }\n\n return bytes\n}\n\n// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string\n// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string\n/**\n * @param {string} input\n * @param {{ position: number }} position\n * @param {boolean?} extractValue\n */\nfunction collectAnHTTPQuotedString (input, position, extractValue) {\n // 1. Let positionStart be position.\n const positionStart = position.position\n\n // 2. Let value be the empty string.\n let value = ''\n\n // 3. Assert: the code point at position within input\n // is U+0022 (\").\n assert(input[position.position] === '\"')\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. While true:\n while (true) {\n // 1. Append the result of collecting a sequence of code points\n // that are not U+0022 (\") or U+005C (\\) from input, given\n // position, to value.\n value += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== '\\\\',\n input,\n position\n )\n\n // 2. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 3. Let quoteOrBackslash be the code point at position within\n // input.\n const quoteOrBackslash = input[position.position]\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. If quoteOrBackslash is U+005C (\\), then:\n if (quoteOrBackslash === '\\\\') {\n // 1. If position is past the end of input, then append\n // U+005C (\\) to value and break.\n if (position.position >= input.length) {\n value += '\\\\'\n break\n }\n\n // 2. Append the code point at position within input to value.\n value += input[position.position]\n\n // 3. Advance position by 1.\n position.position++\n\n // 6. Otherwise:\n } else {\n // 1. Assert: quoteOrBackslash is U+0022 (\").\n assert(quoteOrBackslash === '\"')\n\n // 2. Break.\n break\n }\n }\n\n // 6. If the extract-value flag is set, then return value.\n if (extractValue) {\n return value\n }\n\n // 7. Return the code points from positionStart to position,\n // inclusive, within input.\n return input.slice(positionStart, position.position)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\n */\nfunction serializeAMimeType (mimeType) {\n assert(mimeType !== 'failure')\n const { parameters, essence } = mimeType\n\n // 1. Let serialization be the concatenation of mimeType’s\n // type, U+002F (/), and mimeType’s subtype.\n let serialization = essence\n\n // 2. For each name → value of mimeType’s parameters:\n for (let [name, value] of parameters.entries()) {\n // 1. Append U+003B (;) to serialization.\n serialization += ';'\n\n // 2. Append name to serialization.\n serialization += name\n\n // 3. Append U+003D (=) to serialization.\n serialization += '='\n\n // 4. If value does not solely contain HTTP token code\n // points or value is the empty string, then:\n if (!HTTP_TOKEN_CODEPOINTS.test(value)) {\n // 1. Precede each occurence of U+0022 (\") or\n // U+005C (\\) in value with U+005C (\\).\n value = value.replace(/(\\\\|\")/g, '\\\\$1')\n\n // 2. Prepend U+0022 (\") to value.\n value = '\"' + value\n\n // 3. Append U+0022 (\") to value.\n value += '\"'\n }\n\n // 5. Append value to serialization.\n serialization += value\n }\n\n // 3. Return serialization.\n return serialization\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} char\n */\nfunction isHTTPWhiteSpace (char) {\n return char === '\\r' || char === '\\n' || char === '\\t' || char === ' '\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} str\n */\nfunction removeHTTPWhitespace (str, leading = true, trailing = true) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++);\n }\n\n if (trailing) {\n for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--);\n }\n\n return str.slice(lead, trail + 1)\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n * @param {string} char\n */\nfunction isASCIIWhitespace (char) {\n return char === '\\r' || char === '\\n' || char === '\\t' || char === '\\f' || char === ' '\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace\n */\nfunction removeASCIIWhitespace (str, leading = true, trailing = true) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++);\n }\n\n if (trailing) {\n for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--);\n }\n\n return str.slice(lead, trail + 1)\n}\n\nmodule.exports = {\n dataURLProcessor,\n URLSerializer,\n collectASequenceOfCodePoints,\n collectASequenceOfCodePointsFast,\n stringPercentDecode,\n parseMIMEType,\n collectAnHTTPQuotedString,\n serializeAMimeType\n}\n","'use strict'\n\nconst { Blob, File: NativeFile } = require('buffer')\nconst { types } = require('util')\nconst { kState } = require('./symbols')\nconst { isBlobLike } = require('./util')\nconst { webidl } = require('./webidl')\nconst { parseMIMEType, serializeAMimeType } = require('./dataURL')\nconst { kEnumerableProperty } = require('../core/util')\nconst encoder = new TextEncoder()\n\nclass File extends Blob {\n constructor (fileBits, fileName, options = {}) {\n // The File constructor is invoked with two or three parameters, depending\n // on whether the optional dictionary parameter is used. When the File()\n // constructor is invoked, user agents must run the following steps:\n webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' })\n\n fileBits = webidl.converters['sequence'](fileBits)\n fileName = webidl.converters.USVString(fileName)\n options = webidl.converters.FilePropertyBag(options)\n\n // 1. Let bytes be the result of processing blob parts given fileBits and\n // options.\n // Note: Blob handles this for us\n\n // 2. Let n be the fileName argument to the constructor.\n const n = fileName\n\n // 3. Process FilePropertyBag dictionary argument by running the following\n // substeps:\n\n // 1. If the type member is provided and is not the empty string, let t\n // be set to the type dictionary member. If t contains any characters\n // outside the range U+0020 to U+007E, then set t to the empty string\n // and return from these substeps.\n // 2. Convert every character in t to ASCII lowercase.\n let t = options.type\n let d\n\n // eslint-disable-next-line no-labels\n substep: {\n if (t) {\n t = parseMIMEType(t)\n\n if (t === 'failure') {\n t = ''\n // eslint-disable-next-line no-labels\n break substep\n }\n\n t = serializeAMimeType(t).toLowerCase()\n }\n\n // 3. If the lastModified member is provided, let d be set to the\n // lastModified dictionary member. If it is not provided, set d to the\n // current date and time represented as the number of milliseconds since\n // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).\n d = options.lastModified\n }\n\n // 4. Return a new File object F such that:\n // F refers to the bytes byte sequence.\n // F.size is set to the number of total bytes in bytes.\n // F.name is set to n.\n // F.type is set to t.\n // F.lastModified is set to d.\n\n super(processBlobParts(fileBits, options), { type: t })\n this[kState] = {\n name: n,\n lastModified: d,\n type: t\n }\n }\n\n get name () {\n webidl.brandCheck(this, File)\n\n return this[kState].name\n }\n\n get lastModified () {\n webidl.brandCheck(this, File)\n\n return this[kState].lastModified\n }\n\n get type () {\n webidl.brandCheck(this, File)\n\n return this[kState].type\n }\n}\n\nclass FileLike {\n constructor (blobLike, fileName, options = {}) {\n // TODO: argument idl type check\n\n // The File constructor is invoked with two or three parameters, depending\n // on whether the optional dictionary parameter is used. When the File()\n // constructor is invoked, user agents must run the following steps:\n\n // 1. Let bytes be the result of processing blob parts given fileBits and\n // options.\n\n // 2. Let n be the fileName argument to the constructor.\n const n = fileName\n\n // 3. Process FilePropertyBag dictionary argument by running the following\n // substeps:\n\n // 1. If the type member is provided and is not the empty string, let t\n // be set to the type dictionary member. If t contains any characters\n // outside the range U+0020 to U+007E, then set t to the empty string\n // and return from these substeps.\n // TODO\n const t = options.type\n\n // 2. Convert every character in t to ASCII lowercase.\n // TODO\n\n // 3. If the lastModified member is provided, let d be set to the\n // lastModified dictionary member. If it is not provided, set d to the\n // current date and time represented as the number of milliseconds since\n // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]).\n const d = options.lastModified ?? Date.now()\n\n // 4. Return a new File object F such that:\n // F refers to the bytes byte sequence.\n // F.size is set to the number of total bytes in bytes.\n // F.name is set to n.\n // F.type is set to t.\n // F.lastModified is set to d.\n\n this[kState] = {\n blobLike,\n name: n,\n type: t,\n lastModified: d\n }\n }\n\n stream (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.stream(...args)\n }\n\n arrayBuffer (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.arrayBuffer(...args)\n }\n\n slice (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.slice(...args)\n }\n\n text (...args) {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.text(...args)\n }\n\n get size () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.size\n }\n\n get type () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].blobLike.type\n }\n\n get name () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].name\n }\n\n get lastModified () {\n webidl.brandCheck(this, FileLike)\n\n return this[kState].lastModified\n }\n\n get [Symbol.toStringTag] () {\n return 'File'\n }\n}\n\nObject.defineProperties(File.prototype, {\n [Symbol.toStringTag]: {\n value: 'File',\n configurable: true\n },\n name: kEnumerableProperty,\n lastModified: kEnumerableProperty\n})\n\nwebidl.converters.Blob = webidl.interfaceConverter(Blob)\n\nwebidl.converters.BlobPart = function (V, opts) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (\n ArrayBuffer.isView(V) ||\n types.isAnyArrayBuffer(V)\n ) {\n return webidl.converters.BufferSource(V, opts)\n }\n }\n\n return webidl.converters.USVString(V, opts)\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.BlobPart\n)\n\n// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag\nwebidl.converters.FilePropertyBag = webidl.dictionaryConverter([\n {\n key: 'lastModified',\n converter: webidl.converters['long long'],\n get defaultValue () {\n return Date.now()\n }\n },\n {\n key: 'type',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'endings',\n converter: (value) => {\n value = webidl.converters.DOMString(value)\n value = value.toLowerCase()\n\n if (value !== 'native') {\n value = 'transparent'\n }\n\n return value\n },\n defaultValue: 'transparent'\n }\n])\n\n/**\n * @see https://www.w3.org/TR/FileAPI/#process-blob-parts\n * @param {(NodeJS.TypedArray|Blob|string)[]} parts\n * @param {{ type: string, endings: string }} options\n */\nfunction processBlobParts (parts, options) {\n // 1. Let bytes be an empty sequence of bytes.\n /** @type {NodeJS.TypedArray[]} */\n const bytes = []\n\n // 2. For each element in parts:\n for (const element of parts) {\n // 1. If element is a USVString, run the following substeps:\n if (typeof element === 'string') {\n // 1. Let s be element.\n let s = element\n\n // 2. If the endings member of options is \"native\", set s\n // to the result of converting line endings to native\n // of element.\n if (options.endings === 'native') {\n s = convertLineEndingsNative(s)\n }\n\n // 3. Append the result of UTF-8 encoding s to bytes.\n bytes.push(encoder.encode(s))\n } else if (\n types.isAnyArrayBuffer(element) ||\n types.isTypedArray(element)\n ) {\n // 2. If element is a BufferSource, get a copy of the\n // bytes held by the buffer source, and append those\n // bytes to bytes.\n if (!element.buffer) { // ArrayBuffer\n bytes.push(new Uint8Array(element))\n } else {\n bytes.push(\n new Uint8Array(element.buffer, element.byteOffset, element.byteLength)\n )\n }\n } else if (isBlobLike(element)) {\n // 3. If element is a Blob, append the bytes it represents\n // to bytes.\n bytes.push(element)\n }\n }\n\n // 3. Return bytes.\n return bytes\n}\n\n/**\n * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native\n * @param {string} s\n */\nfunction convertLineEndingsNative (s) {\n // 1. Let native line ending be be the code point U+000A LF.\n let nativeLineEnding = '\\n'\n\n // 2. If the underlying platform’s conventions are to\n // represent newlines as a carriage return and line feed\n // sequence, set native line ending to the code point\n // U+000D CR followed by the code point U+000A LF.\n if (process.platform === 'win32') {\n nativeLineEnding = '\\r\\n'\n }\n\n return s.replace(/\\r?\\n/g, nativeLineEnding)\n}\n\n// If this function is moved to ./util.js, some tools (such as\n// rollup) will warn about circular dependencies. See:\n// https://github.com/nodejs/undici/issues/1629\nfunction isFileLike (object) {\n return (\n (NativeFile && object instanceof NativeFile) ||\n object instanceof File || (\n object &&\n (typeof object.stream === 'function' ||\n typeof object.arrayBuffer === 'function') &&\n object[Symbol.toStringTag] === 'File'\n )\n )\n}\n\nmodule.exports = { File, FileLike, isFileLike }\n","'use strict'\n\nconst { isBlobLike, toUSVString, makeIterator } = require('./util')\nconst { kState } = require('./symbols')\nconst { File: UndiciFile, FileLike, isFileLike } = require('./file')\nconst { webidl } = require('./webidl')\nconst { Blob, File: NativeFile } = require('buffer')\n\n/** @type {globalThis['File']} */\nconst File = NativeFile ?? UndiciFile\n\n// https://xhr.spec.whatwg.org/#formdata\nclass FormData {\n constructor (form) {\n if (form !== undefined) {\n throw webidl.errors.conversionFailed({\n prefix: 'FormData constructor',\n argument: 'Argument 1',\n types: ['undefined']\n })\n }\n\n this[kState] = []\n }\n\n append (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' })\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name)\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, { strict: false })\n : webidl.converters.USVString(value)\n filename = arguments.length === 3\n ? webidl.converters.USVString(filename)\n : undefined\n\n // 2. Let entry be the result of creating an entry with\n // name, value, and filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. Append entry to this’s entry list.\n this[kState].push(entry)\n }\n\n delete (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' })\n\n name = webidl.converters.USVString(name)\n\n // The delete(name) method steps are to remove all entries whose name\n // is name from this’s entry list.\n this[kState] = this[kState].filter(entry => entry.name !== name)\n }\n\n get (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' })\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this’s entry list,\n // then return null.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx === -1) {\n return null\n }\n\n // 2. Return the value of the first entry whose name is name from\n // this’s entry list.\n return this[kState][idx].value\n }\n\n getAll (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' })\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this’s entry list,\n // then return the empty list.\n // 2. Return the values of all entries whose name is name, in order,\n // from this’s entry list.\n return this[kState]\n .filter((entry) => entry.name === name)\n .map((entry) => entry.value)\n }\n\n has (name) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' })\n\n name = webidl.converters.USVString(name)\n\n // The has(name) method steps are to return true if there is an entry\n // whose name is name in this’s entry list; otherwise false.\n return this[kState].findIndex((entry) => entry.name === name) !== -1\n }\n\n set (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' })\n\n if (arguments.length === 3 && !isBlobLike(value)) {\n throw new TypeError(\n \"Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'\"\n )\n }\n\n // The set(name, value) and set(name, blobValue, filename) method steps\n // are:\n\n // 1. Let value be value if given; otherwise blobValue.\n\n name = webidl.converters.USVString(name)\n value = isBlobLike(value)\n ? webidl.converters.Blob(value, { strict: false })\n : webidl.converters.USVString(value)\n filename = arguments.length === 3\n ? toUSVString(filename)\n : undefined\n\n // 2. Let entry be the result of creating an entry with name, value, and\n // filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. If there are entries in this’s entry list whose name is name, then\n // replace the first such entry with entry and remove the others.\n const idx = this[kState].findIndex((entry) => entry.name === name)\n if (idx !== -1) {\n this[kState] = [\n ...this[kState].slice(0, idx),\n entry,\n ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name)\n ]\n } else {\n // 4. Otherwise, append entry to this’s entry list.\n this[kState].push(entry)\n }\n }\n\n entries () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'key+value'\n )\n }\n\n keys () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'key'\n )\n }\n\n values () {\n webidl.brandCheck(this, FormData)\n\n return makeIterator(\n () => this[kState].map(pair => [pair.name, pair.value]),\n 'FormData',\n 'value'\n )\n }\n\n /**\n * @param {(value: string, key: string, self: FormData) => void} callbackFn\n * @param {unknown} thisArg\n */\n forEach (callbackFn, thisArg = globalThis) {\n webidl.brandCheck(this, FormData)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' })\n\n if (typeof callbackFn !== 'function') {\n throw new TypeError(\n \"Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.\"\n )\n }\n\n for (const [key, value] of this) {\n callbackFn.apply(thisArg, [value, key, this])\n }\n }\n}\n\nFormData.prototype[Symbol.iterator] = FormData.prototype.entries\n\nObject.defineProperties(FormData.prototype, {\n [Symbol.toStringTag]: {\n value: 'FormData',\n configurable: true\n }\n})\n\n/**\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry\n * @param {string} name\n * @param {string|Blob} value\n * @param {?string} filename\n * @returns\n */\nfunction makeEntry (name, value, filename) {\n // 1. Set name to the result of converting name into a scalar value string.\n // \"To convert a string into a scalar value string, replace any surrogates\n // with U+FFFD.\"\n // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end\n name = Buffer.from(name).toString('utf8')\n\n // 2. If value is a string, then set value to the result of converting\n // value into a scalar value string.\n if (typeof value === 'string') {\n value = Buffer.from(value).toString('utf8')\n } else {\n // 3. Otherwise:\n\n // 1. If value is not a File object, then set value to a new File object,\n // representing the same bytes, whose name attribute value is \"blob\"\n if (!isFileLike(value)) {\n value = value instanceof Blob\n ? new File([value], 'blob', { type: value.type })\n : new FileLike(value, 'blob', { type: value.type })\n }\n\n // 2. If filename is given, then set value to a new File object,\n // representing the same bytes, whose name attribute is filename.\n if (filename !== undefined) {\n /** @type {FilePropertyBag} */\n const options = {\n type: value.type,\n lastModified: value.lastModified\n }\n\n value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile\n ? new File([value], filename, options)\n : new FileLike(value, filename, options)\n }\n }\n\n // 4. Return an entry whose name is name and whose value is value.\n return { name, value }\n}\n\nmodule.exports = { FormData }\n","'use strict'\n\n// In case of breaking changes, increase the version\n// number to avoid conflicts.\nconst globalOrigin = Symbol.for('undici.globalOrigin.1')\n\nfunction getGlobalOrigin () {\n return globalThis[globalOrigin]\n}\n\nfunction setGlobalOrigin (newOrigin) {\n if (newOrigin === undefined) {\n Object.defineProperty(globalThis, globalOrigin, {\n value: undefined,\n writable: true,\n enumerable: false,\n configurable: false\n })\n\n return\n }\n\n const parsedURL = new URL(newOrigin)\n\n if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {\n throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)\n }\n\n Object.defineProperty(globalThis, globalOrigin, {\n value: parsedURL,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nmodule.exports = {\n getGlobalOrigin,\n setGlobalOrigin\n}\n","// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst { kGuard } = require('./symbols')\nconst { kEnumerableProperty } = require('../core/util')\nconst {\n makeIterator,\n isValidHeaderName,\n isValidHeaderValue\n} = require('./util')\nconst { webidl } = require('./webidl')\nconst assert = require('assert')\n\nconst kHeadersMap = Symbol('headers map')\nconst kHeadersSortedMap = Symbol('headers map sorted')\n\n/**\n * @param {number} code\n */\nfunction isHTTPWhiteSpaceCharCode (code) {\n return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize\n * @param {string} potentialValue\n */\nfunction headerValueNormalize (potentialValue) {\n // To normalize a byte sequence potentialValue, remove\n // any leading and trailing HTTP whitespace bytes from\n // potentialValue.\n let i = 0; let j = potentialValue.length\n\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i\n\n return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j)\n}\n\nfunction fill (headers, object) {\n // To fill a Headers object headers with a given object object, run these steps:\n\n // 1. If object is a sequence, then for each header in object:\n // Note: webidl conversion to array has already been done.\n if (Array.isArray(object)) {\n for (let i = 0; i < object.length; ++i) {\n const header = object[i]\n // 1. If header does not contain exactly two items, then throw a TypeError.\n if (header.length !== 2) {\n throw webidl.errors.exception({\n header: 'Headers constructor',\n message: `expected name/value pair to be length 2, found ${header.length}.`\n })\n }\n\n // 2. Append (header’s first item, header’s second item) to headers.\n appendHeader(headers, header[0], header[1])\n }\n } else if (typeof object === 'object' && object !== null) {\n // Note: null should throw\n\n // 2. Otherwise, object is a record, then for each key → value in object,\n // append (key, value) to headers\n const keys = Object.keys(object)\n for (let i = 0; i < keys.length; ++i) {\n appendHeader(headers, keys[i], object[keys[i]])\n }\n } else {\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-headers-append\n */\nfunction appendHeader (headers, name, value) {\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value,\n type: 'header value'\n })\n }\n\n // 3. If headers’s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if headers’s guard is \"request\" and name is a\n // forbidden header name, return.\n // Note: undici does not implement forbidden header names\n if (headers[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (headers[kGuard] === 'request-no-cors') {\n // 5. Otherwise, if headers’s guard is \"request-no-cors\":\n // TODO\n }\n\n // 6. Otherwise, if headers’s guard is \"response\" and name is a\n // forbidden response-header name, return.\n\n // 7. Append (name, value) to headers’s header list.\n return headers[kHeadersList].append(name, value)\n\n // 8. If headers’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from headers\n}\n\nclass HeadersList {\n /** @type {[string, string][]|null} */\n cookies = null\n\n constructor (init) {\n if (init instanceof HeadersList) {\n this[kHeadersMap] = new Map(init[kHeadersMap])\n this[kHeadersSortedMap] = init[kHeadersSortedMap]\n this.cookies = init.cookies === null ? null : [...init.cookies]\n } else {\n this[kHeadersMap] = new Map(init)\n this[kHeadersSortedMap] = null\n }\n }\n\n // https://fetch.spec.whatwg.org/#header-list-contains\n contains (name) {\n // A header list list contains a header name name if list\n // contains a header whose name is a byte-case-insensitive\n // match for name.\n name = name.toLowerCase()\n\n return this[kHeadersMap].has(name)\n }\n\n clear () {\n this[kHeadersMap].clear()\n this[kHeadersSortedMap] = null\n this.cookies = null\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-append\n append (name, value) {\n this[kHeadersSortedMap] = null\n\n // 1. If list contains name, then set name to the first such\n // header’s name.\n const lowercaseName = name.toLowerCase()\n const exists = this[kHeadersMap].get(lowercaseName)\n\n // 2. Append (name, value) to list.\n if (exists) {\n const delimiter = lowercaseName === 'cookie' ? '; ' : ', '\n this[kHeadersMap].set(lowercaseName, {\n name: exists.name,\n value: `${exists.value}${delimiter}${value}`\n })\n } else {\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n if (lowercaseName === 'set-cookie') {\n this.cookies ??= []\n this.cookies.push(value)\n }\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-set\n set (name, value) {\n this[kHeadersSortedMap] = null\n const lowercaseName = name.toLowerCase()\n\n if (lowercaseName === 'set-cookie') {\n this.cookies = [value]\n }\n\n // 1. If list contains name, then set the value of\n // the first such header to value and remove the\n // others.\n // 2. Otherwise, append header (name, value) to list.\n this[kHeadersMap].set(lowercaseName, { name, value })\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-delete\n delete (name) {\n this[kHeadersSortedMap] = null\n\n name = name.toLowerCase()\n\n if (name === 'set-cookie') {\n this.cookies = null\n }\n\n this[kHeadersMap].delete(name)\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-get\n get (name) {\n const value = this[kHeadersMap].get(name.toLowerCase())\n\n // 1. If list does not contain name, then return null.\n // 2. Return the values of all headers in list whose name\n // is a byte-case-insensitive match for name,\n // separated from each other by 0x2C 0x20, in order.\n return value === undefined ? null : value.value\n }\n\n * [Symbol.iterator] () {\n // use the lowercased name\n for (const [name, { value }] of this[kHeadersMap]) {\n yield [name, value]\n }\n }\n\n get entries () {\n const headers = {}\n\n if (this[kHeadersMap].size) {\n for (const { name, value } of this[kHeadersMap].values()) {\n headers[name] = value\n }\n }\n\n return headers\n }\n}\n\n// https://fetch.spec.whatwg.org/#headers-class\nclass Headers {\n constructor (init = undefined) {\n if (init === kConstruct) {\n return\n }\n this[kHeadersList] = new HeadersList()\n\n // The new Headers(init) constructor steps are:\n\n // 1. Set this’s guard to \"none\".\n this[kGuard] = 'none'\n\n // 2. If init is given, then fill this with init.\n if (init !== undefined) {\n init = webidl.converters.HeadersInit(init)\n fill(this, init)\n }\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-append\n append (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' })\n\n name = webidl.converters.ByteString(name)\n value = webidl.converters.ByteString(value)\n\n return appendHeader(this, name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-delete\n delete (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.delete',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. If this’s guard is \"immutable\", then throw a TypeError.\n // 3. Otherwise, if this’s guard is \"request\" and name is a\n // forbidden header name, return.\n // 4. Otherwise, if this’s guard is \"request-no-cors\", name\n // is not a no-CORS-safelisted request-header name, and\n // name is not a privileged no-CORS request-header name,\n // return.\n // 5. Otherwise, if this’s guard is \"response\" and name is\n // a forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (this[kGuard] === 'request-no-cors') {\n // TODO\n }\n\n // 6. If this’s header list does not contain name, then\n // return.\n if (!this[kHeadersList].contains(name)) {\n return\n }\n\n // 7. Delete name from this’s header list.\n // 8. If this’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this.\n this[kHeadersList].delete(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-get\n get (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.get',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return the result of getting name from this’s header\n // list.\n return this[kHeadersList].get(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-has\n has (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' })\n\n name = webidl.converters.ByteString(name)\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.has',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return true if this’s header list contains name;\n // otherwise false.\n return this[kHeadersList].contains(name)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-set\n set (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' })\n\n name = webidl.converters.ByteString(name)\n value = webidl.converters.ByteString(value)\n\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.set',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.set',\n value,\n type: 'header value'\n })\n }\n\n // 3. If this’s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if this’s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if this’s guard is \"request-no-cors\" and\n // name/value is not a no-CORS-safelisted request-header,\n // return.\n // 6. Otherwise, if this’s guard is \"response\" and name is a\n // forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this[kGuard] === 'immutable') {\n throw new TypeError('immutable')\n } else if (this[kGuard] === 'request-no-cors') {\n // TODO\n }\n\n // 7. Set (name, value) in this’s header list.\n // 8. If this’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this\n this[kHeadersList].set(name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie\n getSetCookie () {\n webidl.brandCheck(this, Headers)\n\n // 1. If this’s header list does not contain `Set-Cookie`, then return « ».\n // 2. Return the values of all headers in this’s header list whose name is\n // a byte-case-insensitive match for `Set-Cookie`, in order.\n\n const list = this[kHeadersList].cookies\n\n if (list) {\n return [...list]\n }\n\n return []\n }\n\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n get [kHeadersSortedMap] () {\n if (this[kHeadersList][kHeadersSortedMap]) {\n return this[kHeadersList][kHeadersSortedMap]\n }\n\n // 1. Let headers be an empty list of headers with the key being the name\n // and value the value.\n const headers = []\n\n // 2. Let names be the result of convert header names to a sorted-lowercase\n // set with all the names of the headers in list.\n const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1)\n const cookies = this[kHeadersList].cookies\n\n // 3. For each name of names:\n for (let i = 0; i < names.length; ++i) {\n const [name, value] = names[i]\n // 1. If name is `set-cookie`, then:\n if (name === 'set-cookie') {\n // 1. Let values be a list of all values of headers in list whose name\n // is a byte-case-insensitive match for name, in order.\n\n // 2. For each value of values:\n // 1. Append (name, value) to headers.\n for (let j = 0; j < cookies.length; ++j) {\n headers.push([name, cookies[j]])\n }\n } else {\n // 2. Otherwise:\n\n // 1. Let value be the result of getting name from list.\n\n // 2. Assert: value is non-null.\n assert(value !== null)\n\n // 3. Append (name, value) to headers.\n headers.push([name, value])\n }\n }\n\n this[kHeadersList][kHeadersSortedMap] = headers\n\n // 4. Return headers.\n return headers\n }\n\n keys () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'key')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'key'\n )\n }\n\n values () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'value')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'value'\n )\n }\n\n entries () {\n webidl.brandCheck(this, Headers)\n\n if (this[kGuard] === 'immutable') {\n const value = this[kHeadersSortedMap]\n return makeIterator(() => value, 'Headers',\n 'key+value')\n }\n\n return makeIterator(\n () => [...this[kHeadersSortedMap].values()],\n 'Headers',\n 'key+value'\n )\n }\n\n /**\n * @param {(value: string, key: string, self: Headers) => void} callbackFn\n * @param {unknown} thisArg\n */\n forEach (callbackFn, thisArg = globalThis) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' })\n\n if (typeof callbackFn !== 'function') {\n throw new TypeError(\n \"Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.\"\n )\n }\n\n for (const [key, value] of this) {\n callbackFn.apply(thisArg, [value, key, this])\n }\n }\n\n [Symbol.for('nodejs.util.inspect.custom')] () {\n webidl.brandCheck(this, Headers)\n\n return this[kHeadersList]\n }\n}\n\nHeaders.prototype[Symbol.iterator] = Headers.prototype.entries\n\nObject.defineProperties(Headers.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n getSetCookie: kEnumerableProperty,\n keys: kEnumerableProperty,\n values: kEnumerableProperty,\n entries: kEnumerableProperty,\n forEach: kEnumerableProperty,\n [Symbol.iterator]: { enumerable: false },\n [Symbol.toStringTag]: {\n value: 'Headers',\n configurable: true\n }\n})\n\nwebidl.converters.HeadersInit = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (V[Symbol.iterator]) {\n return webidl.converters['sequence>'](V)\n }\n\n return webidl.converters['record'](V)\n }\n\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n}\n\nmodule.exports = {\n fill,\n Headers,\n HeadersList\n}\n","// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst {\n Response,\n makeNetworkError,\n makeAppropriateNetworkError,\n filterResponse,\n makeResponse\n} = require('./response')\nconst { Headers } = require('./headers')\nconst { Request, makeRequest } = require('./request')\nconst zlib = require('zlib')\nconst {\n bytesMatch,\n makePolicyContainer,\n clonePolicyContainer,\n requestBadPort,\n TAOCheck,\n appendRequestOriginHeader,\n responseLocationURL,\n requestCurrentURL,\n setRequestReferrerPolicyOnRedirect,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n createOpaqueTimingInfo,\n appendFetchMetadata,\n corsCheck,\n crossOriginResourcePolicyCheck,\n determineRequestsReferrer,\n coarsenedSharedCurrentTime,\n createDeferredPromise,\n isBlobLike,\n sameOrigin,\n isCancelled,\n isAborted,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n isomorphicEncode,\n urlIsLocal,\n urlIsHttpHttpsScheme,\n urlHasHttpsScheme\n} = require('./util')\nconst { kState, kHeaders, kGuard, kRealm } = require('./symbols')\nconst assert = require('assert')\nconst { safelyExtractBody } = require('./body')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n safeMethodsSet,\n requestBodyHeader,\n subresourceSet,\n DOMException\n} = require('./constants')\nconst { kHeadersList } = require('../core/symbols')\nconst EE = require('events')\nconst { Readable, pipeline } = require('stream')\nconst { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require('../core/util')\nconst { dataURLProcessor, serializeAMimeType } = require('./dataURL')\nconst { TransformStream } = require('stream/web')\nconst { getGlobalDispatcher } = require('../global')\nconst { webidl } = require('./webidl')\nconst { STATUS_CODES } = require('http')\nconst GET_OR_HEAD = ['GET', 'HEAD']\n\n/** @type {import('buffer').resolveObjectURL} */\nlet resolveObjectURL\nlet ReadableStream = globalThis.ReadableStream\n\nclass Fetch extends EE {\n constructor (dispatcher) {\n super()\n\n this.dispatcher = dispatcher\n this.connection = null\n this.dump = false\n this.state = 'ongoing'\n // 2 terminated listeners get added per request,\n // but only 1 gets removed. If there are 20 redirects,\n // 21 listeners will be added.\n // See https://github.com/nodejs/undici/issues/1711\n // TODO (fix): Find and fix root cause for leaked listener.\n this.setMaxListeners(21)\n }\n\n terminate (reason) {\n if (this.state !== 'ongoing') {\n return\n }\n\n this.state = 'terminated'\n this.connection?.destroy(reason)\n this.emit('terminated', reason)\n }\n\n // https://fetch.spec.whatwg.org/#fetch-controller-abort\n abort (error) {\n if (this.state !== 'ongoing') {\n return\n }\n\n // 1. Set controller’s state to \"aborted\".\n this.state = 'aborted'\n\n // 2. Let fallbackError be an \"AbortError\" DOMException.\n // 3. Set error to fallbackError if it is not given.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 4. Let serializedError be StructuredSerialize(error).\n // If that threw an exception, catch it, and let\n // serializedError be StructuredSerialize(fallbackError).\n\n // 5. Set controller’s serialized abort reason to serializedError.\n this.serializedAbortReason = error\n\n this.connection?.destroy(error)\n this.emit('terminated', error)\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-method\nfunction fetch (input, init = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' })\n\n // 1. Let p be a new promise.\n const p = createDeferredPromise()\n\n // 2. Let requestObject be the result of invoking the initial value of\n // Request as constructor with input and init as arguments. If this throws\n // an exception, reject p with it and return p.\n let requestObject\n\n try {\n requestObject = new Request(input, init)\n } catch (e) {\n p.reject(e)\n return p.promise\n }\n\n // 3. Let request be requestObject’s request.\n const request = requestObject[kState]\n\n // 4. If requestObject’s signal’s aborted flag is set, then:\n if (requestObject.signal.aborted) {\n // 1. Abort the fetch() call with p, request, null, and\n // requestObject’s signal’s abort reason.\n abortFetch(p, request, null, requestObject.signal.reason)\n\n // 2. Return p.\n return p.promise\n }\n\n // 5. Let globalObject be request’s client’s global object.\n const globalObject = request.client.globalObject\n\n // 6. If globalObject is a ServiceWorkerGlobalScope object, then set\n // request’s service-workers mode to \"none\".\n if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') {\n request.serviceWorkers = 'none'\n }\n\n // 7. Let responseObject be null.\n let responseObject = null\n\n // 8. Let relevantRealm be this’s relevant Realm.\n const relevantRealm = null\n\n // 9. Let locallyAborted be false.\n let locallyAborted = false\n\n // 10. Let controller be null.\n let controller = null\n\n // 11. Add the following abort steps to requestObject’s signal:\n addAbortListener(\n requestObject.signal,\n () => {\n // 1. Set locallyAborted to true.\n locallyAborted = true\n\n // 2. Assert: controller is non-null.\n assert(controller != null)\n\n // 3. Abort controller with requestObject’s signal’s abort reason.\n controller.abort(requestObject.signal.reason)\n\n // 4. Abort the fetch() call with p, request, responseObject,\n // and requestObject’s signal’s abort reason.\n abortFetch(p, request, responseObject, requestObject.signal.reason)\n }\n )\n\n // 12. Let handleFetchDone given response response be to finalize and\n // report timing with response, globalObject, and \"fetch\".\n const handleFetchDone = (response) =>\n finalizeAndReportTiming(response, 'fetch')\n\n // 13. Set controller to the result of calling fetch given request,\n // with processResponseEndOfBody set to handleFetchDone, and processResponse\n // given response being these substeps:\n\n const processResponse = (response) => {\n // 1. If locallyAborted is true, terminate these substeps.\n if (locallyAborted) {\n return Promise.resolve()\n }\n\n // 2. If response’s aborted flag is set, then:\n if (response.aborted) {\n // 1. Let deserializedError be the result of deserialize a serialized\n // abort reason given controller’s serialized abort reason and\n // relevantRealm.\n\n // 2. Abort the fetch() call with p, request, responseObject, and\n // deserializedError.\n\n abortFetch(p, request, responseObject, controller.serializedAbortReason)\n return Promise.resolve()\n }\n\n // 3. If response is a network error, then reject p with a TypeError\n // and terminate these substeps.\n if (response.type === 'error') {\n p.reject(\n Object.assign(new TypeError('fetch failed'), { cause: response.error })\n )\n return Promise.resolve()\n }\n\n // 4. Set responseObject to the result of creating a Response object,\n // given response, \"immutable\", and relevantRealm.\n responseObject = new Response()\n responseObject[kState] = response\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kHeadersList] = response.headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 5. Resolve p with responseObject.\n p.resolve(responseObject)\n }\n\n controller = fetching({\n request,\n processResponseEndOfBody: handleFetchDone,\n processResponse,\n dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici\n })\n\n // 14. Return p.\n return p.promise\n}\n\n// https://fetch.spec.whatwg.org/#finalize-and-report-timing\nfunction finalizeAndReportTiming (response, initiatorType = 'other') {\n // 1. If response is an aborted network error, then return.\n if (response.type === 'error' && response.aborted) {\n return\n }\n\n // 2. If response’s URL list is null or empty, then return.\n if (!response.urlList?.length) {\n return\n }\n\n // 3. Let originalURL be response’s URL list[0].\n const originalURL = response.urlList[0]\n\n // 4. Let timingInfo be response’s timing info.\n let timingInfo = response.timingInfo\n\n // 5. Let cacheState be response’s cache state.\n let cacheState = response.cacheState\n\n // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(originalURL)) {\n return\n }\n\n // 7. If timingInfo is null, then return.\n if (timingInfo === null) {\n return\n }\n\n // 8. If response’s timing allow passed flag is not set, then:\n if (!response.timingAllowPassed) {\n // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.\n timingInfo = createOpaqueTimingInfo({\n startTime: timingInfo.startTime\n })\n\n // 2. Set cacheState to the empty string.\n cacheState = ''\n }\n\n // 9. Set timingInfo’s end time to the coarsened shared current time\n // given global’s relevant settings object’s cross-origin isolated\n // capability.\n // TODO: given global’s relevant settings object’s cross-origin isolated\n // capability?\n timingInfo.endTime = coarsenedSharedCurrentTime()\n\n // 10. Set response’s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 11. Mark resource timing for timingInfo, originalURL, initiatorType,\n // global, and cacheState.\n markResourceTiming(\n timingInfo,\n originalURL,\n initiatorType,\n globalThis,\n cacheState\n )\n}\n\n// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing\nfunction markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) {\n if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) {\n performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState)\n }\n}\n\n// https://fetch.spec.whatwg.org/#abort-fetch\nfunction abortFetch (p, request, responseObject, error) {\n // Note: AbortSignal.reason was added in node v17.2.0\n // which would give us an undefined error to reject with.\n // Remove this once node v16 is no longer supported.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 1. Reject promise with error.\n p.reject(error)\n\n // 2. If request’s body is not null and is readable, then cancel request’s\n // body with error.\n if (request.body != null && isReadable(request.body?.stream)) {\n request.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n\n // 3. If responseObject is null, then return.\n if (responseObject == null) {\n return\n }\n\n // 4. Let response be responseObject’s response.\n const response = responseObject[kState]\n\n // 5. If response’s body is not null and is readable, then error response’s\n // body with error.\n if (response.body != null && isReadable(response.body?.stream)) {\n response.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetching\nfunction fetching ({\n request,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseEndOfBody,\n processResponseConsumeBody,\n useParallelQueue = false,\n dispatcher // undici\n}) {\n // 1. Let taskDestination be null.\n let taskDestination = null\n\n // 2. Let crossOriginIsolatedCapability be false.\n let crossOriginIsolatedCapability = false\n\n // 3. If request’s client is non-null, then:\n if (request.client != null) {\n // 1. Set taskDestination to request’s client’s global object.\n taskDestination = request.client.globalObject\n\n // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin\n // isolated capability.\n crossOriginIsolatedCapability =\n request.client.crossOriginIsolatedCapability\n }\n\n // 4. If useParallelQueue is true, then set taskDestination to the result of\n // starting a new parallel queue.\n // TODO\n\n // 5. Let timingInfo be a new fetch timing info whose start time and\n // post-redirect start time are the coarsened shared current time given\n // crossOriginIsolatedCapability.\n const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)\n const timingInfo = createOpaqueTimingInfo({\n startTime: currenTime\n })\n\n // 6. Let fetchParams be a new fetch params whose\n // request is request,\n // timing info is timingInfo,\n // process request body chunk length is processRequestBodyChunkLength,\n // process request end-of-body is processRequestEndOfBody,\n // process response is processResponse,\n // process response consume body is processResponseConsumeBody,\n // process response end-of-body is processResponseEndOfBody,\n // task destination is taskDestination,\n // and cross-origin isolated capability is crossOriginIsolatedCapability.\n const fetchParams = {\n controller: new Fetch(dispatcher),\n request,\n timingInfo,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseConsumeBody,\n processResponseEndOfBody,\n taskDestination,\n crossOriginIsolatedCapability\n }\n\n // 7. If request’s body is a byte sequence, then set request’s body to\n // request’s body as a body.\n // NOTE: Since fetching is only called from fetch, body should already be\n // extracted.\n assert(!request.body || request.body.stream)\n\n // 8. If request’s window is \"client\", then set request’s window to request’s\n // client, if request’s client’s global object is a Window object; otherwise\n // \"no-window\".\n if (request.window === 'client') {\n // TODO: What if request.client is null?\n request.window =\n request.client?.globalObject?.constructor?.name === 'Window'\n ? request.client\n : 'no-window'\n }\n\n // 9. If request’s origin is \"client\", then set request’s origin to request’s\n // client’s origin.\n if (request.origin === 'client') {\n // TODO: What if request.client is null?\n request.origin = request.client?.origin\n }\n\n // 10. If all of the following conditions are true:\n // TODO\n\n // 11. If request’s policy container is \"client\", then:\n if (request.policyContainer === 'client') {\n // 1. If request’s client is non-null, then set request’s policy\n // container to a clone of request’s client’s policy container. [HTML]\n if (request.client != null) {\n request.policyContainer = clonePolicyContainer(\n request.client.policyContainer\n )\n } else {\n // 2. Otherwise, set request’s policy container to a new policy\n // container.\n request.policyContainer = makePolicyContainer()\n }\n }\n\n // 12. If request’s header list does not contain `Accept`, then:\n if (!request.headersList.contains('accept')) {\n // 1. Let value be `*/*`.\n const value = '*/*'\n\n // 2. A user agent should set value to the first matching statement, if\n // any, switching on request’s destination:\n // \"document\"\n // \"frame\"\n // \"iframe\"\n // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`\n // \"image\"\n // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`\n // \"style\"\n // `text/css,*/*;q=0.1`\n // TODO\n\n // 3. Append `Accept`/value to request’s header list.\n request.headersList.append('accept', value)\n }\n\n // 13. If request’s header list does not contain `Accept-Language`, then\n // user agents should append `Accept-Language`/an appropriate value to\n // request’s header list.\n if (!request.headersList.contains('accept-language')) {\n request.headersList.append('accept-language', '*')\n }\n\n // 14. If request’s priority is null, then use request’s initiator and\n // destination appropriately in setting request’s priority to a\n // user-agent-defined object.\n if (request.priority === null) {\n // TODO\n }\n\n // 15. If request is a subresource request, then:\n if (subresourceSet.has(request.destination)) {\n // TODO\n }\n\n // 16. Run main fetch given fetchParams.\n mainFetch(fetchParams)\n .catch(err => {\n fetchParams.controller.terminate(err)\n })\n\n // 17. Return fetchParam's controller\n return fetchParams.controller\n}\n\n// https://fetch.spec.whatwg.org/#concept-main-fetch\nasync function mainFetch (fetchParams, recursive = false) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. If request’s local-URLs-only flag is set and request’s current URL is\n // not local, then set response to a network error.\n if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) {\n response = makeNetworkError('local URLs only')\n }\n\n // 4. Run report Content Security Policy violations for request.\n // TODO\n\n // 5. Upgrade request to a potentially trustworthy URL, if appropriate.\n tryUpgradeRequestToAPotentiallyTrustworthyURL(request)\n\n // 6. If should request be blocked due to a bad port, should fetching request\n // be blocked as mixed content, or should request be blocked by Content\n // Security Policy returns blocked, then set response to a network error.\n if (requestBadPort(request) === 'blocked') {\n response = makeNetworkError('bad port')\n }\n // TODO: should fetching request be blocked as mixed content?\n // TODO: should request be blocked by Content Security Policy?\n\n // 7. If request’s referrer policy is the empty string, then set request’s\n // referrer policy to request’s policy container’s referrer policy.\n if (request.referrerPolicy === '') {\n request.referrerPolicy = request.policyContainer.referrerPolicy\n }\n\n // 8. If request’s referrer is not \"no-referrer\", then set request’s\n // referrer to the result of invoking determine request’s referrer.\n if (request.referrer !== 'no-referrer') {\n request.referrer = determineRequestsReferrer(request)\n }\n\n // 9. Set request’s current URL’s scheme to \"https\" if all of the following\n // conditions are true:\n // - request’s current URL’s scheme is \"http\"\n // - request’s current URL’s host is a domain\n // - Matching request’s current URL’s host per Known HSTS Host Domain Name\n // Matching results in either a superdomain match with an asserted\n // includeSubDomains directive or a congruent match (with or without an\n // asserted includeSubDomains directive). [HSTS]\n // TODO\n\n // 10. If recursive is false, then run the remaining steps in parallel.\n // TODO\n\n // 11. If response is null, then set response to the result of running\n // the steps corresponding to the first matching statement:\n if (response === null) {\n response = await (async () => {\n const currentURL = requestCurrentURL(request)\n\n if (\n // - request’s current URL’s origin is same origin with request’s origin,\n // and request’s response tainting is \"basic\"\n (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') ||\n // request’s current URL’s scheme is \"data\"\n (currentURL.protocol === 'data:') ||\n // - request’s mode is \"navigate\" or \"websocket\"\n (request.mode === 'navigate' || request.mode === 'websocket')\n ) {\n // 1. Set request’s response tainting to \"basic\".\n request.responseTainting = 'basic'\n\n // 2. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request’s mode is \"same-origin\"\n if (request.mode === 'same-origin') {\n // 1. Return a network error.\n return makeNetworkError('request mode cannot be \"same-origin\"')\n }\n\n // request’s mode is \"no-cors\"\n if (request.mode === 'no-cors') {\n // 1. If request’s redirect mode is not \"follow\", then return a network\n // error.\n if (request.redirect !== 'follow') {\n return makeNetworkError(\n 'redirect mode cannot be \"follow\" for \"no-cors\" request'\n )\n }\n\n // 2. Set request’s response tainting to \"opaque\".\n request.responseTainting = 'opaque'\n\n // 3. Return the result of running scheme fetch given fetchParams.\n return await schemeFetch(fetchParams)\n }\n\n // request’s current URL’s scheme is not an HTTP(S) scheme\n if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) {\n // Return a network error.\n return makeNetworkError('URL scheme must be a HTTP(S) scheme')\n }\n\n // - request’s use-CORS-preflight flag is set\n // - request’s unsafe-request flag is set and either request’s method is\n // not a CORS-safelisted method or CORS-unsafe request-header names with\n // request’s header list is not empty\n // 1. Set request’s response tainting to \"cors\".\n // 2. Let corsWithPreflightResponse be the result of running HTTP fetch\n // given fetchParams and true.\n // 3. If corsWithPreflightResponse is a network error, then clear cache\n // entries using request.\n // 4. Return corsWithPreflightResponse.\n // TODO\n\n // Otherwise\n // 1. Set request’s response tainting to \"cors\".\n request.responseTainting = 'cors'\n\n // 2. Return the result of running HTTP fetch given fetchParams.\n return await httpFetch(fetchParams)\n })()\n }\n\n // 12. If recursive is true, then return response.\n if (recursive) {\n return response\n }\n\n // 13. If response is not a network error and response is not a filtered\n // response, then:\n if (response.status !== 0 && !response.internalResponse) {\n // If request’s response tainting is \"cors\", then:\n if (request.responseTainting === 'cors') {\n // 1. Let headerNames be the result of extracting header list values\n // given `Access-Control-Expose-Headers` and response’s header list.\n // TODO\n // 2. If request’s credentials mode is not \"include\" and headerNames\n // contains `*`, then set response’s CORS-exposed header-name list to\n // all unique header names in response’s header list.\n // TODO\n // 3. Otherwise, if headerNames is not null or failure, then set\n // response’s CORS-exposed header-name list to headerNames.\n // TODO\n }\n\n // Set response to the following filtered response with response as its\n // internal response, depending on request’s response tainting:\n if (request.responseTainting === 'basic') {\n response = filterResponse(response, 'basic')\n } else if (request.responseTainting === 'cors') {\n response = filterResponse(response, 'cors')\n } else if (request.responseTainting === 'opaque') {\n response = filterResponse(response, 'opaque')\n } else {\n assert(false)\n }\n }\n\n // 14. Let internalResponse be response, if response is a network error,\n // and response’s internal response otherwise.\n let internalResponse =\n response.status === 0 ? response : response.internalResponse\n\n // 15. If internalResponse’s URL list is empty, then set it to a clone of\n // request’s URL list.\n if (internalResponse.urlList.length === 0) {\n internalResponse.urlList.push(...request.urlList)\n }\n\n // 16. If request’s timing allow failed flag is unset, then set\n // internalResponse’s timing allow passed flag.\n if (!request.timingAllowFailed) {\n response.timingAllowPassed = true\n }\n\n // 17. If response is not a network error and any of the following returns\n // blocked\n // - should internalResponse to request be blocked as mixed content\n // - should internalResponse to request be blocked by Content Security Policy\n // - should internalResponse to request be blocked due to its MIME type\n // - should internalResponse to request be blocked due to nosniff\n // TODO\n\n // 18. If response’s type is \"opaque\", internalResponse’s status is 206,\n // internalResponse’s range-requested flag is set, and request’s header\n // list does not contain `Range`, then set response and internalResponse\n // to a network error.\n if (\n response.type === 'opaque' &&\n internalResponse.status === 206 &&\n internalResponse.rangeRequested &&\n !request.headers.contains('range')\n ) {\n response = internalResponse = makeNetworkError()\n }\n\n // 19. If response is not a network error and either request’s method is\n // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status,\n // set internalResponse’s body to null and disregard any enqueuing toward\n // it (if any).\n if (\n response.status !== 0 &&\n (request.method === 'HEAD' ||\n request.method === 'CONNECT' ||\n nullBodyStatus.includes(internalResponse.status))\n ) {\n internalResponse.body = null\n fetchParams.controller.dump = true\n }\n\n // 20. If request’s integrity metadata is not the empty string, then:\n if (request.integrity) {\n // 1. Let processBodyError be this step: run fetch finale given fetchParams\n // and a network error.\n const processBodyError = (reason) =>\n fetchFinale(fetchParams, makeNetworkError(reason))\n\n // 2. If request’s response tainting is \"opaque\", or response’s body is null,\n // then run processBodyError and abort these steps.\n if (request.responseTainting === 'opaque' || response.body == null) {\n processBodyError(response.error)\n return\n }\n\n // 3. Let processBody given bytes be these steps:\n const processBody = (bytes) => {\n // 1. If bytes do not match request’s integrity metadata,\n // then run processBodyError and abort these steps. [SRI]\n if (!bytesMatch(bytes, request.integrity)) {\n processBodyError('integrity mismatch')\n return\n }\n\n // 2. Set response’s body to bytes as a body.\n response.body = safelyExtractBody(bytes)[0]\n\n // 3. Run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n\n // 4. Fully read response’s body given processBody and processBodyError.\n await fullyReadBody(response.body, processBody, processBodyError)\n } else {\n // 21. Otherwise, run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-scheme-fetch\n// given a fetch params fetchParams\nfunction schemeFetch (fetchParams) {\n // Note: since the connection is destroyed on redirect, which sets fetchParams to a\n // cancelled state, we do not want this condition to trigger *unless* there have been\n // no redirects. See https://github.com/nodejs/undici/issues/1776\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {\n return Promise.resolve(makeAppropriateNetworkError(fetchParams))\n }\n\n // 2. Let request be fetchParams’s request.\n const { request } = fetchParams\n\n const { protocol: scheme } = requestCurrentURL(request)\n\n // 3. Switch on request’s current URL’s scheme and run the associated steps:\n switch (scheme) {\n case 'about:': {\n // If request’s current URL’s path is the string \"blank\", then return a new response\n // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) »,\n // and body is the empty byte sequence as a body.\n\n // Otherwise, return a network error.\n return Promise.resolve(makeNetworkError('about scheme is not supported'))\n }\n case 'blob:': {\n if (!resolveObjectURL) {\n resolveObjectURL = require('buffer').resolveObjectURL\n }\n\n // 1. Let blobURLEntry be request’s current URL’s blob URL entry.\n const blobURLEntry = requestCurrentURL(request)\n\n // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n // Buffer.resolveObjectURL does not ignore URL queries.\n if (blobURLEntry.search.length !== 0) {\n return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.'))\n }\n\n const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString())\n\n // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s\n // object is not a Blob object, then return a network error.\n if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) {\n return Promise.resolve(makeNetworkError('invalid method'))\n }\n\n // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object.\n const bodyWithType = safelyExtractBody(blobURLEntryObject)\n\n // 4. Let body be bodyWithType’s body.\n const body = bodyWithType[0]\n\n // 5. Let length be body’s length, serialized and isomorphic encoded.\n const length = isomorphicEncode(`${body.length}`)\n\n // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence.\n const type = bodyWithType[1] ?? ''\n\n // 7. Return a new response whose status message is `OK`, header list is\n // « (`Content-Length`, length), (`Content-Type`, type) », and body is body.\n const response = makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-length', { name: 'Content-Length', value: length }],\n ['content-type', { name: 'Content-Type', value: type }]\n ]\n })\n\n response.body = body\n\n return Promise.resolve(response)\n }\n case 'data:': {\n // 1. Let dataURLStruct be the result of running the\n // data: URL processor on request’s current URL.\n const currentURL = requestCurrentURL(request)\n const dataURLStruct = dataURLProcessor(currentURL)\n\n // 2. If dataURLStruct is failure, then return a\n // network error.\n if (dataURLStruct === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 3. Let mimeType be dataURLStruct’s MIME type, serialized.\n const mimeType = serializeAMimeType(dataURLStruct.mimeType)\n\n // 4. Return a response whose status message is `OK`,\n // header list is « (`Content-Type`, mimeType) »,\n // and body is dataURLStruct’s body as a body.\n return Promise.resolve(makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-type', { name: 'Content-Type', value: mimeType }]\n ],\n body: safelyExtractBody(dataURLStruct.body)[0]\n }))\n }\n case 'file:': {\n // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n // When in doubt, return a network error.\n return Promise.resolve(makeNetworkError('not implemented... yet...'))\n }\n case 'http:':\n case 'https:': {\n // Return the result of running HTTP fetch given fetchParams.\n\n return httpFetch(fetchParams)\n .catch((err) => makeNetworkError(err))\n }\n default: {\n return Promise.resolve(makeNetworkError('unknown scheme'))\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#finalize-response\nfunction finalizeResponse (fetchParams, response) {\n // 1. Set fetchParams’s request’s done flag.\n fetchParams.request.done = true\n\n // 2, If fetchParams’s process response done is not null, then queue a fetch\n // task to run fetchParams’s process response done given response, with\n // fetchParams’s task destination.\n if (fetchParams.processResponseDone != null) {\n queueMicrotask(() => fetchParams.processResponseDone(response))\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-finale\nfunction fetchFinale (fetchParams, response) {\n // 1. If response is a network error, then:\n if (response.type === 'error') {\n // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ».\n response.urlList = [fetchParams.request.urlList[0]]\n\n // 2. Set response’s timing info to the result of creating an opaque timing\n // info for fetchParams’s timing info.\n response.timingInfo = createOpaqueTimingInfo({\n startTime: fetchParams.timingInfo.startTime\n })\n }\n\n // 2. Let processResponseEndOfBody be the following steps:\n const processResponseEndOfBody = () => {\n // 1. Set fetchParams’s request’s done flag.\n fetchParams.request.done = true\n\n // If fetchParams’s process response end-of-body is not null,\n // then queue a fetch task to run fetchParams’s process response\n // end-of-body given response with fetchParams’s task destination.\n if (fetchParams.processResponseEndOfBody != null) {\n queueMicrotask(() => fetchParams.processResponseEndOfBody(response))\n }\n }\n\n // 3. If fetchParams’s process response is non-null, then queue a fetch task\n // to run fetchParams’s process response given response, with fetchParams’s\n // task destination.\n if (fetchParams.processResponse != null) {\n queueMicrotask(() => fetchParams.processResponse(response))\n }\n\n // 4. If response’s body is null, then run processResponseEndOfBody.\n if (response.body == null) {\n processResponseEndOfBody()\n } else {\n // 5. Otherwise:\n\n // 1. Let transformStream be a new a TransformStream.\n\n // 2. Let identityTransformAlgorithm be an algorithm which, given chunk,\n // enqueues chunk in transformStream.\n const identityTransformAlgorithm = (chunk, controller) => {\n controller.enqueue(chunk)\n }\n\n // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm\n // and flushAlgorithm set to processResponseEndOfBody.\n const transformStream = new TransformStream({\n start () {},\n transform: identityTransformAlgorithm,\n flush: processResponseEndOfBody\n }, {\n size () {\n return 1\n }\n }, {\n size () {\n return 1\n }\n })\n\n // 4. Set response’s body to the result of piping response’s body through transformStream.\n response.body = { stream: response.body.stream.pipeThrough(transformStream) }\n }\n\n // 6. If fetchParams’s process response consume body is non-null, then:\n if (fetchParams.processResponseConsumeBody != null) {\n // 1. Let processBody given nullOrBytes be this step: run fetchParams’s\n // process response consume body given response and nullOrBytes.\n const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes)\n\n // 2. Let processBodyError be this step: run fetchParams’s process\n // response consume body given response and failure.\n const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure)\n\n // 3. If response’s body is null, then queue a fetch task to run processBody\n // given null, with fetchParams’s task destination.\n if (response.body == null) {\n queueMicrotask(() => processBody(null))\n } else {\n // 4. Otherwise, fully read response’s body given processBody, processBodyError,\n // and fetchParams’s task destination.\n return fullyReadBody(response.body, processBody, processBodyError)\n }\n return Promise.resolve()\n }\n}\n\n// https://fetch.spec.whatwg.org/#http-fetch\nasync function httpFetch (fetchParams) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let actualResponse be null.\n let actualResponse = null\n\n // 4. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 5. If request’s service-workers mode is \"all\", then:\n if (request.serviceWorkers === 'all') {\n // TODO\n }\n\n // 6. If response is null, then:\n if (response === null) {\n // 1. If makeCORSPreflight is true and one of these conditions is true:\n // TODO\n\n // 2. If request’s redirect mode is \"follow\", then set request’s\n // service-workers mode to \"none\".\n if (request.redirect === 'follow') {\n request.serviceWorkers = 'none'\n }\n\n // 3. Set response and actualResponse to the result of running\n // HTTP-network-or-cache fetch given fetchParams.\n actualResponse = response = await httpNetworkOrCacheFetch(fetchParams)\n\n // 4. If request’s response tainting is \"cors\" and a CORS check\n // for request and response returns failure, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n corsCheck(request, response) === 'failure'\n ) {\n return makeNetworkError('cors failure')\n }\n\n // 5. If the TAO check for request and response returns failure, then set\n // request’s timing allow failed flag.\n if (TAOCheck(request, response) === 'failure') {\n request.timingAllowFailed = true\n }\n }\n\n // 7. If either request’s response tainting or response’s type\n // is \"opaque\", and the cross-origin resource policy check with\n // request’s origin, request’s client, request’s destination,\n // and actualResponse returns blocked, then return a network error.\n if (\n (request.responseTainting === 'opaque' || response.type === 'opaque') &&\n crossOriginResourcePolicyCheck(\n request.origin,\n request.client,\n request.destination,\n actualResponse\n ) === 'blocked'\n ) {\n return makeNetworkError('blocked')\n }\n\n // 8. If actualResponse’s status is a redirect status, then:\n if (redirectStatusSet.has(actualResponse.status)) {\n // 1. If actualResponse’s status is not 303, request’s body is not null,\n // and the connection uses HTTP/2, then user agents may, and are even\n // encouraged to, transmit an RST_STREAM frame.\n // See, https://github.com/whatwg/fetch/issues/1288\n if (request.redirect !== 'manual') {\n fetchParams.controller.connection.destroy()\n }\n\n // 2. Switch on request’s redirect mode:\n if (request.redirect === 'error') {\n // Set response to a network error.\n response = makeNetworkError('unexpected redirect')\n } else if (request.redirect === 'manual') {\n // Set response to an opaque-redirect filtered response whose internal\n // response is actualResponse.\n // NOTE(spec): On the web this would return an `opaqueredirect` response,\n // but that doesn't make sense server side.\n // See https://github.com/nodejs/undici/issues/1193.\n response = actualResponse\n } else if (request.redirect === 'follow') {\n // Set response to the result of running HTTP-redirect fetch given\n // fetchParams and response.\n response = await httpRedirectFetch(fetchParams, response)\n } else {\n assert(false)\n }\n }\n\n // 9. Set response’s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 10. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-redirect-fetch\nfunction httpRedirectFetch (fetchParams, response) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let actualResponse be response, if response is not a filtered response,\n // and response’s internal response otherwise.\n const actualResponse = response.internalResponse\n ? response.internalResponse\n : response\n\n // 3. Let locationURL be actualResponse’s location URL given request’s current\n // URL’s fragment.\n let locationURL\n\n try {\n locationURL = responseLocationURL(\n actualResponse,\n requestCurrentURL(request).hash\n )\n\n // 4. If locationURL is null, then return response.\n if (locationURL == null) {\n return response\n }\n } catch (err) {\n // 5. If locationURL is failure, then return a network error.\n return Promise.resolve(makeNetworkError(err))\n }\n\n // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network\n // error.\n if (!urlIsHttpHttpsScheme(locationURL)) {\n return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme'))\n }\n\n // 7. If request’s redirect count is 20, then return a network error.\n if (request.redirectCount === 20) {\n return Promise.resolve(makeNetworkError('redirect count exceeded'))\n }\n\n // 8. Increase request’s redirect count by 1.\n request.redirectCount += 1\n\n // 9. If request’s mode is \"cors\", locationURL includes credentials, and\n // request’s origin is not same origin with locationURL’s origin, then return\n // a network error.\n if (\n request.mode === 'cors' &&\n (locationURL.username || locationURL.password) &&\n !sameOrigin(request, locationURL)\n ) {\n return Promise.resolve(makeNetworkError('cross origin not allowed for request mode \"cors\"'))\n }\n\n // 10. If request’s response tainting is \"cors\" and locationURL includes\n // credentials, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n (locationURL.username || locationURL.password)\n ) {\n return Promise.resolve(makeNetworkError(\n 'URL cannot contain credentials for request mode \"cors\"'\n ))\n }\n\n // 11. If actualResponse’s status is not 303, request’s body is non-null,\n // and request’s body’s source is null, then return a network error.\n if (\n actualResponse.status !== 303 &&\n request.body != null &&\n request.body.source == null\n ) {\n return Promise.resolve(makeNetworkError())\n }\n\n // 12. If one of the following is true\n // - actualResponse’s status is 301 or 302 and request’s method is `POST`\n // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD`\n if (\n ([301, 302].includes(actualResponse.status) && request.method === 'POST') ||\n (actualResponse.status === 303 &&\n !GET_OR_HEAD.includes(request.method))\n ) {\n // then:\n // 1. Set request’s method to `GET` and request’s body to null.\n request.method = 'GET'\n request.body = null\n\n // 2. For each headerName of request-body-header name, delete headerName from\n // request’s header list.\n for (const headerName of requestBodyHeader) {\n request.headersList.delete(headerName)\n }\n }\n\n // 13. If request’s current URL’s origin is not same origin with locationURL’s\n // origin, then for each headerName of CORS non-wildcard request-header name,\n // delete headerName from request’s header list.\n if (!sameOrigin(requestCurrentURL(request), locationURL)) {\n // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name\n request.headersList.delete('authorization')\n\n // https://fetch.spec.whatwg.org/#authentication-entries\n request.headersList.delete('proxy-authorization', true)\n\n // \"Cookie\" and \"Host\" are forbidden request-headers, which undici doesn't implement.\n request.headersList.delete('cookie')\n request.headersList.delete('host')\n }\n\n // 14. If request’s body is non-null, then set request’s body to the first return\n // value of safely extracting request’s body’s source.\n if (request.body != null) {\n assert(request.body.source != null)\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 15. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 16. Set timingInfo’s redirect end time and post-redirect start time to the\n // coarsened shared current time given fetchParams’s cross-origin isolated\n // capability.\n timingInfo.redirectEndTime = timingInfo.postRedirectStartTime =\n coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n\n // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s\n // redirect start time to timingInfo’s start time.\n if (timingInfo.redirectStartTime === 0) {\n timingInfo.redirectStartTime = timingInfo.startTime\n }\n\n // 18. Append locationURL to request’s URL list.\n request.urlList.push(locationURL)\n\n // 19. Invoke set request’s referrer policy on redirect on request and\n // actualResponse.\n setRequestReferrerPolicyOnRedirect(request, actualResponse)\n\n // 20. Return the result of running main fetch given fetchParams and true.\n return mainFetch(fetchParams, true)\n}\n\n// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch\nasync function httpNetworkOrCacheFetch (\n fetchParams,\n isAuthenticationFetch = false,\n isNewConnectionFetch = false\n) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let httpFetchParams be null.\n let httpFetchParams = null\n\n // 3. Let httpRequest be null.\n let httpRequest = null\n\n // 4. Let response be null.\n let response = null\n\n // 5. Let storedResponse be null.\n // TODO: cache\n\n // 6. Let httpCache be null.\n const httpCache = null\n\n // 7. Let the revalidatingFlag be unset.\n const revalidatingFlag = false\n\n // 8. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If request’s window is \"no-window\" and request’s redirect mode is\n // \"error\", then set httpFetchParams to fetchParams and httpRequest to\n // request.\n if (request.window === 'no-window' && request.redirect === 'error') {\n httpFetchParams = fetchParams\n httpRequest = request\n } else {\n // Otherwise:\n\n // 1. Set httpRequest to a clone of request.\n httpRequest = makeRequest(request)\n\n // 2. Set httpFetchParams to a copy of fetchParams.\n httpFetchParams = { ...fetchParams }\n\n // 3. Set httpFetchParams’s request to httpRequest.\n httpFetchParams.request = httpRequest\n }\n\n // 3. Let includeCredentials be true if one of\n const includeCredentials =\n request.credentials === 'include' ||\n (request.credentials === 'same-origin' &&\n request.responseTainting === 'basic')\n\n // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s\n // body is non-null; otherwise null.\n const contentLength = httpRequest.body ? httpRequest.body.length : null\n\n // 5. Let contentLengthHeaderValue be null.\n let contentLengthHeaderValue = null\n\n // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or\n // `PUT`, then set contentLengthHeaderValue to `0`.\n if (\n httpRequest.body == null &&\n ['POST', 'PUT'].includes(httpRequest.method)\n ) {\n contentLengthHeaderValue = '0'\n }\n\n // 7. If contentLength is non-null, then set contentLengthHeaderValue to\n // contentLength, serialized and isomorphic encoded.\n if (contentLength != null) {\n contentLengthHeaderValue = isomorphicEncode(`${contentLength}`)\n }\n\n // 8. If contentLengthHeaderValue is non-null, then append\n // `Content-Length`/contentLengthHeaderValue to httpRequest’s header\n // list.\n if (contentLengthHeaderValue != null) {\n httpRequest.headersList.append('content-length', contentLengthHeaderValue)\n }\n\n // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,\n // contentLengthHeaderValue) to httpRequest’s header list.\n\n // 10. If contentLength is non-null and httpRequest’s keepalive is true,\n // then:\n if (contentLength != null && httpRequest.keepalive) {\n // NOTE: keepalive is a noop outside of browser context.\n }\n\n // 11. If httpRequest’s referrer is a URL, then append\n // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded,\n // to httpRequest’s header list.\n if (httpRequest.referrer instanceof URL) {\n httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href))\n }\n\n // 12. Append a request `Origin` header for httpRequest.\n appendRequestOriginHeader(httpRequest)\n\n // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA]\n appendFetchMetadata(httpRequest)\n\n // 14. If httpRequest’s header list does not contain `User-Agent`, then\n // user agents should append `User-Agent`/default `User-Agent` value to\n // httpRequest’s header list.\n if (!httpRequest.headersList.contains('user-agent')) {\n httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node')\n }\n\n // 15. If httpRequest’s cache mode is \"default\" and httpRequest’s header\n // list contains `If-Modified-Since`, `If-None-Match`,\n // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set\n // httpRequest’s cache mode to \"no-store\".\n if (\n httpRequest.cache === 'default' &&\n (httpRequest.headersList.contains('if-modified-since') ||\n httpRequest.headersList.contains('if-none-match') ||\n httpRequest.headersList.contains('if-unmodified-since') ||\n httpRequest.headersList.contains('if-match') ||\n httpRequest.headersList.contains('if-range'))\n ) {\n httpRequest.cache = 'no-store'\n }\n\n // 16. If httpRequest’s cache mode is \"no-cache\", httpRequest’s prevent\n // no-cache cache-control header modification flag is unset, and\n // httpRequest’s header list does not contain `Cache-Control`, then append\n // `Cache-Control`/`max-age=0` to httpRequest’s header list.\n if (\n httpRequest.cache === 'no-cache' &&\n !httpRequest.preventNoCacheCacheControlHeaderModification &&\n !httpRequest.headersList.contains('cache-control')\n ) {\n httpRequest.headersList.append('cache-control', 'max-age=0')\n }\n\n // 17. If httpRequest’s cache mode is \"no-store\" or \"reload\", then:\n if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') {\n // 1. If httpRequest’s header list does not contain `Pragma`, then append\n // `Pragma`/`no-cache` to httpRequest’s header list.\n if (!httpRequest.headersList.contains('pragma')) {\n httpRequest.headersList.append('pragma', 'no-cache')\n }\n\n // 2. If httpRequest’s header list does not contain `Cache-Control`,\n // then append `Cache-Control`/`no-cache` to httpRequest’s header list.\n if (!httpRequest.headersList.contains('cache-control')) {\n httpRequest.headersList.append('cache-control', 'no-cache')\n }\n }\n\n // 18. If httpRequest’s header list contains `Range`, then append\n // `Accept-Encoding`/`identity` to httpRequest’s header list.\n if (httpRequest.headersList.contains('range')) {\n httpRequest.headersList.append('accept-encoding', 'identity')\n }\n\n // 19. Modify httpRequest’s header list per HTTP. Do not append a given\n // header if httpRequest’s header list contains that header’s name.\n // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129\n if (!httpRequest.headersList.contains('accept-encoding')) {\n if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {\n httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate')\n } else {\n httpRequest.headersList.append('accept-encoding', 'gzip, deflate')\n }\n }\n\n httpRequest.headersList.delete('host')\n\n // 20. If includeCredentials is true, then:\n if (includeCredentials) {\n // 1. If the user agent is not configured to block cookies for httpRequest\n // (see section 7 of [COOKIES]), then:\n // TODO: credentials\n // 2. If httpRequest’s header list does not contain `Authorization`, then:\n // TODO: credentials\n }\n\n // 21. If there’s a proxy-authentication entry, use it as appropriate.\n // TODO: proxy-authentication\n\n // 22. Set httpCache to the result of determining the HTTP cache\n // partition, given httpRequest.\n // TODO: cache\n\n // 23. If httpCache is null, then set httpRequest’s cache mode to\n // \"no-store\".\n if (httpCache == null) {\n httpRequest.cache = 'no-store'\n }\n\n // 24. If httpRequest’s cache mode is neither \"no-store\" nor \"reload\",\n // then:\n if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') {\n // TODO: cache\n }\n\n // 9. If aborted, then return the appropriate network error for fetchParams.\n // TODO\n\n // 10. If response is null, then:\n if (response == null) {\n // 1. If httpRequest’s cache mode is \"only-if-cached\", then return a\n // network error.\n if (httpRequest.mode === 'only-if-cached') {\n return makeNetworkError('only if cached')\n }\n\n // 2. Let forwardResponse be the result of running HTTP-network fetch\n // given httpFetchParams, includeCredentials, and isNewConnectionFetch.\n const forwardResponse = await httpNetworkFetch(\n httpFetchParams,\n includeCredentials,\n isNewConnectionFetch\n )\n\n // 3. If httpRequest’s method is unsafe and forwardResponse’s status is\n // in the range 200 to 399, inclusive, invalidate appropriate stored\n // responses in httpCache, as per the \"Invalidation\" chapter of HTTP\n // Caching, and set storedResponse to null. [HTTP-CACHING]\n if (\n !safeMethodsSet.has(httpRequest.method) &&\n forwardResponse.status >= 200 &&\n forwardResponse.status <= 399\n ) {\n // TODO: cache\n }\n\n // 4. If the revalidatingFlag is set and forwardResponse’s status is 304,\n // then:\n if (revalidatingFlag && forwardResponse.status === 304) {\n // TODO: cache\n }\n\n // 5. If response is null, then:\n if (response == null) {\n // 1. Set response to forwardResponse.\n response = forwardResponse\n\n // 2. Store httpRequest and forwardResponse in httpCache, as per the\n // \"Storing Responses in Caches\" chapter of HTTP Caching. [HTTP-CACHING]\n // TODO: cache\n }\n }\n\n // 11. Set response’s URL list to a clone of httpRequest’s URL list.\n response.urlList = [...httpRequest.urlList]\n\n // 12. If httpRequest’s header list contains `Range`, then set response’s\n // range-requested flag.\n if (httpRequest.headersList.contains('range')) {\n response.rangeRequested = true\n }\n\n // 13. Set response’s request-includes-credentials to includeCredentials.\n response.requestIncludesCredentials = includeCredentials\n\n // 14. If response’s status is 401, httpRequest’s response tainting is not\n // \"cors\", includeCredentials is true, and request’s window is an environment\n // settings object, then:\n // TODO\n\n // 15. If response’s status is 407, then:\n if (response.status === 407) {\n // 1. If request’s window is \"no-window\", then return a network error.\n if (request.window === 'no-window') {\n return makeNetworkError()\n }\n\n // 2. ???\n\n // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 4. Prompt the end user as appropriate in request’s window and store\n // the result as a proxy-authentication entry. [HTTP-AUTH]\n // TODO: Invoke some kind of callback?\n\n // 5. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams.\n // TODO\n return makeNetworkError('proxy authentication required')\n }\n\n // 16. If all of the following are true\n if (\n // response’s status is 421\n response.status === 421 &&\n // isNewConnectionFetch is false\n !isNewConnectionFetch &&\n // request’s body is null, or request’s body is non-null and request’s body’s source is non-null\n (request.body == null || request.body.source != null)\n ) {\n // then:\n\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Set response to the result of running HTTP-network-or-cache\n // fetch given fetchParams, isAuthenticationFetch, and true.\n\n // TODO (spec): The spec doesn't specify this but we need to cancel\n // the active response before we can start a new one.\n // https://github.com/whatwg/fetch/issues/1293\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(\n fetchParams,\n isAuthenticationFetch,\n true\n )\n }\n\n // 17. If isAuthenticationFetch is true, then create an authentication entry\n if (isAuthenticationFetch) {\n // TODO\n }\n\n // 18. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-network-fetch\nasync function httpNetworkFetch (\n fetchParams,\n includeCredentials = false,\n forceNewConnection = false\n) {\n assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed)\n\n fetchParams.controller.connection = {\n abort: null,\n destroyed: false,\n destroy (err) {\n if (!this.destroyed) {\n this.destroyed = true\n this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError'))\n }\n }\n }\n\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 4. Let httpCache be the result of determining the HTTP cache partition,\n // given request.\n // TODO: cache\n const httpCache = null\n\n // 5. If httpCache is null, then set request’s cache mode to \"no-store\".\n if (httpCache == null) {\n request.cache = 'no-store'\n }\n\n // 6. Let networkPartitionKey be the result of determining the network\n // partition key given request.\n // TODO\n\n // 7. Let newConnection be \"yes\" if forceNewConnection is true; otherwise\n // \"no\".\n const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars\n\n // 8. Switch on request’s mode:\n if (request.mode === 'websocket') {\n // Let connection be the result of obtaining a WebSocket connection,\n // given request’s current URL.\n // TODO\n } else {\n // Let connection be the result of obtaining a connection, given\n // networkPartitionKey, request’s current URL’s origin,\n // includeCredentials, and forceNewConnection.\n // TODO\n }\n\n // 9. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If connection is failure, then return a network error.\n\n // 2. Set timingInfo’s final connection timing info to the result of\n // calling clamp and coarsen connection timing info with connection’s\n // timing info, timingInfo’s post-redirect start time, and fetchParams’s\n // cross-origin isolated capability.\n\n // 3. If connection is not an HTTP/2 connection, request’s body is non-null,\n // and request’s body’s source is null, then append (`Transfer-Encoding`,\n // `chunked`) to request’s header list.\n\n // 4. Set timingInfo’s final network-request start time to the coarsened\n // shared current time given fetchParams’s cross-origin isolated\n // capability.\n\n // 5. Set response to the result of making an HTTP request over connection\n // using request with the following caveats:\n\n // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS]\n // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH]\n\n // - If request’s body is non-null, and request’s body’s source is null,\n // then the user agent may have a buffer of up to 64 kibibytes and store\n // a part of request’s body in that buffer. If the user agent reads from\n // request’s body beyond that buffer’s size and the user agent needs to\n // resend request, then instead return a network error.\n\n // - Set timingInfo’s final network-response start time to the coarsened\n // shared current time given fetchParams’s cross-origin isolated capability,\n // immediately after the user agent’s HTTP parser receives the first byte\n // of the response (e.g., frame header bytes for HTTP/2 or response status\n // line for HTTP/1.x).\n\n // - Wait until all the headers are transmitted.\n\n // - Any responses whose status is in the range 100 to 199, inclusive,\n // and is not 101, are to be ignored, except for the purposes of setting\n // timingInfo’s final network-response start time above.\n\n // - If request’s header list contains `Transfer-Encoding`/`chunked` and\n // response is transferred via HTTP/1.0 or older, then return a network\n // error.\n\n // - If the HTTP request results in a TLS client certificate dialog, then:\n\n // 1. If request’s window is an environment settings object, make the\n // dialog available in request’s window.\n\n // 2. Otherwise, return a network error.\n\n // To transmit request’s body body, run these steps:\n let requestBody = null\n // 1. If body is null and fetchParams’s process request end-of-body is\n // non-null, then queue a fetch task given fetchParams’s process request\n // end-of-body and fetchParams’s task destination.\n if (request.body == null && fetchParams.processRequestEndOfBody) {\n queueMicrotask(() => fetchParams.processRequestEndOfBody())\n } else if (request.body != null) {\n // 2. Otherwise, if body is non-null:\n\n // 1. Let processBodyChunk given bytes be these steps:\n const processBodyChunk = async function * (bytes) {\n // 1. If the ongoing fetch is terminated, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. Run this step in parallel: transmit bytes.\n yield bytes\n\n // 3. If fetchParams’s process request body is non-null, then run\n // fetchParams’s process request body given bytes’s length.\n fetchParams.processRequestBodyChunkLength?.(bytes.byteLength)\n }\n\n // 2. Let processEndOfBody be these steps:\n const processEndOfBody = () => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If fetchParams’s process request end-of-body is non-null,\n // then run fetchParams’s process request end-of-body.\n if (fetchParams.processRequestEndOfBody) {\n fetchParams.processRequestEndOfBody()\n }\n }\n\n // 3. Let processBodyError given e be these steps:\n const processBodyError = (e) => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If e is an \"AbortError\" DOMException, then abort fetchParams’s controller.\n if (e.name === 'AbortError') {\n fetchParams.controller.abort()\n } else {\n fetchParams.controller.terminate(e)\n }\n }\n\n // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody,\n // processBodyError, and fetchParams’s task destination.\n requestBody = (async function * () {\n try {\n for await (const bytes of request.body.stream) {\n yield * processBodyChunk(bytes)\n }\n processEndOfBody()\n } catch (err) {\n processBodyError(err)\n }\n })()\n }\n\n try {\n // socket is only provided for websockets\n const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody })\n\n if (socket) {\n response = makeResponse({ status, statusText, headersList, socket })\n } else {\n const iterator = body[Symbol.asyncIterator]()\n fetchParams.controller.next = () => iterator.next()\n\n response = makeResponse({ status, statusText, headersList })\n }\n } catch (err) {\n // 10. If aborted, then:\n if (err.name === 'AbortError') {\n // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n fetchParams.controller.connection.destroy()\n\n // 2. Return the appropriate network error for fetchParams.\n return makeAppropriateNetworkError(fetchParams, err)\n }\n\n return makeNetworkError(err)\n }\n\n // 11. Let pullAlgorithm be an action that resumes the ongoing fetch\n // if it is suspended.\n const pullAlgorithm = () => {\n fetchParams.controller.resume()\n }\n\n // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s\n // controller with reason, given reason.\n const cancelAlgorithm = (reason) => {\n fetchParams.controller.abort(reason)\n }\n\n // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by\n // the user agent.\n // TODO\n\n // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object\n // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.\n // TODO\n\n // 15. Let stream be a new ReadableStream.\n // 16. Set up stream with pullAlgorithm set to pullAlgorithm,\n // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to\n // highWaterMark, and sizeAlgorithm set to sizeAlgorithm.\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n const stream = new ReadableStream(\n {\n async start (controller) {\n fetchParams.controller.controller = controller\n },\n async pull (controller) {\n await pullAlgorithm(controller)\n },\n async cancel (reason) {\n await cancelAlgorithm(reason)\n }\n },\n {\n highWaterMark: 0,\n size () {\n return 1\n }\n }\n )\n\n // 17. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. Set response’s body to a new body whose stream is stream.\n response.body = { stream }\n\n // 2. If response is not a network error and request’s cache mode is\n // not \"no-store\", then update response in httpCache for request.\n // TODO\n\n // 3. If includeCredentials is true and the user agent is not configured\n // to block cookies for request (see section 7 of [COOKIES]), then run the\n // \"set-cookie-string\" parsing algorithm (see section 5.2 of [COOKIES]) on\n // the value of each header whose name is a byte-case-insensitive match for\n // `Set-Cookie` in response’s header list, if any, and request’s current URL.\n // TODO\n\n // 18. If aborted, then:\n // TODO\n\n // 19. Run these steps in parallel:\n\n // 1. Run these steps, but abort when fetchParams is canceled:\n fetchParams.controller.on('terminated', onAborted)\n fetchParams.controller.resume = async () => {\n // 1. While true\n while (true) {\n // 1-3. See onData...\n\n // 4. Set bytes to the result of handling content codings given\n // codings and bytes.\n let bytes\n let isFailure\n try {\n const { done, value } = await fetchParams.controller.next()\n\n if (isAborted(fetchParams)) {\n break\n }\n\n bytes = done ? undefined : value\n } catch (err) {\n if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {\n // zlib doesn't like empty streams.\n bytes = undefined\n } else {\n bytes = err\n\n // err may be propagated from the result of calling readablestream.cancel,\n // which might not be an error. https://github.com/nodejs/undici/issues/2009\n isFailure = true\n }\n }\n\n if (bytes === undefined) {\n // 2. Otherwise, if the bytes transmission for response’s message\n // body is done normally and stream is readable, then close\n // stream, finalize response for fetchParams and response, and\n // abort these in-parallel steps.\n readableStreamClose(fetchParams.controller.controller)\n\n finalizeResponse(fetchParams, response)\n\n return\n }\n\n // 5. Increase timingInfo’s decoded body size by bytes’s length.\n timingInfo.decodedBodySize += bytes?.byteLength ?? 0\n\n // 6. If bytes is failure, then terminate fetchParams’s controller.\n if (isFailure) {\n fetchParams.controller.terminate(bytes)\n return\n }\n\n // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes\n // into stream.\n fetchParams.controller.controller.enqueue(new Uint8Array(bytes))\n\n // 8. If stream is errored, then terminate the ongoing fetch.\n if (isErrored(stream)) {\n fetchParams.controller.terminate()\n return\n }\n\n // 9. If stream doesn’t need more data ask the user agent to suspend\n // the ongoing fetch.\n if (!fetchParams.controller.controller.desiredSize) {\n return\n }\n }\n }\n\n // 2. If aborted, then:\n function onAborted (reason) {\n // 2. If fetchParams is aborted, then:\n if (isAborted(fetchParams)) {\n // 1. Set response’s aborted flag.\n response.aborted = true\n\n // 2. If stream is readable, then error stream with the result of\n // deserialize a serialized abort reason given fetchParams’s\n // controller’s serialized abort reason and an\n // implementation-defined realm.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(\n fetchParams.controller.serializedAbortReason\n )\n }\n } else {\n // 3. Otherwise, if stream is readable, error stream with a TypeError.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(new TypeError('terminated', {\n cause: isErrorLike(reason) ? reason : undefined\n }))\n }\n }\n\n // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so.\n fetchParams.controller.connection.destroy()\n }\n\n // 20. Return response.\n return response\n\n async function dispatch ({ body }) {\n const url = requestCurrentURL(request)\n /** @type {import('../..').Agent} */\n const agent = fetchParams.controller.dispatcher\n\n return new Promise((resolve, reject) => agent.dispatch(\n {\n path: url.pathname + url.search,\n origin: url.origin,\n method: request.method,\n body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body,\n headers: request.headersList.entries,\n maxRedirections: 0,\n upgrade: request.mode === 'websocket' ? 'websocket' : undefined\n },\n {\n body: null,\n abort: null,\n\n onConnect (abort) {\n // TODO (fix): Do we need connection here?\n const { connection } = fetchParams.controller\n\n if (connection.destroyed) {\n abort(new DOMException('The operation was aborted.', 'AbortError'))\n } else {\n fetchParams.controller.on('terminated', abort)\n this.abort = connection.abort = abort\n }\n },\n\n onHeaders (status, headersList, resume, statusText) {\n if (status < 200) {\n return\n }\n\n let codings = []\n let location = ''\n\n const headers = new Headers()\n\n // For H2, the headers are a plain JS object\n // We distinguish between them and iterate accordingly\n if (Array.isArray(headersList)) {\n for (let n = 0; n < headersList.length; n += 2) {\n const key = headersList[n + 0].toString('latin1')\n const val = headersList[n + 1].toString('latin1')\n if (key.toLowerCase() === 'content-encoding') {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n // \"All content-coding values are case-insensitive...\"\n codings = val.toLowerCase().split(',').map((x) => x.trim())\n } else if (key.toLowerCase() === 'location') {\n location = val\n }\n\n headers[kHeadersList].append(key, val)\n }\n } else {\n const keys = Object.keys(headersList)\n for (const key of keys) {\n const val = headersList[key]\n if (key.toLowerCase() === 'content-encoding') {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n // \"All content-coding values are case-insensitive...\"\n codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse()\n } else if (key.toLowerCase() === 'location') {\n location = val\n }\n\n headers[kHeadersList].append(key, val)\n }\n }\n\n this.body = new Readable({ read: resume })\n\n const decoders = []\n\n const willFollow = request.redirect === 'follow' &&\n location &&\n redirectStatusSet.has(status)\n\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {\n for (const coding of codings) {\n // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2\n if (coding === 'x-gzip' || coding === 'gzip') {\n decoders.push(zlib.createGunzip({\n // Be less strict when decoding compressed responses, since sometimes\n // servers send slightly invalid responses that are still accepted\n // by common browsers.\n // Always using Z_SYNC_FLUSH is what cURL does.\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'deflate') {\n decoders.push(zlib.createInflate())\n } else if (coding === 'br') {\n decoders.push(zlib.createBrotliDecompress())\n } else {\n decoders.length = 0\n break\n }\n }\n }\n\n resolve({\n status,\n statusText,\n headersList: headers[kHeadersList],\n body: decoders.length\n ? pipeline(this.body, ...decoders, () => { })\n : this.body.on('error', () => {})\n })\n\n return true\n },\n\n onData (chunk) {\n if (fetchParams.controller.dump) {\n return\n }\n\n // 1. If one or more bytes have been transmitted from response’s\n // message body, then:\n\n // 1. Let bytes be the transmitted bytes.\n const bytes = chunk\n\n // 2. Let codings be the result of extracting header list values\n // given `Content-Encoding` and response’s header list.\n // See pullAlgorithm.\n\n // 3. Increase timingInfo’s encoded body size by bytes’s length.\n timingInfo.encodedBodySize += bytes.byteLength\n\n // 4. See pullAlgorithm...\n\n return this.body.push(bytes)\n },\n\n onComplete () {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n fetchParams.controller.ended = true\n\n this.body.push(null)\n },\n\n onError (error) {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n this.body?.destroy(error)\n\n fetchParams.controller.terminate(error)\n\n reject(error)\n },\n\n onUpgrade (status, headersList, socket) {\n if (status !== 101) {\n return\n }\n\n const headers = new Headers()\n\n for (let n = 0; n < headersList.length; n += 2) {\n const key = headersList[n + 0].toString('latin1')\n const val = headersList[n + 1].toString('latin1')\n\n headers[kHeadersList].append(key, val)\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList: headers[kHeadersList],\n socket\n })\n\n return true\n }\n }\n ))\n }\n}\n\nmodule.exports = {\n fetch,\n Fetch,\n fetching,\n finalizeAndReportTiming\n}\n","/* globals AbortController */\n\n'use strict'\n\nconst { extractBody, mixinBody, cloneBody } = require('./body')\nconst { Headers, fill: fillHeaders, HeadersList } = require('./headers')\nconst { FinalizationRegistry } = require('../compat/dispatcher-weakref')()\nconst util = require('../core/util')\nconst {\n isValidHTTPToken,\n sameOrigin,\n normalizeMethod,\n makePolicyContainer,\n normalizeMethodRecord\n} = require('./util')\nconst {\n forbiddenMethodsSet,\n corsSafeListedMethodsSet,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n requestDuplex\n} = require('./constants')\nconst { kEnumerableProperty } = util\nconst { kHeaders, kSignal, kState, kGuard, kRealm } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { getGlobalOrigin } = require('./global')\nconst { URLSerializer } = require('./dataURL')\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst assert = require('assert')\nconst { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('events')\n\nlet TransformStream = globalThis.TransformStream\n\nconst kAbortController = Symbol('abortController')\n\nconst requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {\n signal.removeEventListener('abort', abort)\n})\n\n// https://fetch.spec.whatwg.org/#request-class\nclass Request {\n // https://fetch.spec.whatwg.org/#dom-request\n constructor (input, init = {}) {\n if (input === kConstruct) {\n return\n }\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' })\n\n input = webidl.converters.RequestInfo(input)\n init = webidl.converters.RequestInit(init)\n\n // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object\n this[kRealm] = {\n settingsObject: {\n baseUrl: getGlobalOrigin(),\n get origin () {\n return this.baseUrl?.origin\n },\n policyContainer: makePolicyContainer()\n }\n }\n\n // 1. Let request be null.\n let request = null\n\n // 2. Let fallbackMode be null.\n let fallbackMode = null\n\n // 3. Let baseURL be this’s relevant settings object’s API base URL.\n const baseUrl = this[kRealm].settingsObject.baseUrl\n\n // 4. Let signal be null.\n let signal = null\n\n // 5. If input is a string, then:\n if (typeof input === 'string') {\n // 1. Let parsedURL be the result of parsing input with baseURL.\n // 2. If parsedURL is failure, then throw a TypeError.\n let parsedURL\n try {\n parsedURL = new URL(input, baseUrl)\n } catch (err) {\n throw new TypeError('Failed to parse URL from ' + input, { cause: err })\n }\n\n // 3. If parsedURL includes credentials, then throw a TypeError.\n if (parsedURL.username || parsedURL.password) {\n throw new TypeError(\n 'Request cannot be constructed from a URL that includes credentials: ' +\n input\n )\n }\n\n // 4. Set request to a new request whose URL is parsedURL.\n request = makeRequest({ urlList: [parsedURL] })\n\n // 5. Set fallbackMode to \"cors\".\n fallbackMode = 'cors'\n } else {\n // 6. Otherwise:\n\n // 7. Assert: input is a Request object.\n assert(input instanceof Request)\n\n // 8. Set request to input’s request.\n request = input[kState]\n\n // 9. Set signal to input’s signal.\n signal = input[kSignal]\n }\n\n // 7. Let origin be this’s relevant settings object’s origin.\n const origin = this[kRealm].settingsObject.origin\n\n // 8. Let window be \"client\".\n let window = 'client'\n\n // 9. If request’s window is an environment settings object and its origin\n // is same origin with origin, then set window to request’s window.\n if (\n request.window?.constructor?.name === 'EnvironmentSettingsObject' &&\n sameOrigin(request.window, origin)\n ) {\n window = request.window\n }\n\n // 10. If init[\"window\"] exists and is non-null, then throw a TypeError.\n if (init.window != null) {\n throw new TypeError(`'window' option '${window}' must be null`)\n }\n\n // 11. If init[\"window\"] exists, then set window to \"no-window\".\n if ('window' in init) {\n window = 'no-window'\n }\n\n // 12. Set request to a new request with the following properties:\n request = makeRequest({\n // URL request’s URL.\n // undici implementation note: this is set as the first item in request's urlList in makeRequest\n // method request’s method.\n method: request.method,\n // header list A copy of request’s header list.\n // undici implementation note: headersList is cloned in makeRequest\n headersList: request.headersList,\n // unsafe-request flag Set.\n unsafeRequest: request.unsafeRequest,\n // client This’s relevant settings object.\n client: this[kRealm].settingsObject,\n // window window.\n window,\n // priority request’s priority.\n priority: request.priority,\n // origin request’s origin. The propagation of the origin is only significant for navigation requests\n // being handled by a service worker. In this scenario a request can have an origin that is different\n // from the current client.\n origin: request.origin,\n // referrer request’s referrer.\n referrer: request.referrer,\n // referrer policy request’s referrer policy.\n referrerPolicy: request.referrerPolicy,\n // mode request’s mode.\n mode: request.mode,\n // credentials mode request’s credentials mode.\n credentials: request.credentials,\n // cache mode request’s cache mode.\n cache: request.cache,\n // redirect mode request’s redirect mode.\n redirect: request.redirect,\n // integrity metadata request’s integrity metadata.\n integrity: request.integrity,\n // keepalive request’s keepalive.\n keepalive: request.keepalive,\n // reload-navigation flag request’s reload-navigation flag.\n reloadNavigation: request.reloadNavigation,\n // history-navigation flag request’s history-navigation flag.\n historyNavigation: request.historyNavigation,\n // URL list A clone of request’s URL list.\n urlList: [...request.urlList]\n })\n\n const initHasKey = Object.keys(init).length !== 0\n\n // 13. If init is not empty, then:\n if (initHasKey) {\n // 1. If request’s mode is \"navigate\", then set it to \"same-origin\".\n if (request.mode === 'navigate') {\n request.mode = 'same-origin'\n }\n\n // 2. Unset request’s reload-navigation flag.\n request.reloadNavigation = false\n\n // 3. Unset request’s history-navigation flag.\n request.historyNavigation = false\n\n // 4. Set request’s origin to \"client\".\n request.origin = 'client'\n\n // 5. Set request’s referrer to \"client\"\n request.referrer = 'client'\n\n // 6. Set request’s referrer policy to the empty string.\n request.referrerPolicy = ''\n\n // 7. Set request’s URL to request’s current URL.\n request.url = request.urlList[request.urlList.length - 1]\n\n // 8. Set request’s URL list to « request’s URL ».\n request.urlList = [request.url]\n }\n\n // 14. If init[\"referrer\"] exists, then:\n if (init.referrer !== undefined) {\n // 1. Let referrer be init[\"referrer\"].\n const referrer = init.referrer\n\n // 2. If referrer is the empty string, then set request’s referrer to \"no-referrer\".\n if (referrer === '') {\n request.referrer = 'no-referrer'\n } else {\n // 1. Let parsedReferrer be the result of parsing referrer with\n // baseURL.\n // 2. If parsedReferrer is failure, then throw a TypeError.\n let parsedReferrer\n try {\n parsedReferrer = new URL(referrer, baseUrl)\n } catch (err) {\n throw new TypeError(`Referrer \"${referrer}\" is not a valid URL.`, { cause: err })\n }\n\n // 3. If one of the following is true\n // - parsedReferrer’s scheme is \"about\" and path is the string \"client\"\n // - parsedReferrer’s origin is not same origin with origin\n // then set request’s referrer to \"client\".\n if (\n (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') ||\n (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl))\n ) {\n request.referrer = 'client'\n } else {\n // 4. Otherwise, set request’s referrer to parsedReferrer.\n request.referrer = parsedReferrer\n }\n }\n }\n\n // 15. If init[\"referrerPolicy\"] exists, then set request’s referrer policy\n // to it.\n if (init.referrerPolicy !== undefined) {\n request.referrerPolicy = init.referrerPolicy\n }\n\n // 16. Let mode be init[\"mode\"] if it exists, and fallbackMode otherwise.\n let mode\n if (init.mode !== undefined) {\n mode = init.mode\n } else {\n mode = fallbackMode\n }\n\n // 17. If mode is \"navigate\", then throw a TypeError.\n if (mode === 'navigate') {\n throw webidl.errors.exception({\n header: 'Request constructor',\n message: 'invalid request mode navigate.'\n })\n }\n\n // 18. If mode is non-null, set request’s mode to mode.\n if (mode != null) {\n request.mode = mode\n }\n\n // 19. If init[\"credentials\"] exists, then set request’s credentials mode\n // to it.\n if (init.credentials !== undefined) {\n request.credentials = init.credentials\n }\n\n // 18. If init[\"cache\"] exists, then set request’s cache mode to it.\n if (init.cache !== undefined) {\n request.cache = init.cache\n }\n\n // 21. If request’s cache mode is \"only-if-cached\" and request’s mode is\n // not \"same-origin\", then throw a TypeError.\n if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {\n throw new TypeError(\n \"'only-if-cached' can be set only with 'same-origin' mode\"\n )\n }\n\n // 22. If init[\"redirect\"] exists, then set request’s redirect mode to it.\n if (init.redirect !== undefined) {\n request.redirect = init.redirect\n }\n\n // 23. If init[\"integrity\"] exists, then set request’s integrity metadata to it.\n if (init.integrity != null) {\n request.integrity = String(init.integrity)\n }\n\n // 24. If init[\"keepalive\"] exists, then set request’s keepalive to it.\n if (init.keepalive !== undefined) {\n request.keepalive = Boolean(init.keepalive)\n }\n\n // 25. If init[\"method\"] exists, then:\n if (init.method !== undefined) {\n // 1. Let method be init[\"method\"].\n let method = init.method\n\n // 2. If method is not a method or method is a forbidden method, then\n // throw a TypeError.\n if (!isValidHTTPToken(method)) {\n throw new TypeError(`'${method}' is not a valid HTTP method.`)\n }\n\n if (forbiddenMethodsSet.has(method.toUpperCase())) {\n throw new TypeError(`'${method}' HTTP method is unsupported.`)\n }\n\n // 3. Normalize method.\n method = normalizeMethodRecord[method] ?? normalizeMethod(method)\n\n // 4. Set request’s method to method.\n request.method = method\n }\n\n // 26. If init[\"signal\"] exists, then set signal to it.\n if (init.signal !== undefined) {\n signal = init.signal\n }\n\n // 27. Set this’s request to request.\n this[kState] = request\n\n // 28. Set this’s signal to a new AbortSignal object with this’s relevant\n // Realm.\n // TODO: could this be simplified with AbortSignal.any\n // (https://dom.spec.whatwg.org/#dom-abortsignal-any)\n const ac = new AbortController()\n this[kSignal] = ac.signal\n this[kSignal][kRealm] = this[kRealm]\n\n // 29. If signal is not null, then make this’s signal follow signal.\n if (signal != null) {\n if (\n !signal ||\n typeof signal.aborted !== 'boolean' ||\n typeof signal.addEventListener !== 'function'\n ) {\n throw new TypeError(\n \"Failed to construct 'Request': member signal is not of type AbortSignal.\"\n )\n }\n\n if (signal.aborted) {\n ac.abort(signal.reason)\n } else {\n // Keep a strong ref to ac while request object\n // is alive. This is needed to prevent AbortController\n // from being prematurely garbage collected.\n // See, https://github.com/nodejs/undici/issues/1926.\n this[kAbortController] = ac\n\n const acRef = new WeakRef(ac)\n const abort = function () {\n const ac = acRef.deref()\n if (ac !== undefined) {\n ac.abort(this.reason)\n }\n }\n\n // Third-party AbortControllers may not work with these.\n // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619.\n try {\n // If the max amount of listeners is equal to the default, increase it\n // This is only available in node >= v19.9.0\n if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) {\n setMaxListeners(100, signal)\n } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) {\n setMaxListeners(100, signal)\n }\n } catch {}\n\n util.addAbortListener(signal, abort)\n requestFinalizer.register(ac, { signal, abort })\n }\n }\n\n // 30. Set this’s headers to a new Headers object with this’s relevant\n // Realm, whose header list is request’s header list and guard is\n // \"request\".\n this[kHeaders] = new Headers(kConstruct)\n this[kHeaders][kHeadersList] = request.headersList\n this[kHeaders][kGuard] = 'request'\n this[kHeaders][kRealm] = this[kRealm]\n\n // 31. If this’s request’s mode is \"no-cors\", then:\n if (mode === 'no-cors') {\n // 1. If this’s request’s method is not a CORS-safelisted method,\n // then throw a TypeError.\n if (!corsSafeListedMethodsSet.has(request.method)) {\n throw new TypeError(\n `'${request.method} is unsupported in no-cors mode.`\n )\n }\n\n // 2. Set this’s headers’s guard to \"request-no-cors\".\n this[kHeaders][kGuard] = 'request-no-cors'\n }\n\n // 32. If init is not empty, then:\n if (initHasKey) {\n /** @type {HeadersList} */\n const headersList = this[kHeaders][kHeadersList]\n // 1. Let headers be a copy of this’s headers and its associated header\n // list.\n // 2. If init[\"headers\"] exists, then set headers to init[\"headers\"].\n const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList)\n\n // 3. Empty this’s headers’s header list.\n headersList.clear()\n\n // 4. If headers is a Headers object, then for each header in its header\n // list, append header’s name/header’s value to this’s headers.\n if (headers instanceof HeadersList) {\n for (const [key, val] of headers) {\n headersList.append(key, val)\n }\n // Note: Copy the `set-cookie` meta-data.\n headersList.cookies = headers.cookies\n } else {\n // 5. Otherwise, fill this’s headers with headers.\n fillHeaders(this[kHeaders], headers)\n }\n }\n\n // 33. Let inputBody be input’s request’s body if input is a Request\n // object; otherwise null.\n const inputBody = input instanceof Request ? input[kState].body : null\n\n // 34. If either init[\"body\"] exists and is non-null or inputBody is\n // non-null, and request’s method is `GET` or `HEAD`, then throw a\n // TypeError.\n if (\n (init.body != null || inputBody != null) &&\n (request.method === 'GET' || request.method === 'HEAD')\n ) {\n throw new TypeError('Request with GET/HEAD method cannot have body.')\n }\n\n // 35. Let initBody be null.\n let initBody = null\n\n // 36. If init[\"body\"] exists and is non-null, then:\n if (init.body != null) {\n // 1. Let Content-Type be null.\n // 2. Set initBody and Content-Type to the result of extracting\n // init[\"body\"], with keepalive set to request’s keepalive.\n const [extractedBody, contentType] = extractBody(\n init.body,\n request.keepalive\n )\n initBody = extractedBody\n\n // 3, If Content-Type is non-null and this’s headers’s header list does\n // not contain `Content-Type`, then append `Content-Type`/Content-Type to\n // this’s headers.\n if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) {\n this[kHeaders].append('content-type', contentType)\n }\n }\n\n // 37. Let inputOrInitBody be initBody if it is non-null; otherwise\n // inputBody.\n const inputOrInitBody = initBody ?? inputBody\n\n // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is\n // null, then:\n if (inputOrInitBody != null && inputOrInitBody.source == null) {\n // 1. If initBody is non-null and init[\"duplex\"] does not exist,\n // then throw a TypeError.\n if (initBody != null && init.duplex == null) {\n throw new TypeError('RequestInit: duplex option is required when sending a body.')\n }\n\n // 2. If this’s request’s mode is neither \"same-origin\" nor \"cors\",\n // then throw a TypeError.\n if (request.mode !== 'same-origin' && request.mode !== 'cors') {\n throw new TypeError(\n 'If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\"'\n )\n }\n\n // 3. Set this’s request’s use-CORS-preflight flag.\n request.useCORSPreflightFlag = true\n }\n\n // 39. Let finalBody be inputOrInitBody.\n let finalBody = inputOrInitBody\n\n // 40. If initBody is null and inputBody is non-null, then:\n if (initBody == null && inputBody != null) {\n // 1. If input is unusable, then throw a TypeError.\n if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) {\n throw new TypeError(\n 'Cannot construct a Request with a Request object that has already been used.'\n )\n }\n\n // 2. Set finalBody to the result of creating a proxy for inputBody.\n if (!TransformStream) {\n TransformStream = require('stream/web').TransformStream\n }\n\n // https://streams.spec.whatwg.org/#readablestream-create-a-proxy\n const identityTransform = new TransformStream()\n inputBody.stream.pipeThrough(identityTransform)\n finalBody = {\n source: inputBody.source,\n length: inputBody.length,\n stream: identityTransform.readable\n }\n }\n\n // 41. Set this’s request’s body to finalBody.\n this[kState].body = finalBody\n }\n\n // Returns request’s HTTP method, which is \"GET\" by default.\n get method () {\n webidl.brandCheck(this, Request)\n\n // The method getter steps are to return this’s request’s method.\n return this[kState].method\n }\n\n // Returns the URL of request as a string.\n get url () {\n webidl.brandCheck(this, Request)\n\n // The url getter steps are to return this’s request’s URL, serialized.\n return URLSerializer(this[kState].url)\n }\n\n // Returns a Headers object consisting of the headers associated with request.\n // Note that headers added in the network layer by the user agent will not\n // be accounted for in this object, e.g., the \"Host\" header.\n get headers () {\n webidl.brandCheck(this, Request)\n\n // The headers getter steps are to return this’s headers.\n return this[kHeaders]\n }\n\n // Returns the kind of resource requested by request, e.g., \"document\"\n // or \"script\".\n get destination () {\n webidl.brandCheck(this, Request)\n\n // The destination getter are to return this’s request’s destination.\n return this[kState].destination\n }\n\n // Returns the referrer of request. Its value can be a same-origin URL if\n // explicitly set in init, the empty string to indicate no referrer, and\n // \"about:client\" when defaulting to the global’s default. This is used\n // during fetching to determine the value of the `Referer` header of the\n // request being made.\n get referrer () {\n webidl.brandCheck(this, Request)\n\n // 1. If this’s request’s referrer is \"no-referrer\", then return the\n // empty string.\n if (this[kState].referrer === 'no-referrer') {\n return ''\n }\n\n // 2. If this’s request’s referrer is \"client\", then return\n // \"about:client\".\n if (this[kState].referrer === 'client') {\n return 'about:client'\n }\n\n // Return this’s request’s referrer, serialized.\n return this[kState].referrer.toString()\n }\n\n // Returns the referrer policy associated with request.\n // This is used during fetching to compute the value of the request’s\n // referrer.\n get referrerPolicy () {\n webidl.brandCheck(this, Request)\n\n // The referrerPolicy getter steps are to return this’s request’s referrer policy.\n return this[kState].referrerPolicy\n }\n\n // Returns the mode associated with request, which is a string indicating\n // whether the request will use CORS, or will be restricted to same-origin\n // URLs.\n get mode () {\n webidl.brandCheck(this, Request)\n\n // The mode getter steps are to return this’s request’s mode.\n return this[kState].mode\n }\n\n // Returns the credentials mode associated with request,\n // which is a string indicating whether credentials will be sent with the\n // request always, never, or only when sent to a same-origin URL.\n get credentials () {\n // The credentials getter steps are to return this’s request’s credentials mode.\n return this[kState].credentials\n }\n\n // Returns the cache mode associated with request,\n // which is a string indicating how the request will\n // interact with the browser’s cache when fetching.\n get cache () {\n webidl.brandCheck(this, Request)\n\n // The cache getter steps are to return this’s request’s cache mode.\n return this[kState].cache\n }\n\n // Returns the redirect mode associated with request,\n // which is a string indicating how redirects for the\n // request will be handled during fetching. A request\n // will follow redirects by default.\n get redirect () {\n webidl.brandCheck(this, Request)\n\n // The redirect getter steps are to return this’s request’s redirect mode.\n return this[kState].redirect\n }\n\n // Returns request’s subresource integrity metadata, which is a\n // cryptographic hash of the resource being fetched. Its value\n // consists of multiple hashes separated by whitespace. [SRI]\n get integrity () {\n webidl.brandCheck(this, Request)\n\n // The integrity getter steps are to return this’s request’s integrity\n // metadata.\n return this[kState].integrity\n }\n\n // Returns a boolean indicating whether or not request can outlive the\n // global in which it was created.\n get keepalive () {\n webidl.brandCheck(this, Request)\n\n // The keepalive getter steps are to return this’s request’s keepalive.\n return this[kState].keepalive\n }\n\n // Returns a boolean indicating whether or not request is for a reload\n // navigation.\n get isReloadNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isReloadNavigation getter steps are to return true if this’s\n // request’s reload-navigation flag is set; otherwise false.\n return this[kState].reloadNavigation\n }\n\n // Returns a boolean indicating whether or not request is for a history\n // navigation (a.k.a. back-foward navigation).\n get isHistoryNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isHistoryNavigation getter steps are to return true if this’s request’s\n // history-navigation flag is set; otherwise false.\n return this[kState].historyNavigation\n }\n\n // Returns the signal associated with request, which is an AbortSignal\n // object indicating whether or not request has been aborted, and its\n // abort event handler.\n get signal () {\n webidl.brandCheck(this, Request)\n\n // The signal getter steps are to return this’s signal.\n return this[kSignal]\n }\n\n get body () {\n webidl.brandCheck(this, Request)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Request)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n get duplex () {\n webidl.brandCheck(this, Request)\n\n return 'half'\n }\n\n // Returns a clone of request.\n clone () {\n webidl.brandCheck(this, Request)\n\n // 1. If this is unusable, then throw a TypeError.\n if (this.bodyUsed || this.body?.locked) {\n throw new TypeError('unusable')\n }\n\n // 2. Let clonedRequest be the result of cloning this’s request.\n const clonedRequest = cloneRequest(this[kState])\n\n // 3. Let clonedRequestObject be the result of creating a Request object,\n // given clonedRequest, this’s headers’s guard, and this’s relevant Realm.\n const clonedRequestObject = new Request(kConstruct)\n clonedRequestObject[kState] = clonedRequest\n clonedRequestObject[kRealm] = this[kRealm]\n clonedRequestObject[kHeaders] = new Headers(kConstruct)\n clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList\n clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]\n clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]\n\n // 4. Make clonedRequestObject’s signal follow this’s signal.\n const ac = new AbortController()\n if (this.signal.aborted) {\n ac.abort(this.signal.reason)\n } else {\n util.addAbortListener(\n this.signal,\n () => {\n ac.abort(this.signal.reason)\n }\n )\n }\n clonedRequestObject[kSignal] = ac.signal\n\n // 4. Return clonedRequestObject.\n return clonedRequestObject\n }\n}\n\nmixinBody(Request)\n\nfunction makeRequest (init) {\n // https://fetch.spec.whatwg.org/#requests\n const request = {\n method: 'GET',\n localURLsOnly: false,\n unsafeRequest: false,\n body: null,\n client: null,\n reservedClient: null,\n replacesClientId: '',\n window: 'client',\n keepalive: false,\n serviceWorkers: 'all',\n initiator: '',\n destination: '',\n priority: null,\n origin: 'client',\n policyContainer: 'client',\n referrer: 'client',\n referrerPolicy: '',\n mode: 'no-cors',\n useCORSPreflightFlag: false,\n credentials: 'same-origin',\n useCredentials: false,\n cache: 'default',\n redirect: 'follow',\n integrity: '',\n cryptoGraphicsNonceMetadata: '',\n parserMetadata: '',\n reloadNavigation: false,\n historyNavigation: false,\n userActivation: false,\n taintedOrigin: false,\n redirectCount: 0,\n responseTainting: 'basic',\n preventNoCacheCacheControlHeaderModification: false,\n done: false,\n timingAllowFailed: false,\n ...init,\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList()\n }\n request.url = request.urlList[0]\n return request\n}\n\n// https://fetch.spec.whatwg.org/#concept-request-clone\nfunction cloneRequest (request) {\n // To clone a request request, run these steps:\n\n // 1. Let newRequest be a copy of request, except for its body.\n const newRequest = makeRequest({ ...request, body: null })\n\n // 2. If request’s body is non-null, set newRequest’s body to the\n // result of cloning request’s body.\n if (request.body != null) {\n newRequest.body = cloneBody(request.body)\n }\n\n // 3. Return newRequest.\n return newRequest\n}\n\nObject.defineProperties(Request.prototype, {\n method: kEnumerableProperty,\n url: kEnumerableProperty,\n headers: kEnumerableProperty,\n redirect: kEnumerableProperty,\n clone: kEnumerableProperty,\n signal: kEnumerableProperty,\n duplex: kEnumerableProperty,\n destination: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n isHistoryNavigation: kEnumerableProperty,\n isReloadNavigation: kEnumerableProperty,\n keepalive: kEnumerableProperty,\n integrity: kEnumerableProperty,\n cache: kEnumerableProperty,\n credentials: kEnumerableProperty,\n attribute: kEnumerableProperty,\n referrerPolicy: kEnumerableProperty,\n referrer: kEnumerableProperty,\n mode: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Request',\n configurable: true\n }\n})\n\nwebidl.converters.Request = webidl.interfaceConverter(\n Request\n)\n\n// https://fetch.spec.whatwg.org/#requestinfo\nwebidl.converters.RequestInfo = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (V instanceof Request) {\n return webidl.converters.Request(V)\n }\n\n return webidl.converters.USVString(V)\n}\n\nwebidl.converters.AbortSignal = webidl.interfaceConverter(\n AbortSignal\n)\n\n// https://fetch.spec.whatwg.org/#requestinit\nwebidl.converters.RequestInit = webidl.dictionaryConverter([\n {\n key: 'method',\n converter: webidl.converters.ByteString\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n },\n {\n key: 'body',\n converter: webidl.nullableConverter(\n webidl.converters.BodyInit\n )\n },\n {\n key: 'referrer',\n converter: webidl.converters.USVString\n },\n {\n key: 'referrerPolicy',\n converter: webidl.converters.DOMString,\n // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy\n allowedValues: referrerPolicy\n },\n {\n key: 'mode',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#concept-request-mode\n allowedValues: requestMode\n },\n {\n key: 'credentials',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcredentials\n allowedValues: requestCredentials\n },\n {\n key: 'cache',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcache\n allowedValues: requestCache\n },\n {\n key: 'redirect',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestredirect\n allowedValues: requestRedirect\n },\n {\n key: 'integrity',\n converter: webidl.converters.DOMString\n },\n {\n key: 'keepalive',\n converter: webidl.converters.boolean\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(\n (signal) => webidl.converters.AbortSignal(\n signal,\n { strict: false }\n )\n )\n },\n {\n key: 'window',\n converter: webidl.converters.any\n },\n {\n key: 'duplex',\n converter: webidl.converters.DOMString,\n allowedValues: requestDuplex\n }\n])\n\nmodule.exports = { Request, makeRequest }\n","'use strict'\n\nconst { Headers, HeadersList, fill } = require('./headers')\nconst { extractBody, cloneBody, mixinBody } = require('./body')\nconst util = require('../core/util')\nconst { kEnumerableProperty } = util\nconst {\n isValidReasonPhrase,\n isCancelled,\n isAborted,\n isBlobLike,\n serializeJavascriptValueToJSONString,\n isErrorLike,\n isomorphicEncode\n} = require('./util')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n DOMException\n} = require('./constants')\nconst { kState, kHeaders, kGuard, kRealm } = require('./symbols')\nconst { webidl } = require('./webidl')\nconst { FormData } = require('./formdata')\nconst { getGlobalOrigin } = require('./global')\nconst { URLSerializer } = require('./dataURL')\nconst { kHeadersList, kConstruct } = require('../core/symbols')\nconst assert = require('assert')\nconst { types } = require('util')\n\nconst ReadableStream = globalThis.ReadableStream || require('stream/web').ReadableStream\nconst textEncoder = new TextEncoder('utf-8')\n\n// https://fetch.spec.whatwg.org/#response-class\nclass Response {\n // Creates network error Response.\n static error () {\n // TODO\n const relevantRealm = { settingsObject: {} }\n\n // The static error() method steps are to return the result of creating a\n // Response object, given a new network error, \"immutable\", and this’s\n // relevant Realm.\n const responseObject = new Response()\n responseObject[kState] = makeNetworkError()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response-json\n static json (data, init = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' })\n\n if (init !== null) {\n init = webidl.converters.ResponseInit(init)\n }\n\n // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n const bytes = textEncoder.encode(\n serializeJavascriptValueToJSONString(data)\n )\n\n // 2. Let body be the result of extracting bytes.\n const body = extractBody(bytes)\n\n // 3. Let responseObject be the result of creating a Response object, given a new response,\n // \"response\", and this’s relevant Realm.\n const relevantRealm = { settingsObject: {} }\n const responseObject = new Response()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kGuard] = 'response'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 4. Perform initialize a response given responseObject, init, and (body, \"application/json\").\n initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })\n\n // 5. Return responseObject.\n return responseObject\n }\n\n // Creates a redirect Response that redirects to url with status status.\n static redirect (url, status = 302) {\n const relevantRealm = { settingsObject: {} }\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' })\n\n url = webidl.converters.USVString(url)\n status = webidl.converters['unsigned short'](status)\n\n // 1. Let parsedURL be the result of parsing url with current settings\n // object’s API base URL.\n // 2. If parsedURL is failure, then throw a TypeError.\n // TODO: base-URL?\n let parsedURL\n try {\n parsedURL = new URL(url, getGlobalOrigin())\n } catch (err) {\n throw Object.assign(new TypeError('Failed to parse URL from ' + url), {\n cause: err\n })\n }\n\n // 3. If status is not a redirect status, then throw a RangeError.\n if (!redirectStatusSet.has(status)) {\n throw new RangeError('Invalid status code ' + status)\n }\n\n // 4. Let responseObject be the result of creating a Response object,\n // given a new response, \"immutable\", and this’s relevant Realm.\n const responseObject = new Response()\n responseObject[kRealm] = relevantRealm\n responseObject[kHeaders][kGuard] = 'immutable'\n responseObject[kHeaders][kRealm] = relevantRealm\n\n // 5. Set responseObject’s response’s status to status.\n responseObject[kState].status = status\n\n // 6. Let value be parsedURL, serialized and isomorphic encoded.\n const value = isomorphicEncode(URLSerializer(parsedURL))\n\n // 7. Append `Location`/value to responseObject’s response’s header list.\n responseObject[kState].headersList.append('location', value)\n\n // 8. Return responseObject.\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response\n constructor (body = null, init = {}) {\n if (body !== null) {\n body = webidl.converters.BodyInit(body)\n }\n\n init = webidl.converters.ResponseInit(init)\n\n // TODO\n this[kRealm] = { settingsObject: {} }\n\n // 1. Set this’s response to a new response.\n this[kState] = makeResponse({})\n\n // 2. Set this’s headers to a new Headers object with this’s relevant\n // Realm, whose header list is this’s response’s header list and guard\n // is \"response\".\n this[kHeaders] = new Headers(kConstruct)\n this[kHeaders][kGuard] = 'response'\n this[kHeaders][kHeadersList] = this[kState].headersList\n this[kHeaders][kRealm] = this[kRealm]\n\n // 3. Let bodyWithType be null.\n let bodyWithType = null\n\n // 4. If body is non-null, then set bodyWithType to the result of extracting body.\n if (body != null) {\n const [extractedBody, type] = extractBody(body)\n bodyWithType = { body: extractedBody, type }\n }\n\n // 5. Perform initialize a response given this, init, and bodyWithType.\n initializeResponse(this, init, bodyWithType)\n }\n\n // Returns response’s type, e.g., \"cors\".\n get type () {\n webidl.brandCheck(this, Response)\n\n // The type getter steps are to return this’s response’s type.\n return this[kState].type\n }\n\n // Returns response’s URL, if it has one; otherwise the empty string.\n get url () {\n webidl.brandCheck(this, Response)\n\n const urlList = this[kState].urlList\n\n // The url getter steps are to return the empty string if this’s\n // response’s URL is null; otherwise this’s response’s URL,\n // serialized with exclude fragment set to true.\n const url = urlList[urlList.length - 1] ?? null\n\n if (url === null) {\n return ''\n }\n\n return URLSerializer(url, true)\n }\n\n // Returns whether response was obtained through a redirect.\n get redirected () {\n webidl.brandCheck(this, Response)\n\n // The redirected getter steps are to return true if this’s response’s URL\n // list has more than one item; otherwise false.\n return this[kState].urlList.length > 1\n }\n\n // Returns response’s status.\n get status () {\n webidl.brandCheck(this, Response)\n\n // The status getter steps are to return this’s response’s status.\n return this[kState].status\n }\n\n // Returns whether response’s status is an ok status.\n get ok () {\n webidl.brandCheck(this, Response)\n\n // The ok getter steps are to return true if this’s response’s status is an\n // ok status; otherwise false.\n return this[kState].status >= 200 && this[kState].status <= 299\n }\n\n // Returns response’s status message.\n get statusText () {\n webidl.brandCheck(this, Response)\n\n // The statusText getter steps are to return this’s response’s status\n // message.\n return this[kState].statusText\n }\n\n // Returns response’s headers as Headers.\n get headers () {\n webidl.brandCheck(this, Response)\n\n // The headers getter steps are to return this’s headers.\n return this[kHeaders]\n }\n\n get body () {\n webidl.brandCheck(this, Response)\n\n return this[kState].body ? this[kState].body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Response)\n\n return !!this[kState].body && util.isDisturbed(this[kState].body.stream)\n }\n\n // Returns a clone of response.\n clone () {\n webidl.brandCheck(this, Response)\n\n // 1. If this is unusable, then throw a TypeError.\n if (this.bodyUsed || (this.body && this.body.locked)) {\n throw webidl.errors.exception({\n header: 'Response.clone',\n message: 'Body has already been consumed.'\n })\n }\n\n // 2. Let clonedResponse be the result of cloning this’s response.\n const clonedResponse = cloneResponse(this[kState])\n\n // 3. Return the result of creating a Response object, given\n // clonedResponse, this’s headers’s guard, and this’s relevant Realm.\n const clonedResponseObject = new Response()\n clonedResponseObject[kState] = clonedResponse\n clonedResponseObject[kRealm] = this[kRealm]\n clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList\n clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]\n clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]\n\n return clonedResponseObject\n }\n}\n\nmixinBody(Response)\n\nObject.defineProperties(Response.prototype, {\n type: kEnumerableProperty,\n url: kEnumerableProperty,\n status: kEnumerableProperty,\n ok: kEnumerableProperty,\n redirected: kEnumerableProperty,\n statusText: kEnumerableProperty,\n headers: kEnumerableProperty,\n clone: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Response',\n configurable: true\n }\n})\n\nObject.defineProperties(Response, {\n json: kEnumerableProperty,\n redirect: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\n// https://fetch.spec.whatwg.org/#concept-response-clone\nfunction cloneResponse (response) {\n // To clone a response response, run these steps:\n\n // 1. If response is a filtered response, then return a new identical\n // filtered response whose internal response is a clone of response’s\n // internal response.\n if (response.internalResponse) {\n return filterResponse(\n cloneResponse(response.internalResponse),\n response.type\n )\n }\n\n // 2. Let newResponse be a copy of response, except for its body.\n const newResponse = makeResponse({ ...response, body: null })\n\n // 3. If response’s body is non-null, then set newResponse’s body to the\n // result of cloning response’s body.\n if (response.body != null) {\n newResponse.body = cloneBody(response.body)\n }\n\n // 4. Return newResponse.\n return newResponse\n}\n\nfunction makeResponse (init) {\n return {\n aborted: false,\n rangeRequested: false,\n timingAllowPassed: false,\n requestIncludesCredentials: false,\n type: 'default',\n status: 200,\n timingInfo: null,\n cacheState: '',\n statusText: '',\n ...init,\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList(),\n urlList: init.urlList ? [...init.urlList] : []\n }\n}\n\nfunction makeNetworkError (reason) {\n const isError = isErrorLike(reason)\n return makeResponse({\n type: 'error',\n status: 0,\n error: isError\n ? reason\n : new Error(reason ? String(reason) : reason),\n aborted: reason && reason.name === 'AbortError'\n })\n}\n\nfunction makeFilteredResponse (response, state) {\n state = {\n internalResponse: response,\n ...state\n }\n\n return new Proxy(response, {\n get (target, p) {\n return p in state ? state[p] : target[p]\n },\n set (target, p, value) {\n assert(!(p in state))\n target[p] = value\n return true\n }\n })\n}\n\n// https://fetch.spec.whatwg.org/#concept-filtered-response\nfunction filterResponse (response, type) {\n // Set response to the following filtered response with response as its\n // internal response, depending on request’s response tainting:\n if (type === 'basic') {\n // A basic filtered response is a filtered response whose type is \"basic\"\n // and header list excludes any headers in internal response’s header list\n // whose name is a forbidden response-header name.\n\n // Note: undici does not implement forbidden response-header names\n return makeFilteredResponse(response, {\n type: 'basic',\n headersList: response.headersList\n })\n } else if (type === 'cors') {\n // A CORS filtered response is a filtered response whose type is \"cors\"\n // and header list excludes any headers in internal response’s header\n // list whose name is not a CORS-safelisted response-header name, given\n // internal response’s CORS-exposed header-name list.\n\n // Note: undici does not implement CORS-safelisted response-header names\n return makeFilteredResponse(response, {\n type: 'cors',\n headersList: response.headersList\n })\n } else if (type === 'opaque') {\n // An opaque filtered response is a filtered response whose type is\n // \"opaque\", URL list is the empty list, status is 0, status message\n // is the empty byte sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaque',\n urlList: Object.freeze([]),\n status: 0,\n statusText: '',\n body: null\n })\n } else if (type === 'opaqueredirect') {\n // An opaque-redirect filtered response is a filtered response whose type\n // is \"opaqueredirect\", status is 0, status message is the empty byte\n // sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaqueredirect',\n status: 0,\n statusText: '',\n headersList: [],\n body: null\n })\n } else {\n assert(false)\n }\n}\n\n// https://fetch.spec.whatwg.org/#appropriate-network-error\nfunction makeAppropriateNetworkError (fetchParams, err = null) {\n // 1. Assert: fetchParams is canceled.\n assert(isCancelled(fetchParams))\n\n // 2. Return an aborted network error if fetchParams is aborted;\n // otherwise return a network error.\n return isAborted(fetchParams)\n ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))\n : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))\n}\n\n// https://whatpr.org/fetch/1392.html#initialize-a-response\nfunction initializeResponse (response, init, body) {\n // 1. If init[\"status\"] is not in the range 200 to 599, inclusive, then\n // throw a RangeError.\n if (init.status !== null && (init.status < 200 || init.status > 599)) {\n throw new RangeError('init[\"status\"] must be in the range of 200 to 599, inclusive.')\n }\n\n // 2. If init[\"statusText\"] does not match the reason-phrase token production,\n // then throw a TypeError.\n if ('statusText' in init && init.statusText != null) {\n // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:\n // reason-phrase = *( HTAB / SP / VCHAR / obs-text )\n if (!isValidReasonPhrase(String(init.statusText))) {\n throw new TypeError('Invalid statusText')\n }\n }\n\n // 3. Set response’s response’s status to init[\"status\"].\n if ('status' in init && init.status != null) {\n response[kState].status = init.status\n }\n\n // 4. Set response’s response’s status message to init[\"statusText\"].\n if ('statusText' in init && init.statusText != null) {\n response[kState].statusText = init.statusText\n }\n\n // 5. If init[\"headers\"] exists, then fill response’s headers with init[\"headers\"].\n if ('headers' in init && init.headers != null) {\n fill(response[kHeaders], init.headers)\n }\n\n // 6. If body was given, then:\n if (body) {\n // 1. If response's status is a null body status, then throw a TypeError.\n if (nullBodyStatus.includes(response.status)) {\n throw webidl.errors.exception({\n header: 'Response constructor',\n message: 'Invalid response status code ' + response.status\n })\n }\n\n // 2. Set response's body to body's body.\n response[kState].body = body.body\n\n // 3. If body's type is non-null and response's header list does not contain\n // `Content-Type`, then append (`Content-Type`, body's type) to response's header list.\n if (body.type != null && !response[kState].headersList.contains('Content-Type')) {\n response[kState].headersList.append('content-type', body.type)\n }\n }\n}\n\nwebidl.converters.ReadableStream = webidl.interfaceConverter(\n ReadableStream\n)\n\nwebidl.converters.FormData = webidl.interfaceConverter(\n FormData\n)\n\nwebidl.converters.URLSearchParams = webidl.interfaceConverter(\n URLSearchParams\n)\n\n// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit\nwebidl.converters.XMLHttpRequestBodyInit = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) {\n return webidl.converters.BufferSource(V)\n }\n\n if (util.isFormDataLike(V)) {\n return webidl.converters.FormData(V, { strict: false })\n }\n\n if (V instanceof URLSearchParams) {\n return webidl.converters.URLSearchParams(V)\n }\n\n return webidl.converters.DOMString(V)\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit\nwebidl.converters.BodyInit = function (V) {\n if (V instanceof ReadableStream) {\n return webidl.converters.ReadableStream(V)\n }\n\n // Note: the spec doesn't include async iterables,\n // this is an undici extension.\n if (V?.[Symbol.asyncIterator]) {\n return V\n }\n\n return webidl.converters.XMLHttpRequestBodyInit(V)\n}\n\nwebidl.converters.ResponseInit = webidl.dictionaryConverter([\n {\n key: 'status',\n converter: webidl.converters['unsigned short'],\n defaultValue: 200\n },\n {\n key: 'statusText',\n converter: webidl.converters.ByteString,\n defaultValue: ''\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n }\n])\n\nmodule.exports = {\n makeNetworkError,\n makeResponse,\n makeAppropriateNetworkError,\n filterResponse,\n Response,\n cloneResponse\n}\n","'use strict'\n\nmodule.exports = {\n kUrl: Symbol('url'),\n kHeaders: Symbol('headers'),\n kSignal: Symbol('signal'),\n kState: Symbol('state'),\n kGuard: Symbol('guard'),\n kRealm: Symbol('realm')\n}\n","'use strict'\n\nconst { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require('./constants')\nconst { getGlobalOrigin } = require('./global')\nconst { performance } = require('perf_hooks')\nconst { isBlobLike, toUSVString, ReadableStreamFrom } = require('../core/util')\nconst assert = require('assert')\nconst { isUint8Array } = require('util/types')\n\n// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable\n/** @type {import('crypto')|undefined} */\nlet crypto\n\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\nfunction responseURL (response) {\n // https://fetch.spec.whatwg.org/#responses\n // A response has an associated URL. It is a pointer to the last URL\n // in response’s URL list and null if response’s URL list is empty.\n const urlList = response.urlList\n const length = urlList.length\n return length === 0 ? null : urlList[length - 1].toString()\n}\n\n// https://fetch.spec.whatwg.org/#concept-response-location-url\nfunction responseLocationURL (response, requestFragment) {\n // 1. If response’s status is not a redirect status, then return null.\n if (!redirectStatusSet.has(response.status)) {\n return null\n }\n\n // 2. Let location be the result of extracting header list values given\n // `Location` and response’s header list.\n let location = response.headersList.get('location')\n\n // 3. If location is a header value, then set location to the result of\n // parsing location with response’s URL.\n if (location !== null && isValidHeaderValue(location)) {\n location = new URL(location, responseURL(response))\n }\n\n // 4. If location is a URL whose fragment is null, then set location’s\n // fragment to requestFragment.\n if (location && !location.hash) {\n location.hash = requestFragment\n }\n\n // 5. Return location.\n return location\n}\n\n/** @returns {URL} */\nfunction requestCurrentURL (request) {\n return request.urlList[request.urlList.length - 1]\n}\n\nfunction requestBadPort (request) {\n // 1. Let url be request’s current URL.\n const url = requestCurrentURL(request)\n\n // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port,\n // then return blocked.\n if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) {\n return 'blocked'\n }\n\n // 3. Return allowed.\n return 'allowed'\n}\n\nfunction isErrorLike (object) {\n return object instanceof Error || (\n object?.constructor?.name === 'Error' ||\n object?.constructor?.name === 'DOMException'\n )\n}\n\n// Check whether |statusText| is a ByteString and\n// matches the Reason-Phrase token production.\n// RFC 2616: https://tools.ietf.org/html/rfc2616\n// RFC 7230: https://tools.ietf.org/html/rfc7230\n// \"reason-phrase = *( HTAB / SP / VCHAR / obs-text )\"\n// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116\nfunction isValidReasonPhrase (statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i)\n if (\n !(\n (\n c === 0x09 || // HTAB\n (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n (c >= 0x80 && c <= 0xff)\n ) // obs-text\n )\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n * @param {number} c\n */\nfunction isTokenCharCode (c) {\n switch (c) {\n case 0x22:\n case 0x28:\n case 0x29:\n case 0x2c:\n case 0x2f:\n case 0x3a:\n case 0x3b:\n case 0x3c:\n case 0x3d:\n case 0x3e:\n case 0x3f:\n case 0x40:\n case 0x5b:\n case 0x5c:\n case 0x5d:\n case 0x7b:\n case 0x7d:\n // DQUOTE and \"(),/:;<=>?@[\\]{}\"\n return false\n default:\n // VCHAR %x21-7E\n return c >= 0x21 && c <= 0x7e\n }\n}\n\n/**\n * @param {string} characters\n */\nfunction isValidHTTPToken (characters) {\n if (characters.length === 0) {\n return false\n }\n for (let i = 0; i < characters.length; ++i) {\n if (!isTokenCharCode(characters.charCodeAt(i))) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-name\n * @param {string} potentialValue\n */\nfunction isValidHeaderName (potentialValue) {\n return isValidHTTPToken(potentialValue)\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value\n * @param {string} potentialValue\n */\nfunction isValidHeaderValue (potentialValue) {\n // - Has no leading or trailing HTTP tab or space bytes.\n // - Contains no 0x00 (NUL) or HTTP newline bytes.\n if (\n potentialValue.startsWith('\\t') ||\n potentialValue.startsWith(' ') ||\n potentialValue.endsWith('\\t') ||\n potentialValue.endsWith(' ')\n ) {\n return false\n }\n\n if (\n potentialValue.includes('\\0') ||\n potentialValue.includes('\\r') ||\n potentialValue.includes('\\n')\n ) {\n return false\n }\n\n return true\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect\nfunction setRequestReferrerPolicyOnRedirect (request, actualResponse) {\n // Given a request request and a response actualResponse, this algorithm\n // updates request’s referrer policy according to the Referrer-Policy\n // header (if any) in actualResponse.\n\n // 1. Let policy be the result of executing § 8.1 Parse a referrer policy\n // from a Referrer-Policy header on actualResponse.\n\n // 8.1 Parse a referrer policy from a Referrer-Policy header\n // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list.\n const { headersList } = actualResponse\n // 2. Let policy be the empty string.\n // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token.\n // 4. Return policy.\n const policyHeader = (headersList.get('referrer-policy') ?? '').split(',')\n\n // Note: As the referrer-policy can contain multiple policies\n // separated by comma, we need to loop through all of them\n // and pick the first valid one.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy\n let policy = ''\n if (policyHeader.length > 0) {\n // The right-most policy takes precedence.\n // The left-most policy is the fallback.\n for (let i = policyHeader.length; i !== 0; i--) {\n const token = policyHeader[i - 1].trim()\n if (referrerPolicyTokens.has(token)) {\n policy = token\n break\n }\n }\n }\n\n // 2. If policy is not the empty string, then set request’s referrer policy to policy.\n if (policy !== '') {\n request.referrerPolicy = policy\n }\n}\n\n// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check\nfunction crossOriginResourcePolicyCheck () {\n // TODO\n return 'allowed'\n}\n\n// https://fetch.spec.whatwg.org/#concept-cors-check\nfunction corsCheck () {\n // TODO\n return 'success'\n}\n\n// https://fetch.spec.whatwg.org/#concept-tao-check\nfunction TAOCheck () {\n // TODO\n return 'success'\n}\n\nfunction appendFetchMetadata (httpRequest) {\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header\n\n // 1. Assert: r’s url is a potentially trustworthy URL.\n // TODO\n\n // 2. Let header be a Structured Header whose value is a token.\n let header = null\n\n // 3. Set header’s value to r’s mode.\n header = httpRequest.mode\n\n // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list.\n httpRequest.headersList.set('sec-fetch-mode', header)\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header\n // TODO\n}\n\n// https://fetch.spec.whatwg.org/#append-a-request-origin-header\nfunction appendRequestOriginHeader (request) {\n // 1. Let serializedOrigin be the result of byte-serializing a request origin with request.\n let serializedOrigin = request.origin\n\n // 2. If request’s response tainting is \"cors\" or request’s mode is \"websocket\", then append (`Origin`, serializedOrigin) to request’s header list.\n if (request.responseTainting === 'cors' || request.mode === 'websocket') {\n if (serializedOrigin) {\n request.headersList.append('origin', serializedOrigin)\n }\n\n // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then:\n } else if (request.method !== 'GET' && request.method !== 'HEAD') {\n // 1. Switch on request’s referrer policy:\n switch (request.referrerPolicy) {\n case 'no-referrer':\n // Set serializedOrigin to `null`.\n serializedOrigin = null\n break\n case 'no-referrer-when-downgrade':\n case 'strict-origin':\n case 'strict-origin-when-cross-origin':\n // If request’s origin is a tuple origin, its scheme is \"https\", and request’s current URL’s scheme is not \"https\", then set serializedOrigin to `null`.\n if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n case 'same-origin':\n // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`.\n if (!sameOrigin(request, requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n default:\n // Do nothing.\n }\n\n if (serializedOrigin) {\n // 2. Append (`Origin`, serializedOrigin) to request’s header list.\n request.headersList.append('origin', serializedOrigin)\n }\n }\n}\n\nfunction coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {\n // TODO\n return performance.now()\n}\n\n// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info\nfunction createOpaqueTimingInfo (timingInfo) {\n return {\n startTime: timingInfo.startTime ?? 0,\n redirectStartTime: 0,\n redirectEndTime: 0,\n postRedirectStartTime: timingInfo.startTime ?? 0,\n finalServiceWorkerStartTime: 0,\n finalNetworkResponseStartTime: 0,\n finalNetworkRequestStartTime: 0,\n endTime: 0,\n encodedBodySize: 0,\n decodedBodySize: 0,\n finalConnectionTimingInfo: null\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#policy-container\nfunction makePolicyContainer () {\n // Note: the fetch spec doesn't make use of embedder policy or CSP list\n return {\n referrerPolicy: 'strict-origin-when-cross-origin'\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container\nfunction clonePolicyContainer (policyContainer) {\n return {\n referrerPolicy: policyContainer.referrerPolicy\n }\n}\n\n// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer\nfunction determineRequestsReferrer (request) {\n // 1. Let policy be request's referrer policy.\n const policy = request.referrerPolicy\n\n // Note: policy cannot (shouldn't) be null or an empty string.\n assert(policy)\n\n // 2. Let environment be request’s client.\n\n let referrerSource = null\n\n // 3. Switch on request’s referrer:\n if (request.referrer === 'client') {\n // Note: node isn't a browser and doesn't implement document/iframes,\n // so we bypass this step and replace it with our own.\n\n const globalOrigin = getGlobalOrigin()\n\n if (!globalOrigin || globalOrigin.origin === 'null') {\n return 'no-referrer'\n }\n\n // note: we need to clone it as it's mutated\n referrerSource = new URL(globalOrigin)\n } else if (request.referrer instanceof URL) {\n // Let referrerSource be request’s referrer.\n referrerSource = request.referrer\n }\n\n // 4. Let request’s referrerURL be the result of stripping referrerSource for\n // use as a referrer.\n let referrerURL = stripURLForReferrer(referrerSource)\n\n // 5. Let referrerOrigin be the result of stripping referrerSource for use as\n // a referrer, with the origin-only flag set to true.\n const referrerOrigin = stripURLForReferrer(referrerSource, true)\n\n // 6. If the result of serializing referrerURL is a string whose length is\n // greater than 4096, set referrerURL to referrerOrigin.\n if (referrerURL.toString().length > 4096) {\n referrerURL = referrerOrigin\n }\n\n const areSameOrigin = sameOrigin(request, referrerURL)\n const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) &&\n !isURLPotentiallyTrustworthy(request.url)\n\n // 8. Execute the switch statements corresponding to the value of policy:\n switch (policy) {\n case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true)\n case 'unsafe-url': return referrerURL\n case 'same-origin':\n return areSameOrigin ? referrerOrigin : 'no-referrer'\n case 'origin-when-cross-origin':\n return areSameOrigin ? referrerURL : referrerOrigin\n case 'strict-origin-when-cross-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If the origin of referrerURL and the origin of request’s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(referrerURL, currentURL)) {\n return referrerURL\n }\n\n // 2. If referrerURL is a potentially trustworthy URL and request’s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n\n // 3. Return referrerOrigin.\n return referrerOrigin\n }\n case 'strict-origin': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request’s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n case 'no-referrer-when-downgrade': // eslint-disable-line\n /**\n * 1. If referrerURL is a potentially trustworthy URL and\n * request’s current URL is not a potentially trustworthy URL,\n * then return no referrer.\n * 2. Return referrerOrigin\n */\n\n default: // eslint-disable-line\n return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url\n * @param {URL} url\n * @param {boolean|undefined} originOnly\n */\nfunction stripURLForReferrer (url, originOnly) {\n // 1. Assert: url is a URL.\n assert(url instanceof URL)\n\n // 2. If url’s scheme is a local scheme, then return no referrer.\n if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') {\n return 'no-referrer'\n }\n\n // 3. Set url’s username to the empty string.\n url.username = ''\n\n // 4. Set url’s password to the empty string.\n url.password = ''\n\n // 5. Set url’s fragment to null.\n url.hash = ''\n\n // 6. If the origin-only flag is true, then:\n if (originOnly) {\n // 1. Set url’s path to « the empty string ».\n url.pathname = ''\n\n // 2. Set url’s query to null.\n url.search = ''\n }\n\n // 7. Return url.\n return url\n}\n\nfunction isURLPotentiallyTrustworthy (url) {\n if (!(url instanceof URL)) {\n return false\n }\n\n // If child of about, return true\n if (url.href === 'about:blank' || url.href === 'about:srcdoc') {\n return true\n }\n\n // If scheme is data, return true\n if (url.protocol === 'data:') return true\n\n // If file, return true\n if (url.protocol === 'file:') return true\n\n return isOriginPotentiallyTrustworthy(url.origin)\n\n function isOriginPotentiallyTrustworthy (origin) {\n // If origin is explicitly null, return false\n if (origin == null || origin === 'null') return false\n\n const originAsURL = new URL(origin)\n\n // If secure, return true\n if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') {\n return true\n }\n\n // If localhost or variants, return true\n if (/^127(?:\\.[0-9]+){0,2}\\.[0-9]+$|^\\[(?:0*:)*?:?0*1\\]$/.test(originAsURL.hostname) ||\n (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) ||\n (originAsURL.hostname.endsWith('.localhost'))) {\n return true\n }\n\n // If any other, return false\n return false\n }\n}\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist\n * @param {Uint8Array} bytes\n * @param {string} metadataList\n */\nfunction bytesMatch (bytes, metadataList) {\n // If node is not built with OpenSSL support, we cannot check\n // a request's integrity, so allow it by default (the spec will\n // allow requests if an invalid hash is given, as precedence).\n /* istanbul ignore if: only if node is built with --without-ssl */\n if (crypto === undefined) {\n return true\n }\n\n // 1. Let parsedMetadata be the result of parsing metadataList.\n const parsedMetadata = parseMetadata(metadataList)\n\n // 2. If parsedMetadata is no metadata, return true.\n if (parsedMetadata === 'no metadata') {\n return true\n }\n\n // 3. If parsedMetadata is the empty set, return true.\n if (parsedMetadata.length === 0) {\n return true\n }\n\n // 4. Let metadata be the result of getting the strongest\n // metadata from parsedMetadata.\n const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo))\n // get the strongest algorithm\n const strongest = list[0].algo\n // get all entries that use the strongest algorithm; ignore weaker\n const metadata = list.filter((item) => item.algo === strongest)\n\n // 5. For each item in metadata:\n for (const item of metadata) {\n // 1. Let algorithm be the alg component of item.\n const algorithm = item.algo\n\n // 2. Let expectedValue be the val component of item.\n let expectedValue = item.hash\n\n // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e\n // \"be liberal with padding\". This is annoying, and it's not even in the spec.\n\n if (expectedValue.endsWith('==')) {\n expectedValue = expectedValue.slice(0, -2)\n }\n\n // 3. Let actualValue be the result of applying algorithm to bytes.\n let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')\n\n if (actualValue.endsWith('==')) {\n actualValue = actualValue.slice(0, -2)\n }\n\n // 4. If actualValue is a case-sensitive match for expectedValue,\n // return true.\n if (actualValue === expectedValue) {\n return true\n }\n\n let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url')\n\n if (actualBase64URL.endsWith('==')) {\n actualBase64URL = actualBase64URL.slice(0, -2)\n }\n\n if (actualBase64URL === expectedValue) {\n return true\n }\n }\n\n // 6. Return false.\n return false\n}\n\n// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options\n// https://www.w3.org/TR/CSP2/#source-list-syntax\n// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1\nconst parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={0,2}))( +[\\x21-\\x7e]?)?/i\n\n/**\n * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata\n * @param {string} metadata\n */\nfunction parseMetadata (metadata) {\n // 1. Let result be the empty set.\n /** @type {{ algo: string, hash: string }[]} */\n const result = []\n\n // 2. Let empty be equal to true.\n let empty = true\n\n const supportedHashes = crypto.getHashes()\n\n // 3. For each token returned by splitting metadata on spaces:\n for (const token of metadata.split(' ')) {\n // 1. Set empty to false.\n empty = false\n\n // 2. Parse token as a hash-with-options.\n const parsedToken = parseHashWithOptions.exec(token)\n\n // 3. If token does not parse, continue to the next token.\n if (parsedToken === null || parsedToken.groups === undefined) {\n // Note: Chromium blocks the request at this point, but Firefox\n // gives a warning that an invalid integrity was given. The\n // correct behavior is to ignore these, and subsequently not\n // check the integrity of the resource.\n continue\n }\n\n // 4. Let algorithm be the hash-algo component of token.\n const algorithm = parsedToken.groups.algo\n\n // 5. If algorithm is a hash function recognized by the user\n // agent, add the parsed token to result.\n if (supportedHashes.includes(algorithm.toLowerCase())) {\n result.push(parsedToken.groups)\n }\n }\n\n // 4. Return no metadata if empty is true, otherwise return result.\n if (empty === true) {\n return 'no metadata'\n }\n\n return result\n}\n\n// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request\nfunction tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {\n // TODO\n}\n\n/**\n * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}\n * @param {URL} A\n * @param {URL} B\n */\nfunction sameOrigin (A, B) {\n // 1. If A and B are the same opaque origin, then return true.\n if (A.origin === B.origin && A.origin === 'null') {\n return true\n }\n\n // 2. If A and B are both tuple origins and their schemes,\n // hosts, and port are identical, then return true.\n if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {\n return true\n }\n\n // 3. Return false.\n return false\n}\n\nfunction createDeferredPromise () {\n let res\n let rej\n const promise = new Promise((resolve, reject) => {\n res = resolve\n rej = reject\n })\n\n return { promise, resolve: res, reject: rej }\n}\n\nfunction isAborted (fetchParams) {\n return fetchParams.controller.state === 'aborted'\n}\n\nfunction isCancelled (fetchParams) {\n return fetchParams.controller.state === 'aborted' ||\n fetchParams.controller.state === 'terminated'\n}\n\nconst normalizeMethodRecord = {\n delete: 'DELETE',\n DELETE: 'DELETE',\n get: 'GET',\n GET: 'GET',\n head: 'HEAD',\n HEAD: 'HEAD',\n options: 'OPTIONS',\n OPTIONS: 'OPTIONS',\n post: 'POST',\n POST: 'POST',\n put: 'PUT',\n PUT: 'PUT'\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(normalizeMethodRecord, null)\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-method-normalize\n * @param {string} method\n */\nfunction normalizeMethod (method) {\n return normalizeMethodRecord[method.toLowerCase()] ?? method\n}\n\n// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string\nfunction serializeJavascriptValueToJSONString (value) {\n // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »).\n const result = JSON.stringify(value)\n\n // 2. If result is undefined, then throw a TypeError.\n if (result === undefined) {\n throw new TypeError('Value is not JSON serializable')\n }\n\n // 3. Assert: result is a string.\n assert(typeof result === 'string')\n\n // 4. Return result.\n return result\n}\n\n// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object\nconst esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {() => unknown[]} iterator\n * @param {string} name name of the instance\n * @param {'key'|'value'|'key+value'} kind\n */\nfunction makeIterator (iterator, name, kind) {\n const object = {\n index: 0,\n kind,\n target: iterator\n }\n\n const i = {\n next () {\n // 1. Let interface be the interface for which the iterator prototype object exists.\n\n // 2. Let thisValue be the this value.\n\n // 3. Let object be ? ToObject(thisValue).\n\n // 4. If object is a platform object, then perform a security\n // check, passing:\n\n // 5. If object is not a default iterator object for interface,\n // then throw a TypeError.\n if (Object.getPrototypeOf(this) !== i) {\n throw new TypeError(\n `'next' called on an object that does not implement interface ${name} Iterator.`\n )\n }\n\n // 6. Let index be object’s index.\n // 7. Let kind be object’s kind.\n // 8. Let values be object’s target's value pairs to iterate over.\n const { index, kind, target } = object\n const values = target()\n\n // 9. Let len be the length of values.\n const len = values.length\n\n // 10. If index is greater than or equal to len, then return\n // CreateIterResultObject(undefined, true).\n if (index >= len) {\n return { value: undefined, done: true }\n }\n\n // 11. Let pair be the entry in values at index index.\n const pair = values[index]\n\n // 12. Set object’s index to index + 1.\n object.index = index + 1\n\n // 13. Return the iterator result for pair and kind.\n return iteratorResult(pair, kind)\n },\n // The class string of an iterator prototype object for a given interface is the\n // result of concatenating the identifier of the interface and the string \" Iterator\".\n [Symbol.toStringTag]: `${name} Iterator`\n }\n\n // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%.\n Object.setPrototypeOf(i, esIteratorPrototype)\n // esIteratorPrototype needs to be the prototype of i\n // which is the prototype of an empty object. Yes, it's confusing.\n return Object.setPrototypeOf({}, i)\n}\n\n// https://webidl.spec.whatwg.org/#iterator-result\nfunction iteratorResult (pair, kind) {\n let result\n\n // 1. Let result be a value determined by the value of kind:\n switch (kind) {\n case 'key': {\n // 1. Let idlKey be pair’s key.\n // 2. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 3. result is key.\n result = pair[0]\n break\n }\n case 'value': {\n // 1. Let idlValue be pair’s value.\n // 2. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 3. result is value.\n result = pair[1]\n break\n }\n case 'key+value': {\n // 1. Let idlKey be pair’s key.\n // 2. Let idlValue be pair’s value.\n // 3. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 4. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 5. Let array be ! ArrayCreate(2).\n // 6. Call ! CreateDataProperty(array, \"0\", key).\n // 7. Call ! CreateDataProperty(array, \"1\", value).\n // 8. result is array.\n result = pair\n break\n }\n }\n\n // 2. Return CreateIterResultObject(result, false).\n return { value: result, done: false }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-fully-read\n */\nasync function fullyReadBody (body, processBody, processBodyError) {\n // 1. If taskDestination is null, then set taskDestination to\n // the result of starting a new parallel queue.\n\n // 2. Let successSteps given a byte sequence bytes be to queue a\n // fetch task to run processBody given bytes, with taskDestination.\n const successSteps = processBody\n\n // 3. Let errorSteps be to queue a fetch task to run processBodyError,\n // with taskDestination.\n const errorSteps = processBodyError\n\n // 4. Let reader be the result of getting a reader for body’s stream.\n // If that threw an exception, then run errorSteps with that\n // exception and return.\n let reader\n\n try {\n reader = body.stream.getReader()\n } catch (e) {\n errorSteps(e)\n return\n }\n\n // 5. Read all bytes from reader, given successSteps and errorSteps.\n try {\n const result = await readAllBytes(reader)\n successSteps(result)\n } catch (e) {\n errorSteps(e)\n }\n}\n\n/** @type {ReadableStream} */\nlet ReadableStream = globalThis.ReadableStream\n\nfunction isReadableStreamLike (stream) {\n if (!ReadableStream) {\n ReadableStream = require('stream/web').ReadableStream\n }\n\n return stream instanceof ReadableStream || (\n stream[Symbol.toStringTag] === 'ReadableStream' &&\n typeof stream.tee === 'function'\n )\n}\n\nconst MAXIMUM_ARGUMENT_LENGTH = 65535\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-decode\n * @param {number[]|Uint8Array} input\n */\nfunction isomorphicDecode (input) {\n // 1. To isomorphic decode a byte sequence input, return a string whose code point\n // length is equal to input’s length and whose code points have the same values\n // as the values of input’s bytes, in the same order.\n\n if (input.length < MAXIMUM_ARGUMENT_LENGTH) {\n return String.fromCharCode(...input)\n }\n\n return input.reduce((previous, current) => previous + String.fromCharCode(current), '')\n}\n\n/**\n * @param {ReadableStreamController} controller\n */\nfunction readableStreamClose (controller) {\n try {\n controller.close()\n } catch (err) {\n // TODO: add comment explaining why this error occurs.\n if (!err.message.includes('Controller is already closed')) {\n throw err\n }\n }\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#isomorphic-encode\n * @param {string} input\n */\nfunction isomorphicEncode (input) {\n // 1. Assert: input contains no code points greater than U+00FF.\n for (let i = 0; i < input.length; i++) {\n assert(input.charCodeAt(i) <= 0xFF)\n }\n\n // 2. Return a byte sequence whose length is equal to input’s code\n // point length and whose bytes have the same values as the\n // values of input’s code points, in the same order\n return input\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes\n * @see https://streams.spec.whatwg.org/#read-loop\n * @param {ReadableStreamDefaultReader} reader\n */\nasync function readAllBytes (reader) {\n const bytes = []\n let byteLength = 0\n\n while (true) {\n const { done, value: chunk } = await reader.read()\n\n if (done) {\n // 1. Call successSteps with bytes.\n return Buffer.concat(bytes, byteLength)\n }\n\n // 1. If chunk is not a Uint8Array object, call failureSteps\n // with a TypeError and abort these steps.\n if (!isUint8Array(chunk)) {\n throw new TypeError('Received non-Uint8Array chunk')\n }\n\n // 2. Append the bytes represented by chunk to bytes.\n bytes.push(chunk)\n byteLength += chunk.length\n\n // 3. Read-loop given reader, bytes, successSteps, and failureSteps.\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#is-local\n * @param {URL} url\n */\nfunction urlIsLocal (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'\n}\n\n/**\n * @param {string|URL} url\n */\nfunction urlHasHttpsScheme (url) {\n if (typeof url === 'string') {\n return url.startsWith('https:')\n }\n\n return url.protocol === 'https:'\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-scheme\n * @param {URL} url\n */\nfunction urlIsHttpHttpsScheme (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'http:' || protocol === 'https:'\n}\n\n/**\n * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0.\n */\nconst hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key))\n\nmodule.exports = {\n isAborted,\n isCancelled,\n createDeferredPromise,\n ReadableStreamFrom,\n toUSVString,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n coarsenedSharedCurrentTime,\n determineRequestsReferrer,\n makePolicyContainer,\n clonePolicyContainer,\n appendFetchMetadata,\n appendRequestOriginHeader,\n TAOCheck,\n corsCheck,\n crossOriginResourcePolicyCheck,\n createOpaqueTimingInfo,\n setRequestReferrerPolicyOnRedirect,\n isValidHTTPToken,\n requestBadPort,\n requestCurrentURL,\n responseURL,\n responseLocationURL,\n isBlobLike,\n isURLPotentiallyTrustworthy,\n isValidReasonPhrase,\n sameOrigin,\n normalizeMethod,\n serializeJavascriptValueToJSONString,\n makeIterator,\n isValidHeaderName,\n isValidHeaderValue,\n hasOwn,\n isErrorLike,\n fullyReadBody,\n bytesMatch,\n isReadableStreamLike,\n readableStreamClose,\n isomorphicEncode,\n isomorphicDecode,\n urlIsLocal,\n urlHasHttpsScheme,\n urlIsHttpHttpsScheme,\n readAllBytes,\n normalizeMethodRecord\n}\n","'use strict'\n\nconst { types } = require('util')\nconst { hasOwn, toUSVString } = require('./util')\n\n/** @type {import('../../types/webidl').Webidl} */\nconst webidl = {}\nwebidl.converters = {}\nwebidl.util = {}\nwebidl.errors = {}\n\nwebidl.errors.exception = function (message) {\n return new TypeError(`${message.header}: ${message.message}`)\n}\n\nwebidl.errors.conversionFailed = function (context) {\n const plural = context.types.length === 1 ? '' : ' one of'\n const message =\n `${context.argument} could not be converted to` +\n `${plural}: ${context.types.join(', ')}.`\n\n return webidl.errors.exception({\n header: context.prefix,\n message\n })\n}\n\nwebidl.errors.invalidArgument = function (context) {\n return webidl.errors.exception({\n header: context.prefix,\n message: `\"${context.value}\" is an invalid ${context.type}.`\n })\n}\n\n// https://webidl.spec.whatwg.org/#implements\nwebidl.brandCheck = function (V, I, opts = undefined) {\n if (opts?.strict !== false && !(V instanceof I)) {\n throw new TypeError('Illegal invocation')\n } else {\n return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag]\n }\n}\n\nwebidl.argumentLengthCheck = function ({ length }, min, ctx) {\n if (length < min) {\n throw webidl.errors.exception({\n message: `${min} argument${min !== 1 ? 's' : ''} required, ` +\n `but${length ? ' only' : ''} ${length} found.`,\n ...ctx\n })\n }\n}\n\nwebidl.illegalConstructor = function () {\n throw webidl.errors.exception({\n header: 'TypeError',\n message: 'Illegal constructor'\n })\n}\n\n// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values\nwebidl.util.Type = function (V) {\n switch (typeof V) {\n case 'undefined': return 'Undefined'\n case 'boolean': return 'Boolean'\n case 'string': return 'String'\n case 'symbol': return 'Symbol'\n case 'number': return 'Number'\n case 'bigint': return 'BigInt'\n case 'function':\n case 'object': {\n if (V === null) {\n return 'Null'\n }\n\n return 'Object'\n }\n }\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint\nwebidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) {\n let upperBound\n let lowerBound\n\n // 1. If bitLength is 64, then:\n if (bitLength === 64) {\n // 1. Let upperBound be 2^53 − 1.\n upperBound = Math.pow(2, 53) - 1\n\n // 2. If signedness is \"unsigned\", then let lowerBound be 0.\n if (signedness === 'unsigned') {\n lowerBound = 0\n } else {\n // 3. Otherwise let lowerBound be −2^53 + 1.\n lowerBound = Math.pow(-2, 53) + 1\n }\n } else if (signedness === 'unsigned') {\n // 2. Otherwise, if signedness is \"unsigned\", then:\n\n // 1. Let lowerBound be 0.\n lowerBound = 0\n\n // 2. Let upperBound be 2^bitLength − 1.\n upperBound = Math.pow(2, bitLength) - 1\n } else {\n // 3. Otherwise:\n\n // 1. Let lowerBound be -2^bitLength − 1.\n lowerBound = Math.pow(-2, bitLength) - 1\n\n // 2. Let upperBound be 2^bitLength − 1 − 1.\n upperBound = Math.pow(2, bitLength - 1) - 1\n }\n\n // 4. Let x be ? ToNumber(V).\n let x = Number(V)\n\n // 5. If x is −0, then set x to +0.\n if (x === 0) {\n x = 0\n }\n\n // 6. If the conversion is to an IDL type associated\n // with the [EnforceRange] extended attribute, then:\n if (opts.enforceRange === true) {\n // 1. If x is NaN, +∞, or −∞, then throw a TypeError.\n if (\n Number.isNaN(x) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Could not convert ${V} to an integer.`\n })\n }\n\n // 2. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 3. If x < lowerBound or x > upperBound, then\n // throw a TypeError.\n if (x < lowerBound || x > upperBound) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.`\n })\n }\n\n // 4. Return x.\n return x\n }\n\n // 7. If x is not NaN and the conversion is to an IDL\n // type associated with the [Clamp] extended\n // attribute, then:\n if (!Number.isNaN(x) && opts.clamp === true) {\n // 1. Set x to min(max(x, lowerBound), upperBound).\n x = Math.min(Math.max(x, lowerBound), upperBound)\n\n // 2. Round x to the nearest integer, choosing the\n // even integer if it lies halfway between two,\n // and choosing +0 rather than −0.\n if (Math.floor(x) % 2 === 0) {\n x = Math.floor(x)\n } else {\n x = Math.ceil(x)\n }\n\n // 3. Return x.\n return x\n }\n\n // 8. If x is NaN, +0, +∞, or −∞, then return +0.\n if (\n Number.isNaN(x) ||\n (x === 0 && Object.is(0, x)) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n return 0\n }\n\n // 9. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 10. Set x to x modulo 2^bitLength.\n x = x % Math.pow(2, bitLength)\n\n // 11. If signedness is \"signed\" and x ≥ 2^bitLength − 1,\n // then return x − 2^bitLength.\n if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {\n return x - Math.pow(2, bitLength)\n }\n\n // 12. Otherwise, return x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart\nwebidl.util.IntegerPart = function (n) {\n // 1. Let r be floor(abs(n)).\n const r = Math.floor(Math.abs(n))\n\n // 2. If n < 0, then return -1 × r.\n if (n < 0) {\n return -1 * r\n }\n\n // 3. Otherwise, return r.\n return r\n}\n\n// https://webidl.spec.whatwg.org/#es-sequence\nwebidl.sequenceConverter = function (converter) {\n return (V) => {\n // 1. If Type(V) is not Object, throw a TypeError.\n if (webidl.util.Type(V) !== 'Object') {\n throw webidl.errors.exception({\n header: 'Sequence',\n message: `Value of type ${webidl.util.Type(V)} is not an Object.`\n })\n }\n\n // 2. Let method be ? GetMethod(V, @@iterator).\n /** @type {Generator} */\n const method = V?.[Symbol.iterator]?.()\n const seq = []\n\n // 3. If method is undefined, throw a TypeError.\n if (\n method === undefined ||\n typeof method.next !== 'function'\n ) {\n throw webidl.errors.exception({\n header: 'Sequence',\n message: 'Object is not an iterator.'\n })\n }\n\n // https://webidl.spec.whatwg.org/#create-sequence-from-iterable\n while (true) {\n const { done, value } = method.next()\n\n if (done) {\n break\n }\n\n seq.push(converter(value))\n }\n\n return seq\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-to-record\nwebidl.recordConverter = function (keyConverter, valueConverter) {\n return (O) => {\n // 1. If Type(O) is not Object, throw a TypeError.\n if (webidl.util.Type(O) !== 'Object') {\n throw webidl.errors.exception({\n header: 'Record',\n message: `Value of type ${webidl.util.Type(O)} is not an Object.`\n })\n }\n\n // 2. Let result be a new empty instance of record.\n const result = {}\n\n if (!types.isProxy(O)) {\n // Object.keys only returns enumerable properties\n const keys = Object.keys(O)\n\n for (const key of keys) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key])\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n\n // 5. Return result.\n return result\n }\n\n // 3. Let keys be ? O.[[OwnPropertyKeys]]().\n const keys = Reflect.ownKeys(O)\n\n // 4. For each key of keys.\n for (const key of keys) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const desc = Reflect.getOwnPropertyDescriptor(O, key)\n\n // 2. If desc is not undefined and desc.[[Enumerable]] is true:\n if (desc?.enumerable) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key])\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n }\n\n // 5. Return result.\n return result\n }\n}\n\nwebidl.interfaceConverter = function (i) {\n return (V, opts = {}) => {\n if (opts.strict !== false && !(V instanceof i)) {\n throw webidl.errors.exception({\n header: i.name,\n message: `Expected ${V} to be an instance of ${i.name}.`\n })\n }\n\n return V\n }\n}\n\nwebidl.dictionaryConverter = function (converters) {\n return (dictionary) => {\n const type = webidl.util.Type(dictionary)\n const dict = {}\n\n if (type === 'Null' || type === 'Undefined') {\n return dict\n } else if (type !== 'Object') {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`\n })\n }\n\n for (const options of converters) {\n const { key, defaultValue, required, converter } = options\n\n if (required === true) {\n if (!hasOwn(dictionary, key)) {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `Missing required key \"${key}\".`\n })\n }\n }\n\n let value = dictionary[key]\n const hasDefault = hasOwn(options, 'defaultValue')\n\n // Only use defaultValue if value is undefined and\n // a defaultValue options was provided.\n if (hasDefault && value !== null) {\n value = value ?? defaultValue\n }\n\n // A key can be optional and have no default value.\n // When this happens, do not perform a conversion,\n // and do not assign the key a value.\n if (required || hasDefault || value !== undefined) {\n value = converter(value)\n\n if (\n options.allowedValues &&\n !options.allowedValues.includes(value)\n ) {\n throw webidl.errors.exception({\n header: 'Dictionary',\n message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.`\n })\n }\n\n dict[key] = value\n }\n }\n\n return dict\n }\n}\n\nwebidl.nullableConverter = function (converter) {\n return (V) => {\n if (V === null) {\n return V\n }\n\n return converter(V)\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-DOMString\nwebidl.converters.DOMString = function (V, opts = {}) {\n // 1. If V is null and the conversion is to an IDL type\n // associated with the [LegacyNullToEmptyString]\n // extended attribute, then return the DOMString value\n // that represents the empty string.\n if (V === null && opts.legacyNullToEmptyString) {\n return ''\n }\n\n // 2. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw new TypeError('Could not convert argument of type symbol to string.')\n }\n\n // 3. Return the IDL DOMString value that represents the\n // same sequence of code units as the one the\n // ECMAScript String value x represents.\n return String(V)\n}\n\n// https://webidl.spec.whatwg.org/#es-ByteString\nwebidl.converters.ByteString = function (V) {\n // 1. Let x be ? ToString(V).\n // Note: DOMString converter perform ? ToString(V)\n const x = webidl.converters.DOMString(V)\n\n // 2. If the value of any element of x is greater than\n // 255, then throw a TypeError.\n for (let index = 0; index < x.length; index++) {\n if (x.charCodeAt(index) > 255) {\n throw new TypeError(\n 'Cannot convert argument to a ByteString because the character at ' +\n `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`\n )\n }\n }\n\n // 3. Return an IDL ByteString value whose length is the\n // length of x, and where the value of each element is\n // the value of the corresponding element of x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-USVString\nwebidl.converters.USVString = toUSVString\n\n// https://webidl.spec.whatwg.org/#es-boolean\nwebidl.converters.boolean = function (V) {\n // 1. Let x be the result of computing ToBoolean(V).\n const x = Boolean(V)\n\n // 2. Return the IDL boolean value that is the one that represents\n // the same truth value as the ECMAScript Boolean value x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-any\nwebidl.converters.any = function (V) {\n return V\n}\n\n// https://webidl.spec.whatwg.org/#es-long-long\nwebidl.converters['long long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 64, \"signed\").\n const x = webidl.util.ConvertToInt(V, 64, 'signed')\n\n // 2. Return the IDL long long value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long-long\nwebidl.converters['unsigned long long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 64, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 64, 'unsigned')\n\n // 2. Return the IDL unsigned long long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long\nwebidl.converters['unsigned long'] = function (V) {\n // 1. Let x be ? ConvertToInt(V, 32, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 32, 'unsigned')\n\n // 2. Return the IDL unsigned long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-short\nwebidl.converters['unsigned short'] = function (V, opts) {\n // 1. Let x be ? ConvertToInt(V, 16, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts)\n\n // 2. Return the IDL unsigned short value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#idl-ArrayBuffer\nwebidl.converters.ArrayBuffer = function (V, opts = {}) {\n // 1. If Type(V) is not Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances\n // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isAnyArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix: `${V}`,\n argument: `${V}`,\n types: ['ArrayBuffer']\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V) is true, then throw a\n // TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n // Note: resizable ArrayBuffers are currently a proposal.\n\n // 4. Return the IDL ArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\nwebidl.converters.TypedArray = function (V, T, opts = {}) {\n // 1. Let T be the IDL type V is being converted to.\n\n // 2. If Type(V) is not Object, or V does not have a\n // [[TypedArrayName]] internal slot with a value\n // equal to T’s name, then throw a TypeError.\n if (\n webidl.util.Type(V) !== 'Object' ||\n !types.isTypedArray(V) ||\n V.constructor.name !== T.name\n ) {\n throw webidl.errors.conversionFailed({\n prefix: `${T.name}`,\n argument: `${V}`,\n types: [T.name]\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 4. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n // Note: resizable array buffers are currently a proposal\n\n // 5. Return the IDL value of type T that is a reference\n // to the same object as V.\n return V\n}\n\nwebidl.converters.DataView = function (V, opts = {}) {\n // 1. If Type(V) is not Object, or V does not have a\n // [[DataView]] internal slot, then throw a TypeError.\n if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) {\n throw webidl.errors.exception({\n header: 'DataView',\n message: 'Object is not a DataView.'\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,\n // then throw a TypeError.\n if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: 'ArrayBuffer',\n message: 'SharedArrayBuffer is not allowed.'\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n // Note: resizable ArrayBuffers are currently a proposal\n\n // 4. Return the IDL DataView value that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#BufferSource\nwebidl.converters.BufferSource = function (V, opts = {}) {\n if (types.isAnyArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, opts)\n }\n\n if (types.isTypedArray(V)) {\n return webidl.converters.TypedArray(V, V.constructor)\n }\n\n if (types.isDataView(V)) {\n return webidl.converters.DataView(V, opts)\n }\n\n throw new TypeError(`Could not convert ${V} to a BufferSource.`)\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.ByteString\n)\n\nwebidl.converters['sequence>'] = webidl.sequenceConverter(\n webidl.converters['sequence']\n)\n\nwebidl.converters['record'] = webidl.recordConverter(\n webidl.converters.ByteString,\n webidl.converters.ByteString\n)\n\nmodule.exports = {\n webidl\n}\n","'use strict'\n\n/**\n * @see https://encoding.spec.whatwg.org/#concept-encoding-get\n * @param {string|undefined} label\n */\nfunction getEncoding (label) {\n if (!label) {\n return 'failure'\n }\n\n // 1. Remove any leading and trailing ASCII whitespace from label.\n // 2. If label is an ASCII case-insensitive match for any of the\n // labels listed in the table below, then return the\n // corresponding encoding; otherwise return failure.\n switch (label.trim().toLowerCase()) {\n case 'unicode-1-1-utf-8':\n case 'unicode11utf8':\n case 'unicode20utf8':\n case 'utf-8':\n case 'utf8':\n case 'x-unicode20utf8':\n return 'UTF-8'\n case '866':\n case 'cp866':\n case 'csibm866':\n case 'ibm866':\n return 'IBM866'\n case 'csisolatin2':\n case 'iso-8859-2':\n case 'iso-ir-101':\n case 'iso8859-2':\n case 'iso88592':\n case 'iso_8859-2':\n case 'iso_8859-2:1987':\n case 'l2':\n case 'latin2':\n return 'ISO-8859-2'\n case 'csisolatin3':\n case 'iso-8859-3':\n case 'iso-ir-109':\n case 'iso8859-3':\n case 'iso88593':\n case 'iso_8859-3':\n case 'iso_8859-3:1988':\n case 'l3':\n case 'latin3':\n return 'ISO-8859-3'\n case 'csisolatin4':\n case 'iso-8859-4':\n case 'iso-ir-110':\n case 'iso8859-4':\n case 'iso88594':\n case 'iso_8859-4':\n case 'iso_8859-4:1988':\n case 'l4':\n case 'latin4':\n return 'ISO-8859-4'\n case 'csisolatincyrillic':\n case 'cyrillic':\n case 'iso-8859-5':\n case 'iso-ir-144':\n case 'iso8859-5':\n case 'iso88595':\n case 'iso_8859-5':\n case 'iso_8859-5:1988':\n return 'ISO-8859-5'\n case 'arabic':\n case 'asmo-708':\n case 'csiso88596e':\n case 'csiso88596i':\n case 'csisolatinarabic':\n case 'ecma-114':\n case 'iso-8859-6':\n case 'iso-8859-6-e':\n case 'iso-8859-6-i':\n case 'iso-ir-127':\n case 'iso8859-6':\n case 'iso88596':\n case 'iso_8859-6':\n case 'iso_8859-6:1987':\n return 'ISO-8859-6'\n case 'csisolatingreek':\n case 'ecma-118':\n case 'elot_928':\n case 'greek':\n case 'greek8':\n case 'iso-8859-7':\n case 'iso-ir-126':\n case 'iso8859-7':\n case 'iso88597':\n case 'iso_8859-7':\n case 'iso_8859-7:1987':\n case 'sun_eu_greek':\n return 'ISO-8859-7'\n case 'csiso88598e':\n case 'csisolatinhebrew':\n case 'hebrew':\n case 'iso-8859-8':\n case 'iso-8859-8-e':\n case 'iso-ir-138':\n case 'iso8859-8':\n case 'iso88598':\n case 'iso_8859-8':\n case 'iso_8859-8:1988':\n case 'visual':\n return 'ISO-8859-8'\n case 'csiso88598i':\n case 'iso-8859-8-i':\n case 'logical':\n return 'ISO-8859-8-I'\n case 'csisolatin6':\n case 'iso-8859-10':\n case 'iso-ir-157':\n case 'iso8859-10':\n case 'iso885910':\n case 'l6':\n case 'latin6':\n return 'ISO-8859-10'\n case 'iso-8859-13':\n case 'iso8859-13':\n case 'iso885913':\n return 'ISO-8859-13'\n case 'iso-8859-14':\n case 'iso8859-14':\n case 'iso885914':\n return 'ISO-8859-14'\n case 'csisolatin9':\n case 'iso-8859-15':\n case 'iso8859-15':\n case 'iso885915':\n case 'iso_8859-15':\n case 'l9':\n return 'ISO-8859-15'\n case 'iso-8859-16':\n return 'ISO-8859-16'\n case 'cskoi8r':\n case 'koi':\n case 'koi8':\n case 'koi8-r':\n case 'koi8_r':\n return 'KOI8-R'\n case 'koi8-ru':\n case 'koi8-u':\n return 'KOI8-U'\n case 'csmacintosh':\n case 'mac':\n case 'macintosh':\n case 'x-mac-roman':\n return 'macintosh'\n case 'iso-8859-11':\n case 'iso8859-11':\n case 'iso885911':\n case 'tis-620':\n case 'windows-874':\n return 'windows-874'\n case 'cp1250':\n case 'windows-1250':\n case 'x-cp1250':\n return 'windows-1250'\n case 'cp1251':\n case 'windows-1251':\n case 'x-cp1251':\n return 'windows-1251'\n case 'ansi_x3.4-1968':\n case 'ascii':\n case 'cp1252':\n case 'cp819':\n case 'csisolatin1':\n case 'ibm819':\n case 'iso-8859-1':\n case 'iso-ir-100':\n case 'iso8859-1':\n case 'iso88591':\n case 'iso_8859-1':\n case 'iso_8859-1:1987':\n case 'l1':\n case 'latin1':\n case 'us-ascii':\n case 'windows-1252':\n case 'x-cp1252':\n return 'windows-1252'\n case 'cp1253':\n case 'windows-1253':\n case 'x-cp1253':\n return 'windows-1253'\n case 'cp1254':\n case 'csisolatin5':\n case 'iso-8859-9':\n case 'iso-ir-148':\n case 'iso8859-9':\n case 'iso88599':\n case 'iso_8859-9':\n case 'iso_8859-9:1989':\n case 'l5':\n case 'latin5':\n case 'windows-1254':\n case 'x-cp1254':\n return 'windows-1254'\n case 'cp1255':\n case 'windows-1255':\n case 'x-cp1255':\n return 'windows-1255'\n case 'cp1256':\n case 'windows-1256':\n case 'x-cp1256':\n return 'windows-1256'\n case 'cp1257':\n case 'windows-1257':\n case 'x-cp1257':\n return 'windows-1257'\n case 'cp1258':\n case 'windows-1258':\n case 'x-cp1258':\n return 'windows-1258'\n case 'x-mac-cyrillic':\n case 'x-mac-ukrainian':\n return 'x-mac-cyrillic'\n case 'chinese':\n case 'csgb2312':\n case 'csiso58gb231280':\n case 'gb2312':\n case 'gb_2312':\n case 'gb_2312-80':\n case 'gbk':\n case 'iso-ir-58':\n case 'x-gbk':\n return 'GBK'\n case 'gb18030':\n return 'gb18030'\n case 'big5':\n case 'big5-hkscs':\n case 'cn-big5':\n case 'csbig5':\n case 'x-x-big5':\n return 'Big5'\n case 'cseucpkdfmtjapanese':\n case 'euc-jp':\n case 'x-euc-jp':\n return 'EUC-JP'\n case 'csiso2022jp':\n case 'iso-2022-jp':\n return 'ISO-2022-JP'\n case 'csshiftjis':\n case 'ms932':\n case 'ms_kanji':\n case 'shift-jis':\n case 'shift_jis':\n case 'sjis':\n case 'windows-31j':\n case 'x-sjis':\n return 'Shift_JIS'\n case 'cseuckr':\n case 'csksc56011987':\n case 'euc-kr':\n case 'iso-ir-149':\n case 'korean':\n case 'ks_c_5601-1987':\n case 'ks_c_5601-1989':\n case 'ksc5601':\n case 'ksc_5601':\n case 'windows-949':\n return 'EUC-KR'\n case 'csiso2022kr':\n case 'hz-gb-2312':\n case 'iso-2022-cn':\n case 'iso-2022-cn-ext':\n case 'iso-2022-kr':\n case 'replacement':\n return 'replacement'\n case 'unicodefffe':\n case 'utf-16be':\n return 'UTF-16BE'\n case 'csunicode':\n case 'iso-10646-ucs-2':\n case 'ucs-2':\n case 'unicode':\n case 'unicodefeff':\n case 'utf-16':\n case 'utf-16le':\n return 'UTF-16LE'\n case 'x-user-defined':\n return 'x-user-defined'\n default: return 'failure'\n }\n}\n\nmodule.exports = {\n getEncoding\n}\n","'use strict'\n\nconst {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n} = require('./util')\nconst {\n kState,\n kError,\n kResult,\n kEvents,\n kAborted\n} = require('./symbols')\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\n\nclass FileReader extends EventTarget {\n constructor () {\n super()\n\n this[kState] = 'empty'\n this[kResult] = null\n this[kError] = null\n this[kEvents] = {\n loadend: null,\n error: null,\n abort: null,\n load: null,\n progress: null,\n loadstart: null\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer\n * @param {import('buffer').Blob} blob\n */\n readAsArrayBuffer (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsArrayBuffer(blob) method, when invoked,\n // must initiate a read operation for blob with ArrayBuffer.\n readOperation(this, blob, 'ArrayBuffer')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsBinaryString\n * @param {import('buffer').Blob} blob\n */\n readAsBinaryString (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsBinaryString(blob) method, when invoked,\n // must initiate a read operation for blob with BinaryString.\n readOperation(this, blob, 'BinaryString')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#readAsDataText\n * @param {import('buffer').Blob} blob\n * @param {string?} encoding\n */\n readAsText (blob, encoding = undefined) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n if (encoding !== undefined) {\n encoding = webidl.converters.DOMString(encoding)\n }\n\n // The readAsText(blob, encoding) method, when invoked,\n // must initiate a read operation for blob with Text and encoding.\n readOperation(this, blob, 'Text', encoding)\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL\n * @param {import('buffer').Blob} blob\n */\n readAsDataURL (blob) {\n webidl.brandCheck(this, FileReader)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' })\n\n blob = webidl.converters.Blob(blob, { strict: false })\n\n // The readAsDataURL(blob) method, when invoked, must\n // initiate a read operation for blob with DataURL.\n readOperation(this, blob, 'DataURL')\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dfn-abort\n */\n abort () {\n // 1. If this's state is \"empty\" or if this's state is\n // \"done\" set this's result to null and terminate\n // this algorithm.\n if (this[kState] === 'empty' || this[kState] === 'done') {\n this[kResult] = null\n return\n }\n\n // 2. If this's state is \"loading\" set this's state to\n // \"done\" and set this's result to null.\n if (this[kState] === 'loading') {\n this[kState] = 'done'\n this[kResult] = null\n }\n\n // 3. If there are any tasks from this on the file reading\n // task source in an affiliated task queue, then remove\n // those tasks from that task queue.\n this[kAborted] = true\n\n // 4. Terminate the algorithm for the read method being processed.\n // TODO\n\n // 5. Fire a progress event called abort at this.\n fireAProgressEvent('abort', this)\n\n // 6. If this's state is not \"loading\", fire a progress\n // event called loadend at this.\n if (this[kState] !== 'loading') {\n fireAProgressEvent('loadend', this)\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate\n */\n get readyState () {\n webidl.brandCheck(this, FileReader)\n\n switch (this[kState]) {\n case 'empty': return this.EMPTY\n case 'loading': return this.LOADING\n case 'done': return this.DONE\n }\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-result\n */\n get result () {\n webidl.brandCheck(this, FileReader)\n\n // The result attribute’s getter, when invoked, must return\n // this's result.\n return this[kResult]\n }\n\n /**\n * @see https://w3c.github.io/FileAPI/#dom-filereader-error\n */\n get error () {\n webidl.brandCheck(this, FileReader)\n\n // The error attribute’s getter, when invoked, must return\n // this's error.\n return this[kError]\n }\n\n get onloadend () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadend\n }\n\n set onloadend (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadend) {\n this.removeEventListener('loadend', this[kEvents].loadend)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadend = fn\n this.addEventListener('loadend', fn)\n } else {\n this[kEvents].loadend = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].error) {\n this.removeEventListener('error', this[kEvents].error)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].error = fn\n this.addEventListener('error', fn)\n } else {\n this[kEvents].error = null\n }\n }\n\n get onloadstart () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].loadstart\n }\n\n set onloadstart (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].loadstart) {\n this.removeEventListener('loadstart', this[kEvents].loadstart)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].loadstart = fn\n this.addEventListener('loadstart', fn)\n } else {\n this[kEvents].loadstart = null\n }\n }\n\n get onprogress () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].progress\n }\n\n set onprogress (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].progress) {\n this.removeEventListener('progress', this[kEvents].progress)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].progress = fn\n this.addEventListener('progress', fn)\n } else {\n this[kEvents].progress = null\n }\n }\n\n get onload () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].load\n }\n\n set onload (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].load) {\n this.removeEventListener('load', this[kEvents].load)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].load = fn\n this.addEventListener('load', fn)\n } else {\n this[kEvents].load = null\n }\n }\n\n get onabort () {\n webidl.brandCheck(this, FileReader)\n\n return this[kEvents].abort\n }\n\n set onabort (fn) {\n webidl.brandCheck(this, FileReader)\n\n if (this[kEvents].abort) {\n this.removeEventListener('abort', this[kEvents].abort)\n }\n\n if (typeof fn === 'function') {\n this[kEvents].abort = fn\n this.addEventListener('abort', fn)\n } else {\n this[kEvents].abort = null\n }\n }\n}\n\n// https://w3c.github.io/FileAPI/#dom-filereader-empty\nFileReader.EMPTY = FileReader.prototype.EMPTY = 0\n// https://w3c.github.io/FileAPI/#dom-filereader-loading\nFileReader.LOADING = FileReader.prototype.LOADING = 1\n// https://w3c.github.io/FileAPI/#dom-filereader-done\nFileReader.DONE = FileReader.prototype.DONE = 2\n\nObject.defineProperties(FileReader.prototype, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors,\n readAsArrayBuffer: kEnumerableProperty,\n readAsBinaryString: kEnumerableProperty,\n readAsText: kEnumerableProperty,\n readAsDataURL: kEnumerableProperty,\n abort: kEnumerableProperty,\n readyState: kEnumerableProperty,\n result: kEnumerableProperty,\n error: kEnumerableProperty,\n onloadstart: kEnumerableProperty,\n onprogress: kEnumerableProperty,\n onload: kEnumerableProperty,\n onabort: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onloadend: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'FileReader',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(FileReader, {\n EMPTY: staticPropertyDescriptors,\n LOADING: staticPropertyDescriptors,\n DONE: staticPropertyDescriptors\n})\n\nmodule.exports = {\n FileReader\n}\n","'use strict'\n\nconst { webidl } = require('../fetch/webidl')\n\nconst kState = Symbol('ProgressEvent state')\n\n/**\n * @see https://xhr.spec.whatwg.org/#progressevent\n */\nclass ProgressEvent extends Event {\n constructor (type, eventInitDict = {}) {\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {})\n\n super(type, eventInitDict)\n\n this[kState] = {\n lengthComputable: eventInitDict.lengthComputable,\n loaded: eventInitDict.loaded,\n total: eventInitDict.total\n }\n }\n\n get lengthComputable () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].lengthComputable\n }\n\n get loaded () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].loaded\n }\n\n get total () {\n webidl.brandCheck(this, ProgressEvent)\n\n return this[kState].total\n }\n}\n\nwebidl.converters.ProgressEventInit = webidl.dictionaryConverter([\n {\n key: 'lengthComputable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'loaded',\n converter: webidl.converters['unsigned long long'],\n defaultValue: 0\n },\n {\n key: 'total',\n converter: webidl.converters['unsigned long long'],\n defaultValue: 0\n },\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n])\n\nmodule.exports = {\n ProgressEvent\n}\n","'use strict'\n\nmodule.exports = {\n kState: Symbol('FileReader state'),\n kResult: Symbol('FileReader result'),\n kError: Symbol('FileReader error'),\n kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'),\n kEvents: Symbol('FileReader events'),\n kAborted: Symbol('FileReader aborted')\n}\n","'use strict'\n\nconst {\n kState,\n kError,\n kResult,\n kAborted,\n kLastProgressEventFired\n} = require('./symbols')\nconst { ProgressEvent } = require('./progressevent')\nconst { getEncoding } = require('./encoding')\nconst { DOMException } = require('../fetch/constants')\nconst { serializeAMimeType, parseMIMEType } = require('../fetch/dataURL')\nconst { types } = require('util')\nconst { StringDecoder } = require('string_decoder')\nconst { btoa } = require('buffer')\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#readOperation\n * @param {import('./filereader').FileReader} fr\n * @param {import('buffer').Blob} blob\n * @param {string} type\n * @param {string?} encodingName\n */\nfunction readOperation (fr, blob, type, encodingName) {\n // 1. If fr’s state is \"loading\", throw an InvalidStateError\n // DOMException.\n if (fr[kState] === 'loading') {\n throw new DOMException('Invalid state', 'InvalidStateError')\n }\n\n // 2. Set fr’s state to \"loading\".\n fr[kState] = 'loading'\n\n // 3. Set fr’s result to null.\n fr[kResult] = null\n\n // 4. Set fr’s error to null.\n fr[kError] = null\n\n // 5. Let stream be the result of calling get stream on blob.\n /** @type {import('stream/web').ReadableStream} */\n const stream = blob.stream()\n\n // 6. Let reader be the result of getting a reader from stream.\n const reader = stream.getReader()\n\n // 7. Let bytes be an empty byte sequence.\n /** @type {Uint8Array[]} */\n const bytes = []\n\n // 8. Let chunkPromise be the result of reading a chunk from\n // stream with reader.\n let chunkPromise = reader.read()\n\n // 9. Let isFirstChunk be true.\n let isFirstChunk = true\n\n // 10. In parallel, while true:\n // Note: \"In parallel\" just means non-blocking\n // Note 2: readOperation itself cannot be async as double\n // reading the body would then reject the promise, instead\n // of throwing an error.\n ;(async () => {\n while (!fr[kAborted]) {\n // 1. Wait for chunkPromise to be fulfilled or rejected.\n try {\n const { done, value } = await chunkPromise\n\n // 2. If chunkPromise is fulfilled, and isFirstChunk is\n // true, queue a task to fire a progress event called\n // loadstart at fr.\n if (isFirstChunk && !fr[kAborted]) {\n queueMicrotask(() => {\n fireAProgressEvent('loadstart', fr)\n })\n }\n\n // 3. Set isFirstChunk to false.\n isFirstChunk = false\n\n // 4. If chunkPromise is fulfilled with an object whose\n // done property is false and whose value property is\n // a Uint8Array object, run these steps:\n if (!done && types.isUint8Array(value)) {\n // 1. Let bs be the byte sequence represented by the\n // Uint8Array object.\n\n // 2. Append bs to bytes.\n bytes.push(value)\n\n // 3. If roughly 50ms have passed since these steps\n // were last invoked, queue a task to fire a\n // progress event called progress at fr.\n if (\n (\n fr[kLastProgressEventFired] === undefined ||\n Date.now() - fr[kLastProgressEventFired] >= 50\n ) &&\n !fr[kAborted]\n ) {\n fr[kLastProgressEventFired] = Date.now()\n queueMicrotask(() => {\n fireAProgressEvent('progress', fr)\n })\n }\n\n // 4. Set chunkPromise to the result of reading a\n // chunk from stream with reader.\n chunkPromise = reader.read()\n } else if (done) {\n // 5. Otherwise, if chunkPromise is fulfilled with an\n // object whose done property is true, queue a task\n // to run the following steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr’s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Let result be the result of package data given\n // bytes, type, blob’s type, and encodingName.\n try {\n const result = packageData(bytes, type, blob.type, encodingName)\n\n // 4. Else:\n\n if (fr[kAborted]) {\n return\n }\n\n // 1. Set fr’s result to result.\n fr[kResult] = result\n\n // 2. Fire a progress event called load at the fr.\n fireAProgressEvent('load', fr)\n } catch (error) {\n // 3. If package data threw an exception error:\n\n // 1. Set fr’s error to error.\n fr[kError] = error\n\n // 2. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n }\n\n // 5. If fr’s state is not \"loading\", fire a progress\n // event called loadend at the fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n } catch (error) {\n if (fr[kAborted]) {\n return\n }\n\n // 6. Otherwise, if chunkPromise is rejected with an\n // error error, queue a task to run the following\n // steps and abort this algorithm:\n queueMicrotask(() => {\n // 1. Set fr’s state to \"done\".\n fr[kState] = 'done'\n\n // 2. Set fr’s error to error.\n fr[kError] = error\n\n // 3. Fire a progress event called error at fr.\n fireAProgressEvent('error', fr)\n\n // 4. If fr’s state is not \"loading\", fire a progress\n // event called loadend at fr.\n if (fr[kState] !== 'loading') {\n fireAProgressEvent('loadend', fr)\n }\n })\n\n break\n }\n }\n })()\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#fire-a-progress-event\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e The name of the event\n * @param {import('./filereader').FileReader} reader\n */\nfunction fireAProgressEvent (e, reader) {\n // The progress event e does not bubble. e.bubbles must be false\n // The progress event e is NOT cancelable. e.cancelable must be false\n const event = new ProgressEvent(e, {\n bubbles: false,\n cancelable: false\n })\n\n reader.dispatchEvent(event)\n}\n\n/**\n * @see https://w3c.github.io/FileAPI/#blob-package-data\n * @param {Uint8Array[]} bytes\n * @param {string} type\n * @param {string?} mimeType\n * @param {string?} encodingName\n */\nfunction packageData (bytes, type, mimeType, encodingName) {\n // 1. A Blob has an associated package data algorithm, given\n // bytes, a type, a optional mimeType, and a optional\n // encodingName, which switches on type and runs the\n // associated steps:\n\n switch (type) {\n case 'DataURL': {\n // 1. Return bytes as a DataURL [RFC2397] subject to\n // the considerations below:\n // * Use mimeType as part of the Data URL if it is\n // available in keeping with the Data URL\n // specification [RFC2397].\n // * If mimeType is not available return a Data URL\n // without a media-type. [RFC2397].\n\n // https://datatracker.ietf.org/doc/html/rfc2397#section-3\n // dataurl := \"data:\" [ mediatype ] [ \";base64\" ] \",\" data\n // mediatype := [ type \"/\" subtype ] *( \";\" parameter )\n // data := *urlchar\n // parameter := attribute \"=\" value\n let dataURL = 'data:'\n\n const parsed = parseMIMEType(mimeType || 'application/octet-stream')\n\n if (parsed !== 'failure') {\n dataURL += serializeAMimeType(parsed)\n }\n\n dataURL += ';base64,'\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n dataURL += btoa(decoder.write(chunk))\n }\n\n dataURL += btoa(decoder.end())\n\n return dataURL\n }\n case 'Text': {\n // 1. Let encoding be failure\n let encoding = 'failure'\n\n // 2. If the encodingName is present, set encoding to the\n // result of getting an encoding from encodingName.\n if (encodingName) {\n encoding = getEncoding(encodingName)\n }\n\n // 3. If encoding is failure, and mimeType is present:\n if (encoding === 'failure' && mimeType) {\n // 1. Let type be the result of parse a MIME type\n // given mimeType.\n const type = parseMIMEType(mimeType)\n\n // 2. If type is not failure, set encoding to the result\n // of getting an encoding from type’s parameters[\"charset\"].\n if (type !== 'failure') {\n encoding = getEncoding(type.parameters.get('charset'))\n }\n }\n\n // 4. If encoding is failure, then set encoding to UTF-8.\n if (encoding === 'failure') {\n encoding = 'UTF-8'\n }\n\n // 5. Decode bytes using fallback encoding encoding, and\n // return the result.\n return decode(bytes, encoding)\n }\n case 'ArrayBuffer': {\n // Return a new ArrayBuffer whose contents are bytes.\n const sequence = combineByteSequences(bytes)\n\n return sequence.buffer\n }\n case 'BinaryString': {\n // Return bytes as a binary string, in which every byte\n // is represented by a code unit of equal value [0..255].\n let binaryString = ''\n\n const decoder = new StringDecoder('latin1')\n\n for (const chunk of bytes) {\n binaryString += decoder.write(chunk)\n }\n\n binaryString += decoder.end()\n\n return binaryString\n }\n }\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#decode\n * @param {Uint8Array[]} ioQueue\n * @param {string} encoding\n */\nfunction decode (ioQueue, encoding) {\n const bytes = combineByteSequences(ioQueue)\n\n // 1. Let BOMEncoding be the result of BOM sniffing ioQueue.\n const BOMEncoding = BOMSniffing(bytes)\n\n let slice = 0\n\n // 2. If BOMEncoding is non-null:\n if (BOMEncoding !== null) {\n // 1. Set encoding to BOMEncoding.\n encoding = BOMEncoding\n\n // 2. Read three bytes from ioQueue, if BOMEncoding is\n // UTF-8; otherwise read two bytes.\n // (Do nothing with those bytes.)\n slice = BOMEncoding === 'UTF-8' ? 3 : 2\n }\n\n // 3. Process a queue with an instance of encoding’s\n // decoder, ioQueue, output, and \"replacement\".\n\n // 4. Return output.\n\n const sliced = bytes.slice(slice)\n return new TextDecoder(encoding).decode(sliced)\n}\n\n/**\n * @see https://encoding.spec.whatwg.org/#bom-sniff\n * @param {Uint8Array} ioQueue\n */\nfunction BOMSniffing (ioQueue) {\n // 1. Let BOM be the result of peeking 3 bytes from ioQueue,\n // converted to a byte sequence.\n const [a, b, c] = ioQueue\n\n // 2. For each of the rows in the table below, starting with\n // the first one and going down, if BOM starts with the\n // bytes given in the first column, then return the\n // encoding given in the cell in the second column of that\n // row. Otherwise, return null.\n if (a === 0xEF && b === 0xBB && c === 0xBF) {\n return 'UTF-8'\n } else if (a === 0xFE && b === 0xFF) {\n return 'UTF-16BE'\n } else if (a === 0xFF && b === 0xFE) {\n return 'UTF-16LE'\n }\n\n return null\n}\n\n/**\n * @param {Uint8Array[]} sequences\n */\nfunction combineByteSequences (sequences) {\n const size = sequences.reduce((a, b) => {\n return a + b.byteLength\n }, 0)\n\n let offset = 0\n\n return sequences.reduce((a, b) => {\n a.set(b, offset)\n offset += b.byteLength\n return a\n }, new Uint8Array(size))\n}\n\nmodule.exports = {\n staticPropertyDescriptors,\n readOperation,\n fireAProgressEvent\n}\n","'use strict'\n\n// We include a version number for the Dispatcher API. In case of breaking changes,\n// this version number must be increased to avoid conflicts.\nconst globalDispatcher = Symbol.for('undici.globalDispatcher.1')\nconst { InvalidArgumentError } = require('./core/errors')\nconst Agent = require('./agent')\n\nif (getGlobalDispatcher() === undefined) {\n setGlobalDispatcher(new Agent())\n}\n\nfunction setGlobalDispatcher (agent) {\n if (!agent || typeof agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument agent must implement Agent')\n }\n Object.defineProperty(globalThis, globalDispatcher, {\n value: agent,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nfunction getGlobalDispatcher () {\n return globalThis[globalDispatcher]\n}\n\nmodule.exports = {\n setGlobalDispatcher,\n getGlobalDispatcher\n}\n","'use strict'\n\nmodule.exports = class DecoratorHandler {\n constructor (handler) {\n this.handler = handler\n }\n\n onConnect (...args) {\n return this.handler.onConnect(...args)\n }\n\n onError (...args) {\n return this.handler.onError(...args)\n }\n\n onUpgrade (...args) {\n return this.handler.onUpgrade(...args)\n }\n\n onHeaders (...args) {\n return this.handler.onHeaders(...args)\n }\n\n onData (...args) {\n return this.handler.onData(...args)\n }\n\n onComplete (...args) {\n return this.handler.onComplete(...args)\n }\n\n onBodySent (...args) {\n return this.handler.onBodySent(...args)\n }\n}\n","'use strict'\n\nconst util = require('../core/util')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('assert')\nconst { InvalidArgumentError } = require('../core/errors')\nconst EE = require('events')\n\nconst redirectableStatusCodes = [300, 301, 302, 303, 307, 308]\n\nconst kBody = Symbol('body')\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nclass RedirectHandler {\n constructor (dispatch, maxRedirections, opts, handler) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n util.validateHandler(handler, opts.method, opts.upgrade)\n\n this.dispatch = dispatch\n this.location = null\n this.abort = null\n this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy\n this.maxRedirections = maxRedirections\n this.handler = handler\n this.history = []\n\n if (util.isStream(this.opts.body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (util.bodyLength(this.opts.body) === 0) {\n this.opts.body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof this.opts.body.readableDidRead !== 'boolean') {\n this.opts.body[kBodyUsed] = false\n EE.prototype.on.call(this.opts.body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n } else if (\n this.opts.body &&\n typeof this.opts.body !== 'string' &&\n !ArrayBuffer.isView(this.opts.body) &&\n util.isIterable(this.opts.body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n }\n }\n\n onConnect (abort) {\n this.abort = abort\n this.handler.onConnect(abort, { history: this.history })\n }\n\n onUpgrade (statusCode, headers, socket) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n\n onError (error) {\n this.handler.onError(error)\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body)\n ? null\n : parseLocation(statusCode, headers)\n\n if (this.opts.origin) {\n this.history.push(new URL(this.opts.path, this.opts.origin))\n }\n\n if (!this.location) {\n return this.handler.onHeaders(statusCode, headers, resume, statusText)\n }\n\n const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))\n const path = search ? `${pathname}${search}` : pathname\n\n // Remove headers referring to the original URL.\n // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers.\n // https://tools.ietf.org/html/rfc7231#section-6.4\n this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin)\n this.opts.path = path\n this.opts.origin = origin\n this.opts.maxRedirections = 0\n this.opts.query = null\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.4\n // In case of HTTP 303, always replace method to be either HEAD or GET\n if (statusCode === 303 && this.opts.method !== 'HEAD') {\n this.opts.method = 'GET'\n this.opts.body = null\n }\n }\n\n onData (chunk) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response bodies.\n\n Redirection is used to serve the requested resource from another URL, so it is assumes that\n no body is generated (and thus can be ignored). Even though generating a body is not prohibited.\n\n For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually\n (which means it's optional and not mandated) contain just an hyperlink to the value of\n the Location response header, so the body can be ignored safely.\n\n For status 300, which is \"Multiple Choices\", the spec mentions both generating a Location\n response header AND a response body with the other possible location to follow.\n Since the spec explicitily chooses not to specify a format for such body and leave it to\n servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.\n */\n } else {\n return this.handler.onData(chunk)\n }\n }\n\n onComplete (trailers) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections\n and neither are useful if present.\n\n See comment on onData method above for more detailed informations.\n */\n\n this.location = null\n this.abort = null\n\n this.dispatch(this.opts, this)\n } else {\n this.handler.onComplete(trailers)\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) {\n this.handler.onBodySent(chunk)\n }\n }\n}\n\nfunction parseLocation (statusCode, headers) {\n if (redirectableStatusCodes.indexOf(statusCode) === -1) {\n return null\n }\n\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toString().toLowerCase() === 'location') {\n return headers[i + 1]\n }\n }\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4.4\nfunction shouldRemoveHeader (header, removeContent, unknownOrigin) {\n return (\n (header.length === 4 && header.toString().toLowerCase() === 'host') ||\n (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||\n (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||\n (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')\n )\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4\nfunction cleanRequestHeaders (headers, removeContent, unknownOrigin) {\n const ret = []\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {\n ret.push(headers[i], headers[i + 1])\n }\n }\n } else if (headers && typeof headers === 'object') {\n for (const key of Object.keys(headers)) {\n if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {\n ret.push(key, headers[key])\n }\n }\n } else {\n assert(headers == null, 'headers must be an object or an array')\n }\n return ret\n}\n\nmodule.exports = RedirectHandler\n","const assert = require('assert')\n\nconst { kRetryHandlerDefaultRetry } = require('../core/symbols')\nconst { RequestRetryError } = require('../core/errors')\nconst { isDisturbed, parseHeaders, parseRangeHeader } = require('../core/util')\n\nfunction calculateRetryAfterHeader (retryAfter) {\n const current = Date.now()\n const diff = new Date(retryAfter).getTime() - current\n\n return diff\n}\n\nclass RetryHandler {\n constructor (opts, handlers) {\n const { retryOptions, ...dispatchOpts } = opts\n const {\n // Retry scoped\n retry: retryFn,\n maxRetries,\n maxTimeout,\n minTimeout,\n timeoutFactor,\n // Response scoped\n methods,\n errorCodes,\n retryAfter,\n statusCodes\n } = retryOptions ?? {}\n\n this.dispatch = handlers.dispatch\n this.handler = handlers.handler\n this.opts = dispatchOpts\n this.abort = null\n this.aborted = false\n this.retryOpts = {\n retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry],\n retryAfter: retryAfter ?? true,\n maxTimeout: maxTimeout ?? 30 * 1000, // 30s,\n timeout: minTimeout ?? 500, // .5s\n timeoutFactor: timeoutFactor ?? 2,\n maxRetries: maxRetries ?? 5,\n // What errors we should retry\n methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],\n // Indicates which errors to retry\n statusCodes: statusCodes ?? [500, 502, 503, 504, 429],\n // List of errors to retry\n errorCodes: errorCodes ?? [\n 'ECONNRESET',\n 'ECONNREFUSED',\n 'ENOTFOUND',\n 'ENETDOWN',\n 'ENETUNREACH',\n 'EHOSTDOWN',\n 'EHOSTUNREACH',\n 'EPIPE'\n ]\n }\n\n this.retryCount = 0\n this.start = 0\n this.end = null\n this.etag = null\n this.resume = null\n\n // Handle possible onConnect duplication\n this.handler.onConnect(reason => {\n this.aborted = true\n if (this.abort) {\n this.abort(reason)\n } else {\n this.reason = reason\n }\n })\n }\n\n onRequestSent () {\n if (this.handler.onRequestSent) {\n this.handler.onRequestSent()\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n if (this.handler.onUpgrade) {\n this.handler.onUpgrade(statusCode, headers, socket)\n }\n }\n\n onConnect (abort) {\n if (this.aborted) {\n abort(this.reason)\n } else {\n this.abort = abort\n }\n }\n\n onBodySent (chunk) {\n if (this.handler.onBodySent) return this.handler.onBodySent(chunk)\n }\n\n static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {\n const { statusCode, code, headers } = err\n const { method, retryOptions } = opts\n const {\n maxRetries,\n timeout,\n maxTimeout,\n timeoutFactor,\n statusCodes,\n errorCodes,\n methods\n } = retryOptions\n let { counter, currentTimeout } = state\n\n currentTimeout =\n currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout\n\n // Any code that is not a Undici's originated and allowed to retry\n if (\n code &&\n code !== 'UND_ERR_REQ_RETRY' &&\n code !== 'UND_ERR_SOCKET' &&\n !errorCodes.includes(code)\n ) {\n cb(err)\n return\n }\n\n // If a set of method are provided and the current method is not in the list\n if (Array.isArray(methods) && !methods.includes(method)) {\n cb(err)\n return\n }\n\n // If a set of status code are provided and the current status code is not in the list\n if (\n statusCode != null &&\n Array.isArray(statusCodes) &&\n !statusCodes.includes(statusCode)\n ) {\n cb(err)\n return\n }\n\n // If we reached the max number of retries\n if (counter > maxRetries) {\n cb(err)\n return\n }\n\n let retryAfterHeader = headers != null && headers['retry-after']\n if (retryAfterHeader) {\n retryAfterHeader = Number(retryAfterHeader)\n retryAfterHeader = isNaN(retryAfterHeader)\n ? calculateRetryAfterHeader(retryAfterHeader)\n : retryAfterHeader * 1e3 // Retry-After is in seconds\n }\n\n const retryTimeout =\n retryAfterHeader > 0\n ? Math.min(retryAfterHeader, maxTimeout)\n : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout)\n\n state.currentTimeout = retryTimeout\n\n setTimeout(() => cb(null), retryTimeout)\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const headers = parseHeaders(rawHeaders)\n\n this.retryCount += 1\n\n if (statusCode >= 300) {\n this.abort(\n new RequestRetryError('Request failed', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n // Checkpoint for resume from where we left it\n if (this.resume != null) {\n this.resume = null\n\n if (statusCode !== 206) {\n return true\n }\n\n const contentRange = parseRangeHeader(headers['content-range'])\n // If no content range\n if (!contentRange) {\n this.abort(\n new RequestRetryError('Content-Range mismatch', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n // Let's start with a weak etag check\n if (this.etag != null && this.etag !== headers.etag) {\n this.abort(\n new RequestRetryError('ETag mismatch', statusCode, {\n headers,\n count: this.retryCount\n })\n )\n return false\n }\n\n const { start, size, end = size } = contentRange\n\n assert(this.start === start, 'content-range mismatch')\n assert(this.end == null || this.end === end, 'content-range mismatch')\n\n this.resume = resume\n return true\n }\n\n if (this.end == null) {\n if (statusCode === 206) {\n // First time we receive 206\n const range = parseRangeHeader(headers['content-range'])\n\n if (range == null) {\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const { start, size, end = size } = range\n\n assert(\n start != null && Number.isFinite(start) && this.start !== start,\n 'content-range mismatch'\n )\n assert(Number.isFinite(start))\n assert(\n end != null && Number.isFinite(end) && this.end !== end,\n 'invalid content-length'\n )\n\n this.start = start\n this.end = end\n }\n\n // We make our best to checkpoint the body for further range headers\n if (this.end == null) {\n const contentLength = headers['content-length']\n this.end = contentLength != null ? Number(contentLength) : null\n }\n\n assert(Number.isFinite(this.start))\n assert(\n this.end == null || Number.isFinite(this.end),\n 'invalid content-length'\n )\n\n this.resume = resume\n this.etag = headers.etag != null ? headers.etag : null\n\n return this.handler.onHeaders(\n statusCode,\n rawHeaders,\n resume,\n statusMessage\n )\n }\n\n const err = new RequestRetryError('Request failed', statusCode, {\n headers,\n count: this.retryCount\n })\n\n this.abort(err)\n\n return false\n }\n\n onData (chunk) {\n this.start += chunk.length\n\n return this.handler.onData(chunk)\n }\n\n onComplete (rawTrailers) {\n this.retryCount = 0\n return this.handler.onComplete(rawTrailers)\n }\n\n onError (err) {\n if (this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount++, currentTimeout: this.retryAfter },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n onRetry.bind(this)\n )\n\n function onRetry (err) {\n if (err != null || this.aborted || isDisturbed(this.opts.body)) {\n return this.handler.onError(err)\n }\n\n if (this.start !== 0) {\n this.opts = {\n ...this.opts,\n headers: {\n ...this.opts.headers,\n range: `bytes=${this.start}-${this.end ?? ''}`\n }\n }\n }\n\n try {\n this.dispatch(this.opts, this)\n } catch (err) {\n this.handler.onError(err)\n }\n }\n }\n}\n\nmodule.exports = RetryHandler\n","'use strict'\n\nconst RedirectHandler = require('../handler/RedirectHandler')\n\nfunction createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n const { maxRedirections = defaultMaxRedirections } = opts\n\n if (!maxRedirections) {\n return dispatch(opts, handler)\n }\n\n const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler)\n opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting.\n return dispatch(opts, redirectHandler)\n }\n }\n}\n\nmodule.exports = createRedirectInterceptor\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0;\nconst utils_1 = require(\"./utils\");\n// C headers\nvar ERROR;\n(function (ERROR) {\n ERROR[ERROR[\"OK\"] = 0] = \"OK\";\n ERROR[ERROR[\"INTERNAL\"] = 1] = \"INTERNAL\";\n ERROR[ERROR[\"STRICT\"] = 2] = \"STRICT\";\n ERROR[ERROR[\"LF_EXPECTED\"] = 3] = \"LF_EXPECTED\";\n ERROR[ERROR[\"UNEXPECTED_CONTENT_LENGTH\"] = 4] = \"UNEXPECTED_CONTENT_LENGTH\";\n ERROR[ERROR[\"CLOSED_CONNECTION\"] = 5] = \"CLOSED_CONNECTION\";\n ERROR[ERROR[\"INVALID_METHOD\"] = 6] = \"INVALID_METHOD\";\n ERROR[ERROR[\"INVALID_URL\"] = 7] = \"INVALID_URL\";\n ERROR[ERROR[\"INVALID_CONSTANT\"] = 8] = \"INVALID_CONSTANT\";\n ERROR[ERROR[\"INVALID_VERSION\"] = 9] = \"INVALID_VERSION\";\n ERROR[ERROR[\"INVALID_HEADER_TOKEN\"] = 10] = \"INVALID_HEADER_TOKEN\";\n ERROR[ERROR[\"INVALID_CONTENT_LENGTH\"] = 11] = \"INVALID_CONTENT_LENGTH\";\n ERROR[ERROR[\"INVALID_CHUNK_SIZE\"] = 12] = \"INVALID_CHUNK_SIZE\";\n ERROR[ERROR[\"INVALID_STATUS\"] = 13] = \"INVALID_STATUS\";\n ERROR[ERROR[\"INVALID_EOF_STATE\"] = 14] = \"INVALID_EOF_STATE\";\n ERROR[ERROR[\"INVALID_TRANSFER_ENCODING\"] = 15] = \"INVALID_TRANSFER_ENCODING\";\n ERROR[ERROR[\"CB_MESSAGE_BEGIN\"] = 16] = \"CB_MESSAGE_BEGIN\";\n ERROR[ERROR[\"CB_HEADERS_COMPLETE\"] = 17] = \"CB_HEADERS_COMPLETE\";\n ERROR[ERROR[\"CB_MESSAGE_COMPLETE\"] = 18] = \"CB_MESSAGE_COMPLETE\";\n ERROR[ERROR[\"CB_CHUNK_HEADER\"] = 19] = \"CB_CHUNK_HEADER\";\n ERROR[ERROR[\"CB_CHUNK_COMPLETE\"] = 20] = \"CB_CHUNK_COMPLETE\";\n ERROR[ERROR[\"PAUSED\"] = 21] = \"PAUSED\";\n ERROR[ERROR[\"PAUSED_UPGRADE\"] = 22] = \"PAUSED_UPGRADE\";\n ERROR[ERROR[\"PAUSED_H2_UPGRADE\"] = 23] = \"PAUSED_H2_UPGRADE\";\n ERROR[ERROR[\"USER\"] = 24] = \"USER\";\n})(ERROR = exports.ERROR || (exports.ERROR = {}));\nvar TYPE;\n(function (TYPE) {\n TYPE[TYPE[\"BOTH\"] = 0] = \"BOTH\";\n TYPE[TYPE[\"REQUEST\"] = 1] = \"REQUEST\";\n TYPE[TYPE[\"RESPONSE\"] = 2] = \"RESPONSE\";\n})(TYPE = exports.TYPE || (exports.TYPE = {}));\nvar FLAGS;\n(function (FLAGS) {\n FLAGS[FLAGS[\"CONNECTION_KEEP_ALIVE\"] = 1] = \"CONNECTION_KEEP_ALIVE\";\n FLAGS[FLAGS[\"CONNECTION_CLOSE\"] = 2] = \"CONNECTION_CLOSE\";\n FLAGS[FLAGS[\"CONNECTION_UPGRADE\"] = 4] = \"CONNECTION_UPGRADE\";\n FLAGS[FLAGS[\"CHUNKED\"] = 8] = \"CHUNKED\";\n FLAGS[FLAGS[\"UPGRADE\"] = 16] = \"UPGRADE\";\n FLAGS[FLAGS[\"CONTENT_LENGTH\"] = 32] = \"CONTENT_LENGTH\";\n FLAGS[FLAGS[\"SKIPBODY\"] = 64] = \"SKIPBODY\";\n FLAGS[FLAGS[\"TRAILING\"] = 128] = \"TRAILING\";\n // 1 << 8 is unused\n FLAGS[FLAGS[\"TRANSFER_ENCODING\"] = 512] = \"TRANSFER_ENCODING\";\n})(FLAGS = exports.FLAGS || (exports.FLAGS = {}));\nvar LENIENT_FLAGS;\n(function (LENIENT_FLAGS) {\n LENIENT_FLAGS[LENIENT_FLAGS[\"HEADERS\"] = 1] = \"HEADERS\";\n LENIENT_FLAGS[LENIENT_FLAGS[\"CHUNKED_LENGTH\"] = 2] = \"CHUNKED_LENGTH\";\n LENIENT_FLAGS[LENIENT_FLAGS[\"KEEP_ALIVE\"] = 4] = \"KEEP_ALIVE\";\n})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {}));\nvar METHODS;\n(function (METHODS) {\n METHODS[METHODS[\"DELETE\"] = 0] = \"DELETE\";\n METHODS[METHODS[\"GET\"] = 1] = \"GET\";\n METHODS[METHODS[\"HEAD\"] = 2] = \"HEAD\";\n METHODS[METHODS[\"POST\"] = 3] = \"POST\";\n METHODS[METHODS[\"PUT\"] = 4] = \"PUT\";\n /* pathological */\n METHODS[METHODS[\"CONNECT\"] = 5] = \"CONNECT\";\n METHODS[METHODS[\"OPTIONS\"] = 6] = \"OPTIONS\";\n METHODS[METHODS[\"TRACE\"] = 7] = \"TRACE\";\n /* WebDAV */\n METHODS[METHODS[\"COPY\"] = 8] = \"COPY\";\n METHODS[METHODS[\"LOCK\"] = 9] = \"LOCK\";\n METHODS[METHODS[\"MKCOL\"] = 10] = \"MKCOL\";\n METHODS[METHODS[\"MOVE\"] = 11] = \"MOVE\";\n METHODS[METHODS[\"PROPFIND\"] = 12] = \"PROPFIND\";\n METHODS[METHODS[\"PROPPATCH\"] = 13] = \"PROPPATCH\";\n METHODS[METHODS[\"SEARCH\"] = 14] = \"SEARCH\";\n METHODS[METHODS[\"UNLOCK\"] = 15] = \"UNLOCK\";\n METHODS[METHODS[\"BIND\"] = 16] = \"BIND\";\n METHODS[METHODS[\"REBIND\"] = 17] = \"REBIND\";\n METHODS[METHODS[\"UNBIND\"] = 18] = \"UNBIND\";\n METHODS[METHODS[\"ACL\"] = 19] = \"ACL\";\n /* subversion */\n METHODS[METHODS[\"REPORT\"] = 20] = \"REPORT\";\n METHODS[METHODS[\"MKACTIVITY\"] = 21] = \"MKACTIVITY\";\n METHODS[METHODS[\"CHECKOUT\"] = 22] = \"CHECKOUT\";\n METHODS[METHODS[\"MERGE\"] = 23] = \"MERGE\";\n /* upnp */\n METHODS[METHODS[\"M-SEARCH\"] = 24] = \"M-SEARCH\";\n METHODS[METHODS[\"NOTIFY\"] = 25] = \"NOTIFY\";\n METHODS[METHODS[\"SUBSCRIBE\"] = 26] = \"SUBSCRIBE\";\n METHODS[METHODS[\"UNSUBSCRIBE\"] = 27] = \"UNSUBSCRIBE\";\n /* RFC-5789 */\n METHODS[METHODS[\"PATCH\"] = 28] = \"PATCH\";\n METHODS[METHODS[\"PURGE\"] = 29] = \"PURGE\";\n /* CalDAV */\n METHODS[METHODS[\"MKCALENDAR\"] = 30] = \"MKCALENDAR\";\n /* RFC-2068, section 19.6.1.2 */\n METHODS[METHODS[\"LINK\"] = 31] = \"LINK\";\n METHODS[METHODS[\"UNLINK\"] = 32] = \"UNLINK\";\n /* icecast */\n METHODS[METHODS[\"SOURCE\"] = 33] = \"SOURCE\";\n /* RFC-7540, section 11.6 */\n METHODS[METHODS[\"PRI\"] = 34] = \"PRI\";\n /* RFC-2326 RTSP */\n METHODS[METHODS[\"DESCRIBE\"] = 35] = \"DESCRIBE\";\n METHODS[METHODS[\"ANNOUNCE\"] = 36] = \"ANNOUNCE\";\n METHODS[METHODS[\"SETUP\"] = 37] = \"SETUP\";\n METHODS[METHODS[\"PLAY\"] = 38] = \"PLAY\";\n METHODS[METHODS[\"PAUSE\"] = 39] = \"PAUSE\";\n METHODS[METHODS[\"TEARDOWN\"] = 40] = \"TEARDOWN\";\n METHODS[METHODS[\"GET_PARAMETER\"] = 41] = \"GET_PARAMETER\";\n METHODS[METHODS[\"SET_PARAMETER\"] = 42] = \"SET_PARAMETER\";\n METHODS[METHODS[\"REDIRECT\"] = 43] = \"REDIRECT\";\n METHODS[METHODS[\"RECORD\"] = 44] = \"RECORD\";\n /* RAOP */\n METHODS[METHODS[\"FLUSH\"] = 45] = \"FLUSH\";\n})(METHODS = exports.METHODS || (exports.METHODS = {}));\nexports.METHODS_HTTP = [\n METHODS.DELETE,\n METHODS.GET,\n METHODS.HEAD,\n METHODS.POST,\n METHODS.PUT,\n METHODS.CONNECT,\n METHODS.OPTIONS,\n METHODS.TRACE,\n METHODS.COPY,\n METHODS.LOCK,\n METHODS.MKCOL,\n METHODS.MOVE,\n METHODS.PROPFIND,\n METHODS.PROPPATCH,\n METHODS.SEARCH,\n METHODS.UNLOCK,\n METHODS.BIND,\n METHODS.REBIND,\n METHODS.UNBIND,\n METHODS.ACL,\n METHODS.REPORT,\n METHODS.MKACTIVITY,\n METHODS.CHECKOUT,\n METHODS.MERGE,\n METHODS['M-SEARCH'],\n METHODS.NOTIFY,\n METHODS.SUBSCRIBE,\n METHODS.UNSUBSCRIBE,\n METHODS.PATCH,\n METHODS.PURGE,\n METHODS.MKCALENDAR,\n METHODS.LINK,\n METHODS.UNLINK,\n METHODS.PRI,\n // TODO(indutny): should we allow it with HTTP?\n METHODS.SOURCE,\n];\nexports.METHODS_ICE = [\n METHODS.SOURCE,\n];\nexports.METHODS_RTSP = [\n METHODS.OPTIONS,\n METHODS.DESCRIBE,\n METHODS.ANNOUNCE,\n METHODS.SETUP,\n METHODS.PLAY,\n METHODS.PAUSE,\n METHODS.TEARDOWN,\n METHODS.GET_PARAMETER,\n METHODS.SET_PARAMETER,\n METHODS.REDIRECT,\n METHODS.RECORD,\n METHODS.FLUSH,\n // For AirPlay\n METHODS.GET,\n METHODS.POST,\n];\nexports.METHOD_MAP = utils_1.enumToMap(METHODS);\nexports.H_METHOD_MAP = {};\nObject.keys(exports.METHOD_MAP).forEach((key) => {\n if (/^H/.test(key)) {\n exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key];\n }\n});\nvar FINISH;\n(function (FINISH) {\n FINISH[FINISH[\"SAFE\"] = 0] = \"SAFE\";\n FINISH[FINISH[\"SAFE_WITH_CB\"] = 1] = \"SAFE_WITH_CB\";\n FINISH[FINISH[\"UNSAFE\"] = 2] = \"UNSAFE\";\n})(FINISH = exports.FINISH || (exports.FINISH = {}));\nexports.ALPHA = [];\nfor (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) {\n // Upper case\n exports.ALPHA.push(String.fromCharCode(i));\n // Lower case\n exports.ALPHA.push(String.fromCharCode(i + 0x20));\n}\nexports.NUM_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n};\nexports.HEX_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF,\n a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf,\n};\nexports.NUM = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n];\nexports.ALPHANUM = exports.ALPHA.concat(exports.NUM);\nexports.MARK = ['-', '_', '.', '!', '~', '*', '\\'', '(', ')'];\nexports.USERINFO_CHARS = exports.ALPHANUM\n .concat(exports.MARK)\n .concat(['%', ';', ':', '&', '=', '+', '$', ',']);\n// TODO(indutny): use RFC\nexports.STRICT_URL_CHAR = [\n '!', '\"', '$', '%', '&', '\\'',\n '(', ')', '*', '+', ',', '-', '.', '/',\n ':', ';', '<', '=', '>',\n '@', '[', '\\\\', ']', '^', '_',\n '`',\n '{', '|', '}', '~',\n].concat(exports.ALPHANUM);\nexports.URL_CHAR = exports.STRICT_URL_CHAR\n .concat(['\\t', '\\f']);\n// All characters with 0x80 bit set to 1\nfor (let i = 0x80; i <= 0xff; i++) {\n exports.URL_CHAR.push(i);\n}\nexports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);\n/* Tokens as defined by rfc 2616. Also lowercases them.\n * token = 1*\n * separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n * | \",\" | \";\" | \":\" | \"\\\" | <\">\n * | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n * | \"{\" | \"}\" | SP | HT\n */\nexports.STRICT_TOKEN = [\n '!', '#', '$', '%', '&', '\\'',\n '*', '+', '-', '.',\n '^', '_', '`',\n '|', '~',\n].concat(exports.ALPHANUM);\nexports.TOKEN = exports.STRICT_TOKEN.concat([' ']);\n/*\n * Verify that a char is a valid visible (printable) US-ASCII\n * character or %x80-FF\n */\nexports.HEADER_CHARS = ['\\t'];\nfor (let i = 32; i <= 255; i++) {\n if (i !== 127) {\n exports.HEADER_CHARS.push(i);\n }\n}\n// ',' = \\x44\nexports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44);\nexports.MAJOR = exports.NUM_MAP;\nexports.MINOR = exports.MAJOR;\nvar HEADER_STATE;\n(function (HEADER_STATE) {\n HEADER_STATE[HEADER_STATE[\"GENERAL\"] = 0] = \"GENERAL\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION\"] = 1] = \"CONNECTION\";\n HEADER_STATE[HEADER_STATE[\"CONTENT_LENGTH\"] = 2] = \"CONTENT_LENGTH\";\n HEADER_STATE[HEADER_STATE[\"TRANSFER_ENCODING\"] = 3] = \"TRANSFER_ENCODING\";\n HEADER_STATE[HEADER_STATE[\"UPGRADE\"] = 4] = \"UPGRADE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_KEEP_ALIVE\"] = 5] = \"CONNECTION_KEEP_ALIVE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_CLOSE\"] = 6] = \"CONNECTION_CLOSE\";\n HEADER_STATE[HEADER_STATE[\"CONNECTION_UPGRADE\"] = 7] = \"CONNECTION_UPGRADE\";\n HEADER_STATE[HEADER_STATE[\"TRANSFER_ENCODING_CHUNKED\"] = 8] = \"TRANSFER_ENCODING_CHUNKED\";\n})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {}));\nexports.SPECIAL_HEADERS = {\n 'connection': HEADER_STATE.CONNECTION,\n 'content-length': HEADER_STATE.CONTENT_LENGTH,\n 'proxy-connection': HEADER_STATE.CONNECTION,\n 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING,\n 'upgrade': HEADER_STATE.UPGRADE,\n};\n//# sourceMappingURL=constants.js.map","module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJs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ADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkB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QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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FCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAU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YWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8='\n","module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJs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IAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEB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QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQID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YWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=='\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enumToMap = void 0;\nfunction enumToMap(obj) {\n const res = {};\n Object.keys(obj).forEach((key) => {\n const value = obj[key];\n if (typeof value === 'number') {\n res[key] = value;\n }\n });\n return res;\n}\nexports.enumToMap = enumToMap;\n//# sourceMappingURL=utils.js.map","'use strict'\n\nconst { kClients } = require('../core/symbols')\nconst Agent = require('../agent')\nconst {\n kAgent,\n kMockAgentSet,\n kMockAgentGet,\n kDispatches,\n kIsMockActive,\n kNetConnect,\n kGetNetConnect,\n kOptions,\n kFactory\n} = require('./mock-symbols')\nconst MockClient = require('./mock-client')\nconst MockPool = require('./mock-pool')\nconst { matchValue, buildMockOptions } = require('./mock-utils')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst Dispatcher = require('../dispatcher')\nconst Pluralizer = require('./pluralizer')\nconst PendingInterceptorsFormatter = require('./pending-interceptors-formatter')\n\nclass FakeWeakRef {\n constructor (value) {\n this.value = value\n }\n\n deref () {\n return this.value\n }\n}\n\nclass MockAgent extends Dispatcher {\n constructor (opts) {\n super(opts)\n\n this[kNetConnect] = true\n this[kIsMockActive] = true\n\n // Instantiate Agent and encapsulate\n if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n const agent = opts && opts.agent ? opts.agent : new Agent(opts)\n this[kAgent] = agent\n\n this[kClients] = agent[kClients]\n this[kOptions] = buildMockOptions(opts)\n }\n\n get (origin) {\n let dispatcher = this[kMockAgentGet](origin)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n }\n return dispatcher\n }\n\n dispatch (opts, handler) {\n // Call MockAgent.get to perform additional setup before dispatching as normal\n this.get(opts.origin)\n return this[kAgent].dispatch(opts, handler)\n }\n\n async close () {\n await this[kAgent].close()\n this[kClients].clear()\n }\n\n deactivate () {\n this[kIsMockActive] = false\n }\n\n activate () {\n this[kIsMockActive] = true\n }\n\n enableNetConnect (matcher) {\n if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {\n if (Array.isArray(this[kNetConnect])) {\n this[kNetConnect].push(matcher)\n } else {\n this[kNetConnect] = [matcher]\n }\n } else if (typeof matcher === 'undefined') {\n this[kNetConnect] = true\n } else {\n throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')\n }\n }\n\n disableNetConnect () {\n this[kNetConnect] = false\n }\n\n // This is required to bypass issues caused by using global symbols - see:\n // https://github.com/nodejs/undici/issues/1447\n get isMockActive () {\n return this[kIsMockActive]\n }\n\n [kMockAgentSet] (origin, dispatcher) {\n this[kClients].set(origin, new FakeWeakRef(dispatcher))\n }\n\n [kFactory] (origin) {\n const mockOptions = Object.assign({ agent: this }, this[kOptions])\n return this[kOptions] && this[kOptions].connections === 1\n ? new MockClient(origin, mockOptions)\n : new MockPool(origin, mockOptions)\n }\n\n [kMockAgentGet] (origin) {\n // First check if we can immediately find it\n const ref = this[kClients].get(origin)\n if (ref) {\n return ref.deref()\n }\n\n // If the origin is not a string create a dummy parent pool and return to user\n if (typeof origin !== 'string') {\n const dispatcher = this[kFactory]('http://localhost:9999')\n this[kMockAgentSet](origin, dispatcher)\n return dispatcher\n }\n\n // If we match, create a pool and assign the same dispatches\n for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) {\n const nonExplicitDispatcher = nonExplicitRef.deref()\n if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {\n const dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]\n return dispatcher\n }\n }\n }\n\n [kGetNetConnect] () {\n return this[kNetConnect]\n }\n\n pendingInterceptors () {\n const mockAgentClients = this[kClients]\n\n return Array.from(mockAgentClients.entries())\n .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin })))\n .filter(({ pending }) => pending)\n }\n\n assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {\n const pending = this.pendingInterceptors()\n\n if (pending.length === 0) {\n return\n }\n\n const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length)\n\n throw new UndiciError(`\n${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending:\n\n${pendingInterceptorsFormatter.format(pending)}\n`.trim())\n }\n}\n\nmodule.exports = MockAgent\n","'use strict'\n\nconst { promisify } = require('util')\nconst Client = require('../client')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockClient provides an API that extends the Client to influence the mockDispatches.\n */\nclass MockClient extends Client {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockClient\n","'use strict'\n\nconst { UndiciError } = require('../core/errors')\n\nclass MockNotMatchedError extends UndiciError {\n constructor (message) {\n super(message)\n Error.captureStackTrace(this, MockNotMatchedError)\n this.name = 'MockNotMatchedError'\n this.message = message || 'The request does not match any registered mock dispatches'\n this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'\n }\n}\n\nmodule.exports = {\n MockNotMatchedError\n}\n","'use strict'\n\nconst { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kDispatchKey,\n kDefaultHeaders,\n kDefaultTrailers,\n kContentLength,\n kMockDispatch\n} = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { buildURL } = require('../core/util')\n\n/**\n * Defines the scope API for an interceptor reply\n */\nclass MockScope {\n constructor (mockDispatch) {\n this[kMockDispatch] = mockDispatch\n }\n\n /**\n * Delay a reply by a set amount in ms.\n */\n delay (waitInMs) {\n if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {\n throw new InvalidArgumentError('waitInMs must be a valid integer > 0')\n }\n\n this[kMockDispatch].delay = waitInMs\n return this\n }\n\n /**\n * For a defined reply, never mark as consumed.\n */\n persist () {\n this[kMockDispatch].persist = true\n return this\n }\n\n /**\n * Allow one to define a reply for a set amount of matching requests.\n */\n times (repeatTimes) {\n if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {\n throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')\n }\n\n this[kMockDispatch].times = repeatTimes\n return this\n }\n}\n\n/**\n * Defines an interceptor for a Mock\n */\nclass MockInterceptor {\n constructor (opts, mockDispatches) {\n if (typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object')\n }\n if (typeof opts.path === 'undefined') {\n throw new InvalidArgumentError('opts.path must be defined')\n }\n if (typeof opts.method === 'undefined') {\n opts.method = 'GET'\n }\n // See https://github.com/nodejs/undici/issues/1245\n // As per RFC 3986, clients are not supposed to send URI\n // fragments to servers when they retrieve a document,\n if (typeof opts.path === 'string') {\n if (opts.query) {\n opts.path = buildURL(opts.path, opts.query)\n } else {\n // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811\n const parsedURL = new URL(opts.path, 'data://')\n opts.path = parsedURL.pathname + parsedURL.search\n }\n }\n if (typeof opts.method === 'string') {\n opts.method = opts.method.toUpperCase()\n }\n\n this[kDispatchKey] = buildKey(opts)\n this[kDispatches] = mockDispatches\n this[kDefaultHeaders] = {}\n this[kDefaultTrailers] = {}\n this[kContentLength] = false\n }\n\n createMockScopeDispatchData (statusCode, data, responseOptions = {}) {\n const responseData = getResponseData(data)\n const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}\n const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }\n const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }\n\n return { statusCode, data, headers, trailers }\n }\n\n validateReplyParameters (statusCode, data, responseOptions) {\n if (typeof statusCode === 'undefined') {\n throw new InvalidArgumentError('statusCode must be defined')\n }\n if (typeof data === 'undefined') {\n throw new InvalidArgumentError('data must be defined')\n }\n if (typeof responseOptions !== 'object') {\n throw new InvalidArgumentError('responseOptions must be an object')\n }\n }\n\n /**\n * Mock an undici request with a defined reply.\n */\n reply (replyData) {\n // Values of reply aren't available right now as they\n // can only be available when the reply callback is invoked.\n if (typeof replyData === 'function') {\n // We'll first wrap the provided callback in another function,\n // this function will properly resolve the data from the callback\n // when invoked.\n const wrappedDefaultsCallback = (opts) => {\n // Our reply options callback contains the parameter for statusCode, data and options.\n const resolvedData = replyData(opts)\n\n // Check if it is in the right format\n if (typeof resolvedData !== 'object') {\n throw new InvalidArgumentError('reply options callback must return an object')\n }\n\n const { statusCode, data = '', responseOptions = {} } = resolvedData\n this.validateReplyParameters(statusCode, data, responseOptions)\n // Since the values can be obtained immediately we return them\n // from this higher order function that will be resolved later.\n return {\n ...this.createMockScopeDispatchData(statusCode, data, responseOptions)\n }\n }\n\n // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)\n return new MockScope(newMockDispatch)\n }\n\n // We can have either one or three parameters, if we get here,\n // we should have 1-3 parameters. So we spread the arguments of\n // this function to obtain the parameters, since replyData will always\n // just be the statusCode.\n const [statusCode, data = '', responseOptions = {}] = [...arguments]\n this.validateReplyParameters(statusCode, data, responseOptions)\n\n // Send in-already provided data like usual\n const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions)\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Mock an undici request with a defined error.\n */\n replyWithError (error) {\n if (typeof error === 'undefined') {\n throw new InvalidArgumentError('error must be defined')\n }\n\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Set default reply headers on the interceptor for subsequent replies\n */\n defaultReplyHeaders (headers) {\n if (typeof headers === 'undefined') {\n throw new InvalidArgumentError('headers must be defined')\n }\n\n this[kDefaultHeaders] = headers\n return this\n }\n\n /**\n * Set default reply trailers on the interceptor for subsequent replies\n */\n defaultReplyTrailers (trailers) {\n if (typeof trailers === 'undefined') {\n throw new InvalidArgumentError('trailers must be defined')\n }\n\n this[kDefaultTrailers] = trailers\n return this\n }\n\n /**\n * Set reply content length header for replies on the interceptor\n */\n replyContentLength () {\n this[kContentLength] = true\n return this\n }\n}\n\nmodule.exports.MockInterceptor = MockInterceptor\nmodule.exports.MockScope = MockScope\n","'use strict'\n\nconst { promisify } = require('util')\nconst Pool = require('../pool')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockPool provides an API that extends the Pool to influence the mockDispatches.\n */\nclass MockPool extends Pool {\n constructor (origin, opts) {\n super(origin, opts)\n\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(opts, this[kDispatches])\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockPool\n","'use strict'\n\nmodule.exports = {\n kAgent: Symbol('agent'),\n kOptions: Symbol('options'),\n kFactory: Symbol('factory'),\n kDispatches: Symbol('dispatches'),\n kDispatchKey: Symbol('dispatch key'),\n kDefaultHeaders: Symbol('default headers'),\n kDefaultTrailers: Symbol('default trailers'),\n kContentLength: Symbol('content length'),\n kMockAgent: Symbol('mock agent'),\n kMockAgentSet: Symbol('mock agent set'),\n kMockAgentGet: Symbol('mock agent get'),\n kMockDispatch: Symbol('mock dispatch'),\n kClose: Symbol('close'),\n kOriginalClose: Symbol('original agent close'),\n kOrigin: Symbol('origin'),\n kIsMockActive: Symbol('is mock active'),\n kNetConnect: Symbol('net connect'),\n kGetNetConnect: Symbol('get net connect'),\n kConnected: Symbol('connected')\n}\n","'use strict'\n\nconst { MockNotMatchedError } = require('./mock-errors')\nconst {\n kDispatches,\n kMockAgent,\n kOriginalDispatch,\n kOrigin,\n kGetNetConnect\n} = require('./mock-symbols')\nconst { buildURL, nop } = require('../core/util')\nconst { STATUS_CODES } = require('http')\nconst {\n types: {\n isPromise\n }\n} = require('util')\n\nfunction matchValue (match, value) {\n if (typeof match === 'string') {\n return match === value\n }\n if (match instanceof RegExp) {\n return match.test(value)\n }\n if (typeof match === 'function') {\n return match(value) === true\n }\n return false\n}\n\nfunction lowerCaseEntries (headers) {\n return Object.fromEntries(\n Object.entries(headers).map(([headerName, headerValue]) => {\n return [headerName.toLocaleLowerCase(), headerValue]\n })\n )\n}\n\n/**\n * @param {import('../../index').Headers|string[]|Record} headers\n * @param {string} key\n */\nfunction getHeaderByName (headers, key) {\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {\n return headers[i + 1]\n }\n }\n\n return undefined\n } else if (typeof headers.get === 'function') {\n return headers.get(key)\n } else {\n return lowerCaseEntries(headers)[key.toLocaleLowerCase()]\n }\n}\n\n/** @param {string[]} headers */\nfunction buildHeadersFromArray (headers) { // fetch HeadersList\n const clone = headers.slice()\n const entries = []\n for (let index = 0; index < clone.length; index += 2) {\n entries.push([clone[index], clone[index + 1]])\n }\n return Object.fromEntries(entries)\n}\n\nfunction matchHeaders (mockDispatch, headers) {\n if (typeof mockDispatch.headers === 'function') {\n if (Array.isArray(headers)) { // fetch HeadersList\n headers = buildHeadersFromArray(headers)\n }\n return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})\n }\n if (typeof mockDispatch.headers === 'undefined') {\n return true\n }\n if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {\n return false\n }\n\n for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {\n const headerValue = getHeaderByName(headers, matchHeaderName)\n\n if (!matchValue(matchHeaderValue, headerValue)) {\n return false\n }\n }\n return true\n}\n\nfunction safeUrl (path) {\n if (typeof path !== 'string') {\n return path\n }\n\n const pathSegments = path.split('?')\n\n if (pathSegments.length !== 2) {\n return path\n }\n\n const qp = new URLSearchParams(pathSegments.pop())\n qp.sort()\n return [...pathSegments, qp.toString()].join('?')\n}\n\nfunction matchKey (mockDispatch, { path, method, body, headers }) {\n const pathMatch = matchValue(mockDispatch.path, path)\n const methodMatch = matchValue(mockDispatch.method, method)\n const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true\n const headersMatch = matchHeaders(mockDispatch, headers)\n return pathMatch && methodMatch && bodyMatch && headersMatch\n}\n\nfunction getResponseData (data) {\n if (Buffer.isBuffer(data)) {\n return data\n } else if (typeof data === 'object') {\n return JSON.stringify(data)\n } else {\n return data.toString()\n }\n}\n\nfunction getMockDispatch (mockDispatches, key) {\n const basePath = key.query ? buildURL(key.path, key.query) : key.path\n const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath\n\n // Match path\n let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)\n }\n\n // Match method\n matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`)\n }\n\n // Match body\n matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`)\n }\n\n // Match headers\n matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`)\n }\n\n return matchedMockDispatches[0]\n}\n\nfunction addMockDispatch (mockDispatches, key, data) {\n const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false }\n const replyData = typeof data === 'function' ? { callback: data } : { ...data }\n const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }\n mockDispatches.push(newMockDispatch)\n return newMockDispatch\n}\n\nfunction deleteMockDispatch (mockDispatches, key) {\n const index = mockDispatches.findIndex(dispatch => {\n if (!dispatch.consumed) {\n return false\n }\n return matchKey(dispatch, key)\n })\n if (index !== -1) {\n mockDispatches.splice(index, 1)\n }\n}\n\nfunction buildKey (opts) {\n const { path, method, body, headers, query } = opts\n return {\n path,\n method,\n body,\n headers,\n query\n }\n}\n\nfunction generateKeyValues (data) {\n return Object.entries(data).reduce((keyValuePairs, [key, value]) => [\n ...keyValuePairs,\n Buffer.from(`${key}`),\n Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`)\n ], [])\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n * @param {number} statusCode\n */\nfunction getStatusText (statusCode) {\n return STATUS_CODES[statusCode] || 'unknown'\n}\n\nasync function getResponse (body) {\n const buffers = []\n for await (const data of body) {\n buffers.push(data)\n }\n return Buffer.concat(buffers).toString('utf8')\n}\n\n/**\n * Mock dispatch function used to simulate undici dispatches\n */\nfunction mockDispatch (opts, handler) {\n // Get mock dispatch from built key\n const key = buildKey(opts)\n const mockDispatch = getMockDispatch(this[kDispatches], key)\n\n mockDispatch.timesInvoked++\n\n // Here's where we resolve a callback if a callback is present for the dispatch data.\n if (mockDispatch.data.callback) {\n mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) }\n }\n\n // Parse mockDispatch data\n const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch\n const { timesInvoked, times } = mockDispatch\n\n // If it's used up and not persistent, mark as consumed\n mockDispatch.consumed = !persist && timesInvoked >= times\n mockDispatch.pending = timesInvoked < times\n\n // If specified, trigger dispatch error\n if (error !== null) {\n deleteMockDispatch(this[kDispatches], key)\n handler.onError(error)\n return true\n }\n\n // Handle the request with a delay if necessary\n if (typeof delay === 'number' && delay > 0) {\n setTimeout(() => {\n handleReply(this[kDispatches])\n }, delay)\n } else {\n handleReply(this[kDispatches])\n }\n\n function handleReply (mockDispatches, _data = data) {\n // fetch's HeadersList is a 1D string array\n const optsHeaders = Array.isArray(opts.headers)\n ? buildHeadersFromArray(opts.headers)\n : opts.headers\n const body = typeof _data === 'function'\n ? _data({ ...opts, headers: optsHeaders })\n : _data\n\n // util.types.isPromise is likely needed for jest.\n if (isPromise(body)) {\n // If handleReply is asynchronous, throwing an error\n // in the callback will reject the promise, rather than\n // synchronously throw the error, which breaks some tests.\n // Rather, we wait for the callback to resolve if it is a\n // promise, and then re-run handleReply with the new body.\n body.then((newData) => handleReply(mockDispatches, newData))\n return\n }\n\n const responseData = getResponseData(body)\n const responseHeaders = generateKeyValues(headers)\n const responseTrailers = generateKeyValues(trailers)\n\n handler.abort = nop\n handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode))\n handler.onData(Buffer.from(responseData))\n handler.onComplete(responseTrailers)\n deleteMockDispatch(mockDispatches, key)\n }\n\n function resume () {}\n\n return true\n}\n\nfunction buildMockDispatch () {\n const agent = this[kMockAgent]\n const origin = this[kOrigin]\n const originalDispatch = this[kOriginalDispatch]\n\n return function dispatch (opts, handler) {\n if (agent.isMockActive) {\n try {\n mockDispatch.call(this, opts, handler)\n } catch (error) {\n if (error instanceof MockNotMatchedError) {\n const netConnect = agent[kGetNetConnect]()\n if (netConnect === false) {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`)\n }\n if (checkNetConnect(netConnect, origin)) {\n originalDispatch.call(this, opts, handler)\n } else {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`)\n }\n } else {\n throw error\n }\n }\n } else {\n originalDispatch.call(this, opts, handler)\n }\n }\n}\n\nfunction checkNetConnect (netConnect, origin) {\n const url = new URL(origin)\n if (netConnect === true) {\n return true\n } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {\n return true\n }\n return false\n}\n\nfunction buildMockOptions (opts) {\n if (opts) {\n const { agent, ...mockOptions } = opts\n return mockOptions\n }\n}\n\nmodule.exports = {\n getResponseData,\n getMockDispatch,\n addMockDispatch,\n deleteMockDispatch,\n buildKey,\n generateKeyValues,\n matchValue,\n getResponse,\n getStatusText,\n mockDispatch,\n buildMockDispatch,\n checkNetConnect,\n buildMockOptions,\n getHeaderByName\n}\n","'use strict'\n\nconst { Transform } = require('stream')\nconst { Console } = require('console')\n\n/**\n * Gets the output of `console.table(…)` as a string.\n */\nmodule.exports = class PendingInterceptorsFormatter {\n constructor ({ disableColors } = {}) {\n this.transform = new Transform({\n transform (chunk, _enc, cb) {\n cb(null, chunk)\n }\n })\n\n this.logger = new Console({\n stdout: this.transform,\n inspectOptions: {\n colors: !disableColors && !process.env.CI\n }\n })\n }\n\n format (pendingInterceptors) {\n const withPrettyHeaders = pendingInterceptors.map(\n ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({\n Method: method,\n Origin: origin,\n Path: path,\n 'Status code': statusCode,\n Persistent: persist ? '✅' : '❌',\n Invocations: timesInvoked,\n Remaining: persist ? Infinity : times - timesInvoked\n }))\n\n this.logger.table(withPrettyHeaders)\n return this.transform.read().toString()\n }\n}\n","'use strict'\n\nconst singulars = {\n pronoun: 'it',\n is: 'is',\n was: 'was',\n this: 'this'\n}\n\nconst plurals = {\n pronoun: 'they',\n is: 'are',\n was: 'were',\n this: 'these'\n}\n\nmodule.exports = class Pluralizer {\n constructor (singular, plural) {\n this.singular = singular\n this.plural = plural\n }\n\n pluralize (count) {\n const one = count === 1\n const keys = one ? singulars : plurals\n const noun = one ? this.singular : this.plural\n return { ...keys, count, noun }\n }\n}\n","/* eslint-disable */\n\n'use strict'\n\n// Extracted from node/lib/internal/fixed_queue.js\n\n// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.\nconst kSize = 2048;\nconst kMask = kSize - 1;\n\n// The FixedQueue is implemented as a singly-linked list of fixed-size\n// circular buffers. It looks something like this:\n//\n// head tail\n// | |\n// v v\n// +-----------+ <-----\\ +-----------+ <------\\ +-----------+\n// | [null] | \\----- | next | \\------- | next |\n// +-----------+ +-----------+ +-----------+\n// | item | <-- bottom | item | <-- bottom | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | | [empty] |\n// | item | | item | bottom --> | item |\n// | item | | item | | item |\n// | ... | | ... | | ... |\n// | item | | item | | item |\n// | item | | item | | item |\n// | [empty] | <-- top | item | | item |\n// | [empty] | | item | | item |\n// | [empty] | | [empty] | <-- top top --> | [empty] |\n// +-----------+ +-----------+ +-----------+\n//\n// Or, if there is only one circular buffer, it looks something\n// like either of these:\n//\n// head tail head tail\n// | | | |\n// v v v v\n// +-----------+ +-----------+\n// | [null] | | [null] |\n// +-----------+ +-----------+\n// | [empty] | | item |\n// | [empty] | | item |\n// | item | <-- bottom top --> | [empty] |\n// | item | | [empty] |\n// | [empty] | <-- top bottom --> | item |\n// | [empty] | | item |\n// +-----------+ +-----------+\n//\n// Adding a value means moving `top` forward by one, removing means\n// moving `bottom` forward by one. After reaching the end, the queue\n// wraps around.\n//\n// When `top === bottom` the current queue is empty and when\n// `top + 1 === bottom` it's full. This wastes a single space of storage\n// but allows much quicker checks.\n\nclass FixedCircularBuffer {\n constructor() {\n this.bottom = 0;\n this.top = 0;\n this.list = new Array(kSize);\n this.next = null;\n }\n\n isEmpty() {\n return this.top === this.bottom;\n }\n\n isFull() {\n return ((this.top + 1) & kMask) === this.bottom;\n }\n\n push(data) {\n this.list[this.top] = data;\n this.top = (this.top + 1) & kMask;\n }\n\n shift() {\n const nextItem = this.list[this.bottom];\n if (nextItem === undefined)\n return null;\n this.list[this.bottom] = undefined;\n this.bottom = (this.bottom + 1) & kMask;\n return nextItem;\n }\n}\n\nmodule.exports = class FixedQueue {\n constructor() {\n this.head = this.tail = new FixedCircularBuffer();\n }\n\n isEmpty() {\n return this.head.isEmpty();\n }\n\n push(data) {\n if (this.head.isFull()) {\n // Head is full: Creates a new queue, sets the old queue's `.next` to it,\n // and sets it as the new main queue.\n this.head = this.head.next = new FixedCircularBuffer();\n }\n this.head.push(data);\n }\n\n shift() {\n const tail = this.tail;\n const next = tail.shift();\n if (tail.isEmpty() && tail.next !== null) {\n // If there is another queue, it forms the new tail.\n this.tail = tail.next;\n }\n return next;\n }\n};\n","'use strict'\n\nconst DispatcherBase = require('./dispatcher-base')\nconst FixedQueue = require('./node/fixed-queue')\nconst { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('./core/symbols')\nconst PoolStats = require('./pool-stats')\n\nconst kClients = Symbol('clients')\nconst kNeedDrain = Symbol('needDrain')\nconst kQueue = Symbol('queue')\nconst kClosedResolve = Symbol('closed resolve')\nconst kOnDrain = Symbol('onDrain')\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kGetDispatcher = Symbol('get dispatcher')\nconst kAddClient = Symbol('add client')\nconst kRemoveClient = Symbol('remove client')\nconst kStats = Symbol('stats')\n\nclass PoolBase extends DispatcherBase {\n constructor () {\n super()\n\n this[kQueue] = new FixedQueue()\n this[kClients] = []\n this[kQueued] = 0\n\n const pool = this\n\n this[kOnDrain] = function onDrain (origin, targets) {\n const queue = pool[kQueue]\n\n let needDrain = false\n\n while (!needDrain) {\n const item = queue.shift()\n if (!item) {\n break\n }\n pool[kQueued]--\n needDrain = !this.dispatch(item.opts, item.handler)\n }\n\n this[kNeedDrain] = needDrain\n\n if (!this[kNeedDrain] && pool[kNeedDrain]) {\n pool[kNeedDrain] = false\n pool.emit('drain', origin, [pool, ...targets])\n }\n\n if (pool[kClosedResolve] && queue.isEmpty()) {\n Promise\n .all(pool[kClients].map(c => c.close()))\n .then(pool[kClosedResolve])\n }\n }\n\n this[kOnConnect] = (origin, targets) => {\n pool.emit('connect', origin, [pool, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n pool.emit('disconnect', origin, [pool, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n pool.emit('connectionError', origin, [pool, ...targets], err)\n }\n\n this[kStats] = new PoolStats(this)\n }\n\n get [kBusy] () {\n return this[kNeedDrain]\n }\n\n get [kConnected] () {\n return this[kClients].filter(client => client[kConnected]).length\n }\n\n get [kFree] () {\n return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length\n }\n\n get [kPending] () {\n let ret = this[kQueued]\n for (const { [kPending]: pending } of this[kClients]) {\n ret += pending\n }\n return ret\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { [kRunning]: running } of this[kClients]) {\n ret += running\n }\n return ret\n }\n\n get [kSize] () {\n let ret = this[kQueued]\n for (const { [kSize]: size } of this[kClients]) {\n ret += size\n }\n return ret\n }\n\n get stats () {\n return this[kStats]\n }\n\n async [kClose] () {\n if (this[kQueue].isEmpty()) {\n return Promise.all(this[kClients].map(c => c.close()))\n } else {\n return new Promise((resolve) => {\n this[kClosedResolve] = resolve\n })\n }\n }\n\n async [kDestroy] (err) {\n while (true) {\n const item = this[kQueue].shift()\n if (!item) {\n break\n }\n item.handler.onError(err)\n }\n\n return Promise.all(this[kClients].map(c => c.destroy(err)))\n }\n\n [kDispatch] (opts, handler) {\n const dispatcher = this[kGetDispatcher]()\n\n if (!dispatcher) {\n this[kNeedDrain] = true\n this[kQueue].push({ opts, handler })\n this[kQueued]++\n } else if (!dispatcher.dispatch(opts, handler)) {\n dispatcher[kNeedDrain] = true\n this[kNeedDrain] = !this[kGetDispatcher]()\n }\n\n return !this[kNeedDrain]\n }\n\n [kAddClient] (client) {\n client\n .on('drain', this[kOnDrain])\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].push(client)\n\n if (this[kNeedDrain]) {\n process.nextTick(() => {\n if (this[kNeedDrain]) {\n this[kOnDrain](client[kUrl], [this, client])\n }\n })\n }\n\n return this\n }\n\n [kRemoveClient] (client) {\n client.close(() => {\n const idx = this[kClients].indexOf(client)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n })\n\n this[kNeedDrain] = this[kClients].some(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n }\n}\n\nmodule.exports = {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n}\n","const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require('./core/symbols')\nconst kPool = Symbol('pool')\n\nclass PoolStats {\n constructor (pool) {\n this[kPool] = pool\n }\n\n get connected () {\n return this[kPool][kConnected]\n }\n\n get free () {\n return this[kPool][kFree]\n }\n\n get pending () {\n return this[kPool][kPending]\n }\n\n get queued () {\n return this[kPool][kQueued]\n }\n\n get running () {\n return this[kPool][kRunning]\n }\n\n get size () {\n return this[kPool][kSize]\n }\n}\n\nmodule.exports = PoolStats\n","'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('./core/errors')\nconst util = require('./core/util')\nconst { kUrl, kInterceptors } = require('./core/symbols')\nconst buildConnector = require('./core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass Pool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n ...options\n } = {}) {\n super()\n\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool)\n ? options.interceptors.Pool\n : []\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2 }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n }\n\n [kGetDispatcher] () {\n let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain])\n\n if (dispatcher) {\n return dispatcher\n }\n\n if (!this[kConnections] || this[kClients].length < this[kConnections]) {\n dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n }\n\n return dispatcher\n }\n}\n\nmodule.exports = Pool\n","'use strict'\n\nconst { kProxy, kClose, kDestroy, kInterceptors } = require('./core/symbols')\nconst { URL } = require('url')\nconst Agent = require('./agent')\nconst Pool = require('./pool')\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError, RequestAbortedError } = require('./core/errors')\nconst buildConnector = require('./core/connect')\n\nconst kAgent = Symbol('proxy agent')\nconst kClient = Symbol('proxy client')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kRequestTls = Symbol('request tls settings')\nconst kProxyTls = Symbol('proxy tls settings')\nconst kConnectEndpoint = Symbol('connect endpoint function')\n\nfunction defaultProtocolPort (protocol) {\n return protocol === 'https:' ? 443 : 80\n}\n\nfunction buildProxyOptions (opts) {\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n return {\n uri: opts.uri,\n protocol: opts.protocol || 'https'\n }\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass ProxyAgent extends DispatcherBase {\n constructor (opts) {\n super(opts)\n this[kProxy] = buildProxyOptions(opts)\n this[kAgent] = new Agent(opts)\n this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent)\n ? opts.interceptors.ProxyAgent\n : []\n\n if (typeof opts === 'string') {\n opts = { uri: opts }\n }\n\n if (!opts || !opts.uri) {\n throw new InvalidArgumentError('Proxy opts.uri is mandatory')\n }\n\n const { clientFactory = defaultFactory } = opts\n\n if (typeof clientFactory !== 'function') {\n throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')\n }\n\n this[kRequestTls] = opts.requestTls\n this[kProxyTls] = opts.proxyTls\n this[kProxyHeaders] = opts.headers || {}\n\n const resolvedUrl = new URL(opts.uri)\n const { origin, port, host, username, password } = resolvedUrl\n\n if (opts.auth && opts.token) {\n throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')\n } else if (opts.auth) {\n /* @deprecated in favour of opts.token */\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`\n } else if (opts.token) {\n this[kProxyHeaders]['proxy-authorization'] = opts.token\n } else if (username && password) {\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`\n }\n\n const connect = buildConnector({ ...opts.proxyTls })\n this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })\n this[kClient] = clientFactory(resolvedUrl, { connect })\n this[kAgent] = new Agent({\n ...opts,\n connect: async (opts, callback) => {\n let requestedHost = opts.host\n if (!opts.port) {\n requestedHost += `:${defaultProtocolPort(opts.protocol)}`\n }\n try {\n const { socket, statusCode } = await this[kClient].connect({\n origin,\n port,\n path: requestedHost,\n signal: opts.signal,\n headers: {\n ...this[kProxyHeaders],\n host\n }\n })\n if (statusCode !== 200) {\n socket.on('error', () => {}).destroy()\n callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`))\n }\n if (opts.protocol !== 'https:') {\n callback(null, socket)\n return\n }\n let servername\n if (this[kRequestTls]) {\n servername = this[kRequestTls].servername\n } else {\n servername = opts.servername\n }\n this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)\n } catch (err) {\n callback(err)\n }\n }\n })\n }\n\n dispatch (opts, handler) {\n const { host } = new URL(opts.origin)\n const headers = buildHeaders(opts.headers)\n throwIfProxyAuthIsSent(headers)\n return this[kAgent].dispatch(\n {\n ...opts,\n headers: {\n ...headers,\n host\n }\n },\n handler\n )\n }\n\n async [kClose] () {\n await this[kAgent].close()\n await this[kClient].close()\n }\n\n async [kDestroy] () {\n await this[kAgent].destroy()\n await this[kClient].destroy()\n }\n}\n\n/**\n * @param {string[] | Record} headers\n * @returns {Record}\n */\nfunction buildHeaders (headers) {\n // When using undici.fetch, the headers list is stored\n // as an array.\n if (Array.isArray(headers)) {\n /** @type {Record} */\n const headersPair = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n headersPair[headers[i]] = headers[i + 1]\n }\n\n return headersPair\n }\n\n return headers\n}\n\n/**\n * @param {Record} headers\n *\n * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers\n * Nevertheless, it was changed and to avoid a security vulnerability by end users\n * this check was created.\n * It should be removed in the next major version for performance reasons\n */\nfunction throwIfProxyAuthIsSent (headers) {\n const existProxyAuth = headers && Object.keys(headers)\n .find((key) => key.toLowerCase() === 'proxy-authorization')\n if (existProxyAuth) {\n throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')\n }\n}\n\nmodule.exports = ProxyAgent\n","'use strict'\n\nlet fastNow = Date.now()\nlet fastNowTimeout\n\nconst fastTimers = []\n\nfunction onTimeout () {\n fastNow = Date.now()\n\n let len = fastTimers.length\n let idx = 0\n while (idx < len) {\n const timer = fastTimers[idx]\n\n if (timer.state === 0) {\n timer.state = fastNow + timer.delay\n } else if (timer.state > 0 && fastNow >= timer.state) {\n timer.state = -1\n timer.callback(timer.opaque)\n }\n\n if (timer.state === -1) {\n timer.state = -2\n if (idx !== len - 1) {\n fastTimers[idx] = fastTimers.pop()\n } else {\n fastTimers.pop()\n }\n len -= 1\n } else {\n idx += 1\n }\n }\n\n if (fastTimers.length > 0) {\n refreshTimeout()\n }\n}\n\nfunction refreshTimeout () {\n if (fastNowTimeout && fastNowTimeout.refresh) {\n fastNowTimeout.refresh()\n } else {\n clearTimeout(fastNowTimeout)\n fastNowTimeout = setTimeout(onTimeout, 1e3)\n if (fastNowTimeout.unref) {\n fastNowTimeout.unref()\n }\n }\n}\n\nclass Timeout {\n constructor (callback, delay, opaque) {\n this.callback = callback\n this.delay = delay\n this.opaque = opaque\n\n // -2 not in timer list\n // -1 in timer list but inactive\n // 0 in timer list waiting for time\n // > 0 in timer list waiting for time to expire\n this.state = -2\n\n this.refresh()\n }\n\n refresh () {\n if (this.state === -2) {\n fastTimers.push(this)\n if (!fastNowTimeout || fastTimers.length === 1) {\n refreshTimeout()\n }\n }\n\n this.state = 0\n }\n\n clear () {\n this.state = -1\n }\n}\n\nmodule.exports = {\n setTimeout (callback, delay, opaque) {\n return delay < 1e3\n ? setTimeout(callback, delay, opaque)\n : new Timeout(callback, delay, opaque)\n },\n clearTimeout (timeout) {\n if (timeout instanceof Timeout) {\n timeout.clear()\n } else {\n clearTimeout(timeout)\n }\n }\n}\n","'use strict'\n\nconst diagnosticsChannel = require('diagnostics_channel')\nconst { uid, states } = require('./constants')\nconst {\n kReadyState,\n kSentClose,\n kByteParser,\n kReceivedClose\n} = require('./symbols')\nconst { fireEvent, failWebsocketConnection } = require('./util')\nconst { CloseEvent } = require('./events')\nconst { makeRequest } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { Headers } = require('../fetch/headers')\nconst { getGlobalDispatcher } = require('../global')\nconst { kHeadersList } = require('../core/symbols')\n\nconst channels = {}\nchannels.open = diagnosticsChannel.channel('undici:websocket:open')\nchannels.close = diagnosticsChannel.channel('undici:websocket:close')\nchannels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error')\n\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#concept-websocket-establish\n * @param {URL} url\n * @param {string|string[]} protocols\n * @param {import('./websocket').WebSocket} ws\n * @param {(response: any) => void} onEstablish\n * @param {Partial} options\n */\nfunction establishWebSocketConnection (url, protocols, ws, onEstablish, options) {\n // 1. Let requestURL be a copy of url, with its scheme set to \"http\", if url’s\n // scheme is \"ws\", and to \"https\" otherwise.\n const requestURL = url\n\n requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'\n\n // 2. Let request be a new request, whose URL is requestURL, client is client,\n // service-workers mode is \"none\", referrer is \"no-referrer\", mode is\n // \"websocket\", credentials mode is \"include\", cache mode is \"no-store\" ,\n // and redirect mode is \"error\".\n const request = makeRequest({\n urlList: [requestURL],\n serviceWorkers: 'none',\n referrer: 'no-referrer',\n mode: 'websocket',\n credentials: 'include',\n cache: 'no-store',\n redirect: 'error'\n })\n\n // Note: undici extension, allow setting custom headers.\n if (options.headers) {\n const headersList = new Headers(options.headers)[kHeadersList]\n\n request.headersList = headersList\n }\n\n // 3. Append (`Upgrade`, `websocket`) to request’s header list.\n // 4. Append (`Connection`, `Upgrade`) to request’s header list.\n // Note: both of these are handled by undici currently.\n // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397\n\n // 5. Let keyValue be a nonce consisting of a randomly selected\n // 16-byte value that has been forgiving-base64-encoded and\n // isomorphic encoded.\n const keyValue = crypto.randomBytes(16).toString('base64')\n\n // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s\n // header list.\n request.headersList.append('sec-websocket-key', keyValue)\n\n // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s\n // header list.\n request.headersList.append('sec-websocket-version', '13')\n\n // 8. For each protocol in protocols, combine\n // (`Sec-WebSocket-Protocol`, protocol) in request’s header\n // list.\n for (const protocol of protocols) {\n request.headersList.append('sec-websocket-protocol', protocol)\n }\n\n // 9. Let permessageDeflate be a user-agent defined\n // \"permessage-deflate\" extension header value.\n // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673\n // TODO: enable once permessage-deflate is supported\n const permessageDeflate = '' // 'permessage-deflate; 15'\n\n // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to\n // request’s header list.\n // request.headersList.append('sec-websocket-extensions', permessageDeflate)\n\n // 11. Fetch request with useParallelQueue set to true, and\n // processResponse given response being these steps:\n const controller = fetching({\n request,\n useParallelQueue: true,\n dispatcher: options.dispatcher ?? getGlobalDispatcher(),\n processResponse (response) {\n // 1. If response is a network error or its status is not 101,\n // fail the WebSocket connection.\n if (response.type === 'error' || response.status !== 101) {\n failWebsocketConnection(ws, 'Received network error or non-101 status code.')\n return\n }\n\n // 2. If protocols is not the empty list and extracting header\n // list values given `Sec-WebSocket-Protocol` and response’s\n // header list results in null, failure, or the empty byte\n // sequence, then fail the WebSocket connection.\n if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(ws, 'Server did not respond with sent protocols.')\n return\n }\n\n // 3. Follow the requirements stated step 2 to step 6, inclusive,\n // of the last set of steps in section 4.1 of The WebSocket\n // Protocol to validate response. This either results in fail\n // the WebSocket connection or the WebSocket connection is\n // established.\n\n // 2. If the response lacks an |Upgrade| header field or the |Upgrade|\n // header field contains a value that is not an ASCII case-\n // insensitive match for the value \"websocket\", the client MUST\n // _Fail the WebSocket Connection_.\n if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {\n failWebsocketConnection(ws, 'Server did not set Upgrade header to \"websocket\".')\n return\n }\n\n // 3. If the response lacks a |Connection| header field or the\n // |Connection| header field doesn't contain a token that is an\n // ASCII case-insensitive match for the value \"Upgrade\", the client\n // MUST _Fail the WebSocket Connection_.\n if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {\n failWebsocketConnection(ws, 'Server did not set Connection header to \"upgrade\".')\n return\n }\n\n // 4. If the response lacks a |Sec-WebSocket-Accept| header field or\n // the |Sec-WebSocket-Accept| contains a value other than the\n // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-\n // Key| (as a string, not base64-decoded) with the string \"258EAFA5-\n // E914-47DA-95CA-C5AB0DC85B11\" but ignoring any leading and\n // trailing whitespace, the client MUST _Fail the WebSocket\n // Connection_.\n const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')\n const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64')\n if (secWSAccept !== digest) {\n failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.')\n return\n }\n\n // 5. If the response includes a |Sec-WebSocket-Extensions| header\n // field and this header field indicates the use of an extension\n // that was not present in the client's handshake (the server has\n // indicated an extension not requested by the client), the client\n // MUST _Fail the WebSocket Connection_. (The parsing of this\n // header field to determine which extensions are requested is\n // discussed in Section 9.1.)\n const secExtension = response.headersList.get('Sec-WebSocket-Extensions')\n\n if (secExtension !== null && secExtension !== permessageDeflate) {\n failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.')\n return\n }\n\n // 6. If the response includes a |Sec-WebSocket-Protocol| header field\n // and this header field indicates the use of a subprotocol that was\n // not present in the client's handshake (the server has indicated a\n // subprotocol not requested by the client), the client MUST _Fail\n // the WebSocket Connection_.\n const secProtocol = response.headersList.get('Sec-WebSocket-Protocol')\n\n if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.')\n return\n }\n\n response.socket.on('data', onSocketData)\n response.socket.on('close', onSocketClose)\n response.socket.on('error', onSocketError)\n\n if (channels.open.hasSubscribers) {\n channels.open.publish({\n address: response.socket.address(),\n protocol: secProtocol,\n extensions: secExtension\n })\n }\n\n onEstablish(response)\n }\n })\n\n return controller\n}\n\n/**\n * @param {Buffer} chunk\n */\nfunction onSocketData (chunk) {\n if (!this.ws[kByteParser].write(chunk)) {\n this.pause()\n }\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4\n */\nfunction onSocketClose () {\n const { ws } = this\n\n // If the TCP connection was closed after the\n // WebSocket closing handshake was completed, the WebSocket connection\n // is said to have been closed _cleanly_.\n const wasClean = ws[kSentClose] && ws[kReceivedClose]\n\n let code = 1005\n let reason = ''\n\n const result = ws[kByteParser].closingInfo\n\n if (result) {\n code = result.code ?? 1005\n reason = result.reason\n } else if (!ws[kSentClose]) {\n // If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n code = 1006\n }\n\n // 1. Change the ready state to CLOSED (3).\n ws[kReadyState] = states.CLOSED\n\n // 2. If the user agent was required to fail the WebSocket\n // connection, or if the WebSocket connection was closed\n // after being flagged as full, fire an event named error\n // at the WebSocket object.\n // TODO\n\n // 3. Fire an event named close at the WebSocket object,\n // using CloseEvent, with the wasClean attribute\n // initialized to true if the connection closed cleanly\n // and false otherwise, the code attribute initialized to\n // the WebSocket connection close code, and the reason\n // attribute initialized to the result of applying UTF-8\n // decode without BOM to the WebSocket connection close\n // reason.\n fireEvent('close', ws, CloseEvent, {\n wasClean, code, reason\n })\n\n if (channels.close.hasSubscribers) {\n channels.close.publish({\n websocket: ws,\n code,\n reason\n })\n }\n}\n\nfunction onSocketError (error) {\n const { ws } = this\n\n ws[kReadyState] = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(error)\n }\n\n this.destroy()\n}\n\nmodule.exports = {\n establishWebSocketConnection\n}\n","'use strict'\n\n// This is a Globally Unique Identifier unique used\n// to validate that the endpoint accepts websocket\n// connections.\n// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3\nconst uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'\n\n/** @type {PropertyDescriptor} */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\nconst states = {\n CONNECTING: 0,\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3\n}\n\nconst opcodes = {\n CONTINUATION: 0x0,\n TEXT: 0x1,\n BINARY: 0x2,\n CLOSE: 0x8,\n PING: 0x9,\n PONG: 0xA\n}\n\nconst maxUnsigned16Bit = 2 ** 16 - 1 // 65535\n\nconst parserStates = {\n INFO: 0,\n PAYLOADLENGTH_16: 2,\n PAYLOADLENGTH_64: 3,\n READ_DATA: 4\n}\n\nconst emptyBuffer = Buffer.allocUnsafe(0)\n\nmodule.exports = {\n uid,\n staticPropertyDescriptors,\n states,\n opcodes,\n maxUnsigned16Bit,\n parserStates,\n emptyBuffer\n}\n","'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { kEnumerableProperty } = require('../core/util')\nconst { MessagePort } = require('worker_threads')\n\n/**\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent\n */\nclass MessageEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' })\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.MessageEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n }\n\n get data () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.data\n }\n\n get origin () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.origin\n }\n\n get lastEventId () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.lastEventId\n }\n\n get source () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.source\n }\n\n get ports () {\n webidl.brandCheck(this, MessageEvent)\n\n if (!Object.isFrozen(this.#eventInit.ports)) {\n Object.freeze(this.#eventInit.ports)\n }\n\n return this.#eventInit.ports\n }\n\n initMessageEvent (\n type,\n bubbles = false,\n cancelable = false,\n data = null,\n origin = '',\n lastEventId = '',\n source = null,\n ports = []\n ) {\n webidl.brandCheck(this, MessageEvent)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' })\n\n return new MessageEvent(type, {\n bubbles, cancelable, data, origin, lastEventId, source, ports\n })\n }\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#the-closeevent-interface\n */\nclass CloseEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' })\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.CloseEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n }\n\n get wasClean () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.wasClean\n }\n\n get code () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.code\n }\n\n get reason () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.reason\n }\n}\n\n// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface\nclass ErrorEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict) {\n webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' })\n\n super(type, eventInitDict)\n\n type = webidl.converters.DOMString(type)\n eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})\n\n this.#eventInit = eventInitDict\n }\n\n get message () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.message\n }\n\n get filename () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.filename\n }\n\n get lineno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.lineno\n }\n\n get colno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.colno\n }\n\n get error () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.error\n }\n}\n\nObject.defineProperties(MessageEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'MessageEvent',\n configurable: true\n },\n data: kEnumerableProperty,\n origin: kEnumerableProperty,\n lastEventId: kEnumerableProperty,\n source: kEnumerableProperty,\n ports: kEnumerableProperty,\n initMessageEvent: kEnumerableProperty\n})\n\nObject.defineProperties(CloseEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'CloseEvent',\n configurable: true\n },\n reason: kEnumerableProperty,\n code: kEnumerableProperty,\n wasClean: kEnumerableProperty\n})\n\nObject.defineProperties(ErrorEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'ErrorEvent',\n configurable: true\n },\n message: kEnumerableProperty,\n filename: kEnumerableProperty,\n lineno: kEnumerableProperty,\n colno: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\nwebidl.converters.MessagePort = webidl.interfaceConverter(MessagePort)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.MessagePort\n)\n\nconst eventInit = [\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: false\n }\n]\n\nwebidl.converters.MessageEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'data',\n converter: webidl.converters.any,\n defaultValue: null\n },\n {\n key: 'origin',\n converter: webidl.converters.USVString,\n defaultValue: ''\n },\n {\n key: 'lastEventId',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'source',\n // Node doesn't implement WindowProxy or ServiceWorker, so the only\n // valid value for source is a MessagePort.\n converter: webidl.nullableConverter(webidl.converters.MessagePort),\n defaultValue: null\n },\n {\n key: 'ports',\n converter: webidl.converters['sequence'],\n get defaultValue () {\n return []\n }\n }\n])\n\nwebidl.converters.CloseEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'wasClean',\n converter: webidl.converters.boolean,\n defaultValue: false\n },\n {\n key: 'code',\n converter: webidl.converters['unsigned short'],\n defaultValue: 0\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: ''\n }\n])\n\nwebidl.converters.ErrorEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'message',\n converter: webidl.converters.DOMString,\n defaultValue: ''\n },\n {\n key: 'filename',\n converter: webidl.converters.USVString,\n defaultValue: ''\n },\n {\n key: 'lineno',\n converter: webidl.converters['unsigned long'],\n defaultValue: 0\n },\n {\n key: 'colno',\n converter: webidl.converters['unsigned long'],\n defaultValue: 0\n },\n {\n key: 'error',\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = {\n MessageEvent,\n CloseEvent,\n ErrorEvent\n}\n","'use strict'\n\nconst { maxUnsigned16Bit } = require('./constants')\n\n/** @type {import('crypto')} */\nlet crypto\ntry {\n crypto = require('crypto')\n} catch {\n\n}\n\nclass WebsocketFrameSend {\n /**\n * @param {Buffer|undefined} data\n */\n constructor (data) {\n this.frameData = data\n this.maskKey = crypto.randomBytes(4)\n }\n\n createFrame (opcode) {\n const bodyLength = this.frameData?.byteLength ?? 0\n\n /** @type {number} */\n let payloadLength = bodyLength // 0-125\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n\n const buffer = Buffer.allocUnsafe(bodyLength + offset)\n\n // Clear first 2 bytes, everything else is overwritten\n buffer[0] = buffer[1] = 0\n buffer[0] |= 0x80 // FIN\n buffer[0] = (buffer[0] & 0xF0) + opcode // opcode\n\n /*! ws. MIT License. Einar Otto Stangvik */\n buffer[offset - 4] = this.maskKey[0]\n buffer[offset - 3] = this.maskKey[1]\n buffer[offset - 2] = this.maskKey[2]\n buffer[offset - 1] = this.maskKey[3]\n\n buffer[1] = payloadLength\n\n if (payloadLength === 126) {\n buffer.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n // Clear extended payload length\n buffer[2] = buffer[3] = 0\n buffer.writeUIntBE(bodyLength, 4, 6)\n }\n\n buffer[1] |= 0x80 // MASK\n\n // mask body\n for (let i = 0; i < bodyLength; i++) {\n buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]\n }\n\n return buffer\n }\n}\n\nmodule.exports = {\n WebsocketFrameSend\n}\n","'use strict'\n\nconst { Writable } = require('stream')\nconst diagnosticsChannel = require('diagnostics_channel')\nconst { parserStates, opcodes, states, emptyBuffer } = require('./constants')\nconst { kReadyState, kSentClose, kResponse, kReceivedClose } = require('./symbols')\nconst { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = require('./util')\nconst { WebsocketFrameSend } = require('./frame')\n\n// This code was influenced by ws released under the MIT license.\n// Copyright (c) 2011 Einar Otto Stangvik \n// Copyright (c) 2013 Arnout Kazemier and contributors\n// Copyright (c) 2016 Luigi Pinca and contributors\n\nconst channels = {}\nchannels.ping = diagnosticsChannel.channel('undici:websocket:ping')\nchannels.pong = diagnosticsChannel.channel('undici:websocket:pong')\n\nclass ByteParser extends Writable {\n #buffers = []\n #byteOffset = 0\n\n #state = parserStates.INFO\n\n #info = {}\n #fragments = []\n\n constructor (ws) {\n super()\n\n this.ws = ws\n }\n\n /**\n * @param {Buffer} chunk\n * @param {() => void} callback\n */\n _write (chunk, _, callback) {\n this.#buffers.push(chunk)\n this.#byteOffset += chunk.length\n\n this.run(callback)\n }\n\n /**\n * Runs whenever a new chunk is received.\n * Callback is called whenever there are no more chunks buffering,\n * or not enough bytes are buffered to parse.\n */\n run (callback) {\n while (true) {\n if (this.#state === parserStates.INFO) {\n // If there aren't enough bytes to parse the payload length, etc.\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.fin = (buffer[0] & 0x80) !== 0\n this.#info.opcode = buffer[0] & 0x0F\n\n // If we receive a fragmented message, we use the type of the first\n // frame to parse the full message as binary/text, when it's terminated\n this.#info.originalOpcode ??= this.#info.opcode\n\n this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION\n\n if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) {\n // Only text and binary frames can be fragmented\n failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.')\n return\n }\n\n const payloadLength = buffer[1] & 0x7F\n\n if (payloadLength <= 125) {\n this.#info.payloadLength = payloadLength\n this.#state = parserStates.READ_DATA\n } else if (payloadLength === 126) {\n this.#state = parserStates.PAYLOADLENGTH_16\n } else if (payloadLength === 127) {\n this.#state = parserStates.PAYLOADLENGTH_64\n }\n\n if (this.#info.fragmented && payloadLength > 125) {\n // A fragmented frame can't be fragmented itself\n failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.')\n return\n } else if (\n (this.#info.opcode === opcodes.PING ||\n this.#info.opcode === opcodes.PONG ||\n this.#info.opcode === opcodes.CLOSE) &&\n payloadLength > 125\n ) {\n // Control frames can have a payload length of 125 bytes MAX\n failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.')\n return\n } else if (this.#info.opcode === opcodes.CLOSE) {\n if (payloadLength === 1) {\n failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.')\n return\n }\n\n const body = this.consume(payloadLength)\n\n this.#info.closeInfo = this.parseCloseBody(false, body)\n\n if (!this.ws[kSentClose]) {\n // If an endpoint receives a Close frame and did not previously send a\n // Close frame, the endpoint MUST send a Close frame in response. (When\n // sending a Close frame in response, the endpoint typically echos the\n // status code it received.)\n const body = Buffer.allocUnsafe(2)\n body.writeUInt16BE(this.#info.closeInfo.code, 0)\n const closeFrame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(\n closeFrame.createFrame(opcodes.CLOSE),\n (err) => {\n if (!err) {\n this.ws[kSentClose] = true\n }\n }\n )\n }\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this.ws[kReadyState] = states.CLOSING\n this.ws[kReceivedClose] = true\n\n this.end()\n\n return\n } else if (this.#info.opcode === opcodes.PING) {\n // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in\n // response, unless it already received a Close frame.\n // A Pong frame sent in response to a Ping frame must have identical\n // \"Application data\"\n\n const body = this.consume(payloadLength)\n\n if (!this.ws[kReceivedClose]) {\n const frame = new WebsocketFrameSend(body)\n\n this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG))\n\n if (channels.ping.hasSubscribers) {\n channels.ping.publish({\n payload: body\n })\n }\n }\n\n this.#state = parserStates.INFO\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n return\n }\n } else if (this.#info.opcode === opcodes.PONG) {\n // A Pong frame MAY be sent unsolicited. This serves as a\n // unidirectional heartbeat. A response to an unsolicited Pong frame is\n // not expected.\n\n const body = this.consume(payloadLength)\n\n if (channels.pong.hasSubscribers) {\n channels.pong.publish({\n payload: body\n })\n }\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n return\n }\n }\n } else if (this.#state === parserStates.PAYLOADLENGTH_16) {\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.payloadLength = buffer.readUInt16BE(0)\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.PAYLOADLENGTH_64) {\n if (this.#byteOffset < 8) {\n return callback()\n }\n\n const buffer = this.consume(8)\n const upper = buffer.readUInt32BE(0)\n\n // 2^31 is the maxinimum bytes an arraybuffer can contain\n // on 32-bit systems. Although, on 64-bit systems, this is\n // 2^53-1 bytes.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e\n if (upper > 2 ** 31 - 1) {\n failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.')\n return\n }\n\n const lower = buffer.readUInt32BE(4)\n\n this.#info.payloadLength = (upper << 8) + lower\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.READ_DATA) {\n if (this.#byteOffset < this.#info.payloadLength) {\n // If there is still more data in this chunk that needs to be read\n return callback()\n } else if (this.#byteOffset >= this.#info.payloadLength) {\n // If the server sent multiple frames in a single chunk\n\n const body = this.consume(this.#info.payloadLength)\n\n this.#fragments.push(body)\n\n // If the frame is unfragmented, or a fragmented frame was terminated,\n // a message was received\n if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) {\n const fullMessage = Buffer.concat(this.#fragments)\n\n websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage)\n\n this.#info = {}\n this.#fragments.length = 0\n }\n\n this.#state = parserStates.INFO\n }\n }\n\n if (this.#byteOffset > 0) {\n continue\n } else {\n callback()\n break\n }\n }\n }\n\n /**\n * Take n bytes from the buffered Buffers\n * @param {number} n\n * @returns {Buffer|null}\n */\n consume (n) {\n if (n > this.#byteOffset) {\n return null\n } else if (n === 0) {\n return emptyBuffer\n }\n\n if (this.#buffers[0].length === n) {\n this.#byteOffset -= this.#buffers[0].length\n return this.#buffers.shift()\n }\n\n const buffer = Buffer.allocUnsafe(n)\n let offset = 0\n\n while (offset !== n) {\n const next = this.#buffers[0]\n const { length } = next\n\n if (length + offset === n) {\n buffer.set(this.#buffers.shift(), offset)\n break\n } else if (length + offset > n) {\n buffer.set(next.subarray(0, n - offset), offset)\n this.#buffers[0] = next.subarray(n - offset)\n break\n } else {\n buffer.set(this.#buffers.shift(), offset)\n offset += next.length\n }\n }\n\n this.#byteOffset -= n\n\n return buffer\n }\n\n parseCloseBody (onlyCode, data) {\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n /** @type {number|undefined} */\n let code\n\n if (data.length >= 2) {\n // _The WebSocket Connection Close Code_ is\n // defined as the status code (Section 7.4) contained in the first Close\n // control frame received by the application\n code = data.readUInt16BE(0)\n }\n\n if (onlyCode) {\n if (!isValidStatusCode(code)) {\n return null\n }\n\n return { code }\n }\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6\n /** @type {Buffer} */\n let reason = data.subarray(2)\n\n // Remove BOM\n if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) {\n reason = reason.subarray(3)\n }\n\n if (code !== undefined && !isValidStatusCode(code)) {\n return null\n }\n\n try {\n // TODO: optimize this\n reason = new TextDecoder('utf-8', { fatal: true }).decode(reason)\n } catch {\n return null\n }\n\n return { code, reason }\n }\n\n get closingInfo () {\n return this.#info.closeInfo\n }\n}\n\nmodule.exports = {\n ByteParser\n}\n","'use strict'\n\nmodule.exports = {\n kWebSocketURL: Symbol('url'),\n kReadyState: Symbol('ready state'),\n kController: Symbol('controller'),\n kResponse: Symbol('response'),\n kBinaryType: Symbol('binary type'),\n kSentClose: Symbol('sent close'),\n kReceivedClose: Symbol('received close'),\n kByteParser: Symbol('byte parser')\n}\n","'use strict'\n\nconst { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require('./symbols')\nconst { states, opcodes } = require('./constants')\nconst { MessageEvent, ErrorEvent } = require('./events')\n\n/* globals Blob */\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isEstablished (ws) {\n // If the server's response is validated as provided for above, it is\n // said that _The WebSocket Connection is Established_ and that the\n // WebSocket Connection is in the OPEN state.\n return ws[kReadyState] === states.OPEN\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isClosing (ws) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n return ws[kReadyState] === states.CLOSING\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n */\nfunction isClosed (ws) {\n return ws[kReadyState] === states.CLOSED\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e\n * @param {EventTarget} target\n * @param {EventInit | undefined} eventInitDict\n */\nfunction fireEvent (e, target, eventConstructor = Event, eventInitDict) {\n // 1. If eventConstructor is not given, then let eventConstructor be Event.\n\n // 2. Let event be the result of creating an event given eventConstructor,\n // in the relevant realm of target.\n // 3. Initialize event’s type attribute to e.\n const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap\n\n // 4. Initialize any other IDL attributes of event as described in the\n // invocation of this algorithm.\n\n // 5. Return the result of dispatching event at target, with legacy target\n // override flag set if set.\n target.dispatchEvent(event)\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @param {import('./websocket').WebSocket} ws\n * @param {number} type Opcode\n * @param {Buffer} data application data\n */\nfunction websocketMessageReceived (ws, type, data) {\n // 1. If ready state is not OPEN (1), then return.\n if (ws[kReadyState] !== states.OPEN) {\n return\n }\n\n // 2. Let dataForEvent be determined by switching on type and binary type:\n let dataForEvent\n\n if (type === opcodes.TEXT) {\n // -> type indicates that the data is Text\n // a new DOMString containing data\n try {\n dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data)\n } catch {\n failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n if (ws[kBinaryType] === 'blob') {\n // -> type indicates that the data is Binary and binary type is \"blob\"\n // a new Blob object, created in the relevant Realm of the WebSocket\n // object, that represents data as its raw data\n dataForEvent = new Blob([data])\n } else {\n // -> type indicates that the data is Binary and binary type is \"arraybuffer\"\n // a new ArrayBuffer object, created in the relevant Realm of the\n // WebSocket object, whose contents are data\n dataForEvent = new Uint8Array(data).buffer\n }\n }\n\n // 3. Fire an event named message at the WebSocket object, using MessageEvent,\n // with the origin attribute initialized to the serialization of the WebSocket\n // object’s url's origin, and the data attribute initialized to dataForEvent.\n fireEvent('message', ws, MessageEvent, {\n origin: ws[kWebSocketURL].origin,\n data: dataForEvent\n })\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455\n * @see https://datatracker.ietf.org/doc/html/rfc2616\n * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407\n * @param {string} protocol\n */\nfunction isValidSubprotocol (protocol) {\n // If present, this value indicates one\n // or more comma-separated subprotocol the client wishes to speak,\n // ordered by preference. The elements that comprise this value\n // MUST be non-empty strings with characters in the range U+0021 to\n // U+007E not including separator characters as defined in\n // [RFC2616] and MUST all be unique strings.\n if (protocol.length === 0) {\n return false\n }\n\n for (const char of protocol) {\n const code = char.charCodeAt(0)\n\n if (\n code < 0x21 ||\n code > 0x7E ||\n char === '(' ||\n char === ')' ||\n char === '<' ||\n char === '>' ||\n char === '@' ||\n char === ',' ||\n char === ';' ||\n char === ':' ||\n char === '\\\\' ||\n char === '\"' ||\n char === '/' ||\n char === '[' ||\n char === ']' ||\n char === '?' ||\n char === '=' ||\n char === '{' ||\n char === '}' ||\n code === 32 || // SP\n code === 9 // HT\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4\n * @param {number} code\n */\nfunction isValidStatusCode (code) {\n if (code >= 1000 && code < 1015) {\n return (\n code !== 1004 && // reserved\n code !== 1005 && // \"MUST NOT be set as a status code\"\n code !== 1006 // \"MUST NOT be set as a status code\"\n )\n }\n\n return code >= 3000 && code <= 4999\n}\n\n/**\n * @param {import('./websocket').WebSocket} ws\n * @param {string|undefined} reason\n */\nfunction failWebsocketConnection (ws, reason) {\n const { [kController]: controller, [kResponse]: response } = ws\n\n controller.abort()\n\n if (response?.socket && !response.socket.destroyed) {\n response.socket.destroy()\n }\n\n if (reason) {\n fireEvent('error', ws, ErrorEvent, {\n error: new Error(reason)\n })\n }\n}\n\nmodule.exports = {\n isEstablished,\n isClosing,\n isClosed,\n fireEvent,\n isValidSubprotocol,\n isValidStatusCode,\n failWebsocketConnection,\n websocketMessageReceived\n}\n","'use strict'\n\nconst { webidl } = require('../fetch/webidl')\nconst { DOMException } = require('../fetch/constants')\nconst { URLSerializer } = require('../fetch/dataURL')\nconst { getGlobalOrigin } = require('../fetch/global')\nconst { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require('./constants')\nconst {\n kWebSocketURL,\n kReadyState,\n kController,\n kBinaryType,\n kResponse,\n kSentClose,\n kByteParser\n} = require('./symbols')\nconst { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require('./util')\nconst { establishWebSocketConnection } = require('./connection')\nconst { WebsocketFrameSend } = require('./frame')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty, isBlobLike } = require('../core/util')\nconst { getGlobalDispatcher } = require('../global')\nconst { types } = require('util')\n\nlet experimentalWarned = false\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' })\n\n if (!experimentalWarned) {\n experimentalWarned = true\n process.emitWarning('WebSockets are experimental, expect them to change at any time.', {\n code: 'UNDICI-WS'\n })\n }\n\n const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols)\n\n url = webidl.converters.USVString(url)\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = getGlobalOrigin()\n\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL.\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n // 3. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 4. If urlRecord’s scheme is \"http\", then set urlRecord’s scheme to \"ws\".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n // 5. Otherwise, if urlRecord’s scheme is \"https\", set urlRecord’s scheme to \"wss\".\n urlRecord.protocol = 'wss:'\n }\n\n // 6. If urlRecord’s scheme is not \"ws\" or \"wss\", then throw a \"SyntaxError\" DOMException.\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException(\n `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`,\n 'SyntaxError'\n )\n }\n\n // 7. If urlRecord’s fragment is non-null, then throw a \"SyntaxError\"\n // DOMException.\n if (urlRecord.hash || urlRecord.href.endsWith('#')) {\n throw new DOMException('Got fragment', 'SyntaxError')\n }\n\n // 8. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 9. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 10. Set this's url to urlRecord.\n this[kWebSocketURL] = new URL(urlRecord.href)\n\n // 11. Let client be this's relevant settings object.\n\n // 12. Run this step in parallel:\n\n // 1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this[kController] = establishWebSocketConnection(\n urlRecord,\n protocols,\n this,\n (response) => this.#onConnectionEstablished(response),\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this[kReadyState] = WebSocket.CONNECTING\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this[kBinaryType] = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, { clamp: true })\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason)\n }\n\n // 1. If code is present, but is neither an integer equal to 1000 nor an\n // integer in the range 3000 to 4999, inclusive, throw an\n // \"InvalidAccessError\" DOMException.\n if (code !== undefined) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n let reasonByteLength = 0\n\n // 2. If reason is present, then run these substeps:\n if (reason !== undefined) {\n // 1. Let reasonBytes be the result of encoding reason.\n // 2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n reasonByteLength = Buffer.byteLength(reason)\n\n if (reasonByteLength > 123) {\n throw new DOMException(\n `Reason must be less than 123 bytes; received ${reasonByteLength}`,\n 'SyntaxError'\n )\n }\n }\n\n // 3. Run the first matching steps from the following list:\n if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) {\n // If this's ready state is CLOSING (2) or CLOSED (3)\n // Do nothing.\n } else if (!isEstablished(this)) {\n // If the WebSocket connection is not yet established\n // Fail the WebSocket connection and set this's ready state\n // to CLOSING (2).\n failWebsocketConnection(this, 'Connection was closed before it was established.')\n this[kReadyState] = WebSocket.CLOSING\n } else if (!isClosing(this)) {\n // If the WebSocket closing handshake has not yet been started\n // Start the WebSocket closing handshake and set this's ready\n // state to CLOSING (2).\n // - If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n // - If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n // - If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n\n const frame = new WebsocketFrameSend()\n\n // If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n\n // If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n if (code !== undefined && reason === undefined) {\n frame.frameData = Buffer.allocUnsafe(2)\n frame.frameData.writeUInt16BE(code, 0)\n } else if (code !== undefined && reason !== undefined) {\n // If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength)\n frame.frameData.writeUInt16BE(code, 0)\n // the body MAY contain UTF-8-encoded data with value /reason/\n frame.frameData.write(reason, 2, 'utf-8')\n } else {\n frame.frameData = emptyBuffer\n }\n\n /** @type {import('stream').Duplex} */\n const socket = this[kResponse].socket\n\n socket.write(frame.createFrame(opcodes.CLOSE), (err) => {\n if (!err) {\n this[kSentClose] = true\n }\n })\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this[kReadyState] = states.CLOSING\n } else {\n // Otherwise\n // Set this's ready state to CLOSING (2).\n this[kReadyState] = WebSocket.CLOSING\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' })\n\n data = webidl.converters.WebSocketSendData(data)\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (this[kReadyState] === WebSocket.CONNECTING) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this) || isClosing(this)) {\n return\n }\n\n /** @type {import('stream').Duplex} */\n const socket = this[kResponse].socket\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const value = Buffer.from(data)\n const frame = new WebsocketFrameSend(value)\n const buffer = frame.createFrame(opcodes.TEXT)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n } else if (types.isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n const value = Buffer.from(data)\n const frame = new WebsocketFrameSend(value)\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data’s buffer in bytes.\n\n const ab = Buffer.from(data, data.byteOffset, data.byteLength)\n\n const frame = new WebsocketFrameSend(ab)\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += ab.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= ab.byteLength\n })\n } else if (isBlobLike(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object’s raw data, in bytes.\n\n const frame = new WebsocketFrameSend()\n\n data.arrayBuffer().then((ab) => {\n const value = Buffer.from(ab)\n frame.frameData = value\n const buffer = frame.createFrame(opcodes.BINARY)\n\n this.#bufferedAmount += value.byteLength\n socket.write(buffer, () => {\n this.#bufferedAmount -= value.byteLength\n })\n })\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this[kReadyState]\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this[kWebSocketURL])\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n if (typeof fn === 'function') {\n this.#events.open = fn\n this.addEventListener('open', fn)\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n if (typeof fn === 'function') {\n this.#events.error = fn\n this.addEventListener('error', fn)\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n if (typeof fn === 'function') {\n this.#events.close = fn\n this.addEventListener('close', fn)\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n if (typeof fn === 'function') {\n this.#events.message = fn\n this.addEventListener('message', fn)\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this[kBinaryType]\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this[kBinaryType] = 'blob'\n } else {\n this[kBinaryType] = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response) {\n // processResponse is called when the \"response’s header list has been received and initialized.\"\n // once this happens, the connection is open\n this[kResponse] = response\n\n const parser = new ByteParser(this)\n parser.on('drain', function onParserDrain () {\n this.ws[kResponse].socket.resume()\n })\n\n response.socket.ws = this\n this[kByteParser] = parser\n\n // 1. Change the ready state to OPEN (1).\n this[kReadyState] = states.OPEN\n\n // 2. Change the extensions attribute’s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute’s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n }\n}\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) {\n return webidl.converters['sequence'](V)\n }\n\n return webidl.converters.DOMString(V)\n}\n\n// This implements the propsal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence'],\n get defaultValue () {\n return []\n }\n },\n {\n key: 'dispatcher',\n converter: (V) => V,\n get defaultValue () {\n return getGlobalDispatcher()\n }\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === 'Object') {\n if (isBlobLike(V)) {\n return webidl.converters.Blob(V, { strict: false })\n }\n\n if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) {\n return webidl.converters.BufferSource(V)\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nmodule.exports = {\n WebSocket\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n\n if (typeof process === \"object\" && process.version !== undefined) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n\n return \"\";\n}\n\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","\"use strict\";\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n return Math.floor(x);\n } else {\n return Math.round(x);\n }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n if (!typeOpts.unsigned) {\n --bitLength;\n }\n const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n const upperBound = Math.pow(2, bitLength) - 1;\n\n const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n return function(V, opts) {\n if (!opts) opts = {};\n\n let x = +V;\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite number\");\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n if (x < lowerBound || x > upperBound) {\n throw new TypeError(\"Argument is not in byte range\");\n }\n\n return x;\n }\n\n if (!isNaN(x) && opts.clamp) {\n x = evenRound(x);\n\n if (x < lowerBound) x = lowerBound;\n if (x > upperBound) x = upperBound;\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n x = x % moduloVal;\n\n if (!typeOpts.unsigned && x >= moduloBound) {\n return x - moduloVal;\n } else if (typeOpts.unsigned) {\n if (x < 0) {\n x += moduloVal;\n } else if (x === -0) { // don't return negative zero\n return 0;\n }\n }\n\n return x;\n }\n}\n\nconversions[\"void\"] = function () {\n return undefined;\n};\n\nconversions[\"boolean\"] = function (val) {\n return !!val;\n};\n\nconversions[\"byte\"] = createNumberConversion(8, { unsigned: false });\nconversions[\"octet\"] = createNumberConversion(8, { unsigned: true });\n\nconversions[\"short\"] = createNumberConversion(16, { unsigned: false });\nconversions[\"unsigned short\"] = createNumberConversion(16, { unsigned: true });\n\nconversions[\"long\"] = createNumberConversion(32, { unsigned: false });\nconversions[\"unsigned long\"] = createNumberConversion(32, { unsigned: true });\n\nconversions[\"long long\"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions[\"unsigned long long\"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions[\"double\"] = function (V) {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite floating-point value\");\n }\n\n return x;\n};\n\nconversions[\"unrestricted double\"] = function (V) {\n const x = +V;\n\n if (isNaN(x)) {\n throw new TypeError(\"Argument is NaN\");\n }\n\n return x;\n};\n\n// not quite valid, but good enough for JS\nconversions[\"float\"] = conversions[\"double\"];\nconversions[\"unrestricted float\"] = conversions[\"unrestricted double\"];\n\nconversions[\"DOMString\"] = function (V, opts) {\n if (!opts) opts = {};\n\n if (opts.treatNullAsEmptyString && V === null) {\n return \"\";\n }\n\n return String(V);\n};\n\nconversions[\"ByteString\"] = function (V, opts) {\n const x = String(V);\n let c = undefined;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError(\"Argument is not a valid bytestring\");\n }\n }\n\n return x;\n};\n\nconversions[\"USVString\"] = function (V) {\n const S = String(V);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n }\n\n return U.join('');\n};\n\nconversions[\"Date\"] = function (V, opts) {\n if (!(V instanceof Date)) {\n throw new TypeError(\"Argument is not a Date object\");\n }\n if (isNaN(V)) {\n return undefined;\n }\n\n return V;\n};\n\nconversions[\"RegExp\"] = function (V, opts) {\n if (!(V instanceof RegExp)) {\n V = new RegExp(V);\n }\n\n return V;\n};\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\n\nexports.implementation = class URLImpl {\n constructor(constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === \"failure\") {\n throw new TypeError(\"Invalid base URL\");\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n\n // TODO: query stuff\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return this._url.scheme + \":\";\n }\n\n set protocol(v) {\n usm.basicURLParse(v + \":\", { url: this._url, stateOverride: \"scheme start\" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return \"\";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return usm.serializeHost(url.host) + \":\" + usm.serializeInteger(url.port);\n }\n\n set host(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return \"\";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n }\n\n get port() {\n if (this._url.port === null) {\n return \"\";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === \"\") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n }\n }\n\n get pathname() {\n if (this._url.cannotBeABaseURL) {\n return this._url.path[0];\n }\n\n if (this._url.path.length === 0) {\n return \"\";\n }\n\n return \"/\" + this._url.path.join(\"/\");\n }\n\n set pathname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === \"\") {\n return \"\";\n }\n\n return \"?\" + this._url.query;\n }\n\n set search(v) {\n // TODO: query stuff\n\n const url = this._url;\n\n if (v === \"\") {\n url.query = null;\n return;\n }\n\n const input = v[0] === \"?\" ? v.substring(1) : v;\n url.query = \"\";\n usm.basicURLParse(input, { url, stateOverride: \"query\" });\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === \"\") {\n return \"\";\n }\n\n return \"#\" + this._url.fragment;\n }\n\n set hash(v) {\n if (v === \"\") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === \"#\" ? v.substring(1) : v;\n this._url.fragment = \"\";\n usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\nconst Impl = require(\".//URL-impl.js\");\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n if (!this || this[impl] || !(this instanceof URL)) {\n throw new TypeError(\"Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.\");\n }\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'URL': 1 argument required, but only \" + arguments.length + \" present.\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 2; ++i) {\n args[i] = arguments[i];\n }\n args[0] = conversions[\"USVString\"](args[0]);\n if (args[1] !== undefined) {\n args[1] = conversions[\"USVString\"](args[1]);\n }\n\n module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 0; ++i) {\n args[i] = arguments[i];\n }\n return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, \"href\", {\n get() {\n return this[impl].href;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].href = V;\n },\n enumerable: true,\n configurable: true\n});\n\nURL.prototype.toString = function () {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n return this.href;\n};\n\nObject.defineProperty(URL.prototype, \"origin\", {\n get() {\n return this[impl].origin;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"protocol\", {\n get() {\n return this[impl].protocol;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].protocol = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"username\", {\n get() {\n return this[impl].username;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].username = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"password\", {\n get() {\n return this[impl].password;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].password = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"host\", {\n get() {\n return this[impl].host;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].host = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hostname\", {\n get() {\n return this[impl].hostname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hostname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"port\", {\n get() {\n return this[impl].port;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].port = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"pathname\", {\n get() {\n return this[impl].pathname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].pathname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"search\", {\n get() {\n return this[impl].search;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].search = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hash\", {\n get() {\n return this[impl].hash;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hash = V;\n },\n enumerable: true,\n configurable: true\n});\n\n\nmodule.exports = {\n is(obj) {\n return !!obj && obj[impl] instanceof Impl.implementation;\n },\n create(constructorArgs, privateData) {\n let obj = Object.create(URL.prototype);\n this.setup(obj, constructorArgs, privateData);\n return obj;\n },\n setup(obj, constructorArgs, privateData) {\n if (!privateData) privateData = {};\n privateData.wrapper = obj;\n\n obj[impl] = new Impl.implementation(constructorArgs, privateData);\n obj[impl][utils.wrapperSymbol] = obj;\n },\n interface: URL,\n expose: {\n Window: { URL: URL },\n Worker: { URL: URL }\n }\n};\n\n","\"use strict\";\n\nexports.URL = require(\"./URL\").interface;\nexports.serializeURL = require(\"./url-state-machine\").serializeURL;\nexports.serializeURLOrigin = require(\"./url-state-machine\").serializeURLOrigin;\nexports.basicURLParse = require(\"./url-state-machine\").basicURLParse;\nexports.setTheUsername = require(\"./url-state-machine\").setTheUsername;\nexports.setThePassword = require(\"./url-state-machine\").setThePassword;\nexports.serializeHost = require(\"./url-state-machine\").serializeHost;\nexports.serializeInteger = require(\"./url-state-machine\").serializeInteger;\nexports.parseURL = require(\"./url-state-machine\").parseURL;\n","\"use strict\";\r\nconst punycode = require(\"punycode\");\r\nconst tr46 = require(\"tr46\");\r\n\r\nconst specialSchemes = {\r\n ftp: 21,\r\n file: null,\r\n gopher: 70,\r\n http: 80,\r\n https: 443,\r\n ws: 80,\r\n wss: 443\r\n};\r\n\r\nconst failure = Symbol(\"failure\");\r\n\r\nfunction countSymbols(str) {\r\n return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n const c = input[idx];\r\n return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n buffer = buffer.toLowerCase();\r\n return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n let hex = c.toString(16).toUpperCase();\r\n if (hex.length === 1) {\r\n hex = \"0\" + hex;\r\n }\r\n\r\n return \"%\" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n const buf = new Buffer(c);\r\n\r\n let str = \"\";\r\n\r\n for (let i = 0; i < buf.length; ++i) {\r\n str += percentEncode(buf[i]);\r\n }\r\n\r\n return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n const input = new Buffer(str);\r\n const output = [];\r\n for (let i = 0; i < input.length; ++i) {\r\n if (input[i] !== 37) {\r\n output.push(input[i]);\r\n } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n i += 2;\r\n } else {\r\n output.push(input[i]);\r\n }\r\n }\r\n return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n const cStr = String.fromCodePoint(c);\r\n\r\n if (encodeSetPredicate(c)) {\r\n return utf8PercentEncode(cStr);\r\n }\r\n\r\n return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n let R = 10;\r\n\r\n if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\r\n input = input.substring(2);\r\n R = 16;\r\n } else if (input.length >= 2 && input.charAt(0) === \"0\") {\r\n input = input.substring(1);\r\n R = 8;\r\n }\r\n\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n\r\n const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n if (regex.test(input)) {\r\n return failure;\r\n }\r\n\r\n return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n const parts = input.split(\".\");\r\n if (parts[parts.length - 1] === \"\") {\r\n if (parts.length > 1) {\r\n parts.pop();\r\n }\r\n }\r\n\r\n if (parts.length > 4) {\r\n return input;\r\n }\r\n\r\n const numbers = [];\r\n for (const part of parts) {\r\n if (part === \"\") {\r\n return input;\r\n }\r\n const n = parseIPv4Number(part);\r\n if (n === failure) {\r\n return input;\r\n }\r\n\r\n numbers.push(n);\r\n }\r\n\r\n for (let i = 0; i < numbers.length - 1; ++i) {\r\n if (numbers[i] > 255) {\r\n return failure;\r\n }\r\n }\r\n if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n return failure;\r\n }\r\n\r\n let ipv4 = numbers.pop();\r\n let counter = 0;\r\n\r\n for (const n of numbers) {\r\n ipv4 += n * Math.pow(256, 3 - counter);\r\n ++counter;\r\n }\r\n\r\n return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n let output = \"\";\r\n let n = address;\r\n\r\n for (let i = 1; i <= 4; ++i) {\r\n output = String(n % 256) + output;\r\n if (i !== 4) {\r\n output = \".\" + output;\r\n }\r\n n = Math.floor(n / 256);\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n let pieceIndex = 0;\r\n let compress = null;\r\n let pointer = 0;\r\n\r\n input = punycode.ucs2.decode(input);\r\n\r\n if (input[pointer] === 58) {\r\n if (input[pointer + 1] !== 58) {\r\n return failure;\r\n }\r\n\r\n pointer += 2;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n }\r\n\r\n while (pointer < input.length) {\r\n if (pieceIndex === 8) {\r\n return failure;\r\n }\r\n\r\n if (input[pointer] === 58) {\r\n if (compress !== null) {\r\n return failure;\r\n }\r\n ++pointer;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n continue;\r\n }\r\n\r\n let value = 0;\r\n let length = 0;\r\n\r\n while (length < 4 && isASCIIHex(input[pointer])) {\r\n value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n ++pointer;\r\n ++length;\r\n }\r\n\r\n if (input[pointer] === 46) {\r\n if (length === 0) {\r\n return failure;\r\n }\r\n\r\n pointer -= length;\r\n\r\n if (pieceIndex > 6) {\r\n return failure;\r\n }\r\n\r\n let numbersSeen = 0;\r\n\r\n while (input[pointer] !== undefined) {\r\n let ipv4Piece = null;\r\n\r\n if (numbersSeen > 0) {\r\n if (input[pointer] === 46 && numbersSeen < 4) {\r\n ++pointer;\r\n } else {\r\n return failure;\r\n }\r\n }\r\n\r\n if (!isASCIIDigit(input[pointer])) {\r\n return failure;\r\n }\r\n\r\n while (isASCIIDigit(input[pointer])) {\r\n const number = parseInt(at(input, pointer));\r\n if (ipv4Piece === null) {\r\n ipv4Piece = number;\r\n } else if (ipv4Piece === 0) {\r\n return failure;\r\n } else {\r\n ipv4Piece = ipv4Piece * 10 + number;\r\n }\r\n if (ipv4Piece > 255) {\r\n return failure;\r\n }\r\n ++pointer;\r\n }\r\n\r\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n ++numbersSeen;\r\n\r\n if (numbersSeen === 2 || numbersSeen === 4) {\r\n ++pieceIndex;\r\n }\r\n }\r\n\r\n if (numbersSeen !== 4) {\r\n return failure;\r\n }\r\n\r\n break;\r\n } else if (input[pointer] === 58) {\r\n ++pointer;\r\n if (input[pointer] === undefined) {\r\n return failure;\r\n }\r\n } else if (input[pointer] !== undefined) {\r\n return failure;\r\n }\r\n\r\n address[pieceIndex] = value;\r\n ++pieceIndex;\r\n }\r\n\r\n if (compress !== null) {\r\n let swaps = pieceIndex - compress;\r\n pieceIndex = 7;\r\n while (pieceIndex !== 0 && swaps > 0) {\r\n const temp = address[compress + swaps - 1];\r\n address[compress + swaps - 1] = address[pieceIndex];\r\n address[pieceIndex] = temp;\r\n --pieceIndex;\r\n --swaps;\r\n }\r\n } else if (compress === null && pieceIndex !== 8) {\r\n return failure;\r\n }\r\n\r\n return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n let output = \"\";\r\n const seqResult = findLongestZeroSequence(address);\r\n const compress = seqResult.idx;\r\n let ignore0 = false;\r\n\r\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n if (ignore0 && address[pieceIndex] === 0) {\r\n continue;\r\n } else if (ignore0) {\r\n ignore0 = false;\r\n }\r\n\r\n if (compress === pieceIndex) {\r\n const separator = pieceIndex === 0 ? \"::\" : \":\";\r\n output += separator;\r\n ignore0 = true;\r\n continue;\r\n }\r\n\r\n output += address[pieceIndex].toString(16);\r\n\r\n if (pieceIndex !== 7) {\r\n output += \":\";\r\n }\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n if (input[0] === \"[\") {\r\n if (input[input.length - 1] !== \"]\") {\r\n return failure;\r\n }\r\n\r\n return parseIPv6(input.substring(1, input.length - 1));\r\n }\r\n\r\n if (!isSpecialArg) {\r\n return parseOpaqueHost(input);\r\n }\r\n\r\n const domain = utf8PercentDecode(input);\r\n const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n if (asciiDomain === null) {\r\n return failure;\r\n }\r\n\r\n if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n return failure;\r\n }\r\n\r\n const ipv4Host = parseIPv4(asciiDomain);\r\n if (typeof ipv4Host === \"number\" || ipv4Host === failure) {\r\n return ipv4Host;\r\n }\r\n\r\n return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n return failure;\r\n }\r\n\r\n let output = \"\";\r\n const decoded = punycode.ucs2.decode(input);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n }\r\n return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n let maxIdx = null;\r\n let maxLen = 1; // only find elements > 1\r\n let currStart = null;\r\n let currLen = 0;\r\n\r\n for (let i = 0; i < arr.length; ++i) {\r\n if (arr[i] !== 0) {\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n currStart = null;\r\n currLen = 0;\r\n } else {\r\n if (currStart === null) {\r\n currStart = i;\r\n }\r\n ++currLen;\r\n }\r\n }\r\n\r\n // if trailing zeros\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n return {\r\n idx: maxIdx,\r\n len: maxLen\r\n };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n if (typeof host === \"number\") {\r\n return serializeIPv4(host);\r\n }\r\n\r\n // IPv6 serializer\r\n if (host instanceof Array) {\r\n return \"[\" + serializeIPv6(host) + \"]\";\r\n }\r\n\r\n return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, \"\");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n return url.replace(/\\u0009|\\u000A|\\u000D/g, \"\");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n const path = url.path;\r\n if (path.length === 0) {\r\n return;\r\n }\r\n if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n return;\r\n }\r\n\r\n path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n return url.username !== \"\" || url.password !== \"\";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n return url.host === null || url.host === \"\" || url.cannotBeABaseURL || url.scheme === \"file\";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n this.pointer = 0;\r\n this.input = input;\r\n this.base = base || null;\r\n this.encodingOverride = encodingOverride || \"utf-8\";\r\n this.stateOverride = stateOverride;\r\n this.url = url;\r\n this.failure = false;\r\n this.parseError = false;\r\n\r\n if (!this.url) {\r\n this.url = {\r\n scheme: \"\",\r\n username: \"\",\r\n password: \"\",\r\n host: null,\r\n port: null,\r\n path: [],\r\n query: null,\r\n fragment: null,\r\n\r\n cannotBeABaseURL: false\r\n };\r\n\r\n const res = trimControlChars(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n }\r\n\r\n const res = trimTabAndNewline(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n\r\n this.state = stateOverride || \"scheme start\";\r\n\r\n this.buffer = \"\";\r\n this.atFlag = false;\r\n this.arrFlag = false;\r\n this.passwordTokenSeenFlag = false;\r\n\r\n this.input = punycode.ucs2.decode(this.input);\r\n\r\n for (; this.pointer <= this.input.length; ++this.pointer) {\r\n const c = this.input[this.pointer];\r\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n // exec state machine\r\n const ret = this[\"parse \" + this.state](c, cStr);\r\n if (!ret) {\r\n break; // terminate algorithm\r\n } else if (ret === failure) {\r\n this.failure = true;\r\n break;\r\n }\r\n }\r\n}\r\n\r\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\r\n if (isASCIIAlpha(c)) {\r\n this.buffer += cStr.toLowerCase();\r\n this.state = \"scheme\";\r\n } else if (!this.stateOverride) {\r\n this.state = \"no scheme\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\r\n if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n this.buffer += cStr.toLowerCase();\r\n } else if (c === 58) {\r\n if (this.stateOverride) {\r\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\r\n return false;\r\n }\r\n\r\n if (this.url.scheme === \"file\" && (this.url.host === \"\" || this.url.host === null)) {\r\n return false;\r\n }\r\n }\r\n this.url.scheme = this.buffer;\r\n this.buffer = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n if (this.url.scheme === \"file\") {\r\n if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file\";\r\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n this.state = \"special relative or authority\";\r\n } else if (isSpecial(this.url)) {\r\n this.state = \"special authority slashes\";\r\n } else if (this.input[this.pointer + 1] === 47) {\r\n this.state = \"path or authority\";\r\n ++this.pointer;\r\n } else {\r\n this.url.cannotBeABaseURL = true;\r\n this.url.path.push(\"\");\r\n this.state = \"cannot-be-a-base-URL path\";\r\n }\r\n } else if (!this.stateOverride) {\r\n this.buffer = \"\";\r\n this.state = \"no scheme\";\r\n this.pointer = -1;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\r\n if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n return failure;\r\n } else if (this.base.cannotBeABaseURL && c === 35) {\r\n this.url.scheme = this.base.scheme;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.url.cannotBeABaseURL = true;\r\n this.state = \"fragment\";\r\n } else if (this.base.scheme === \"file\") {\r\n this.state = \"file\";\r\n --this.pointer;\r\n } else {\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\r\n if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\r\n this.url.scheme = this.base.scheme;\r\n if (isNaN(c)) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 47) {\r\n this.state = \"relative slash\";\r\n } else if (c === 63) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n this.state = \"relative slash\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\r\n if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"special authority ignore slashes\";\r\n } else if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"special authority ignore slashes\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n if (c !== 47 && c !== 92) {\r\n this.state = \"authority\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\r\n if (c === 64) {\r\n this.parseError = true;\r\n if (this.atFlag) {\r\n this.buffer = \"%40\" + this.buffer;\r\n }\r\n this.atFlag = true;\r\n\r\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n const len = countSymbols(this.buffer);\r\n for (let pointer = 0; pointer < len; ++pointer) {\r\n const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n this.passwordTokenSeenFlag = true;\r\n continue;\r\n }\r\n const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n if (this.passwordTokenSeenFlag) {\r\n this.url.password += encodedCodePoints;\r\n } else {\r\n this.url.username += encodedCodePoints;\r\n }\r\n }\r\n this.buffer = \"\";\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n if (this.atFlag && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.pointer -= countSymbols(this.buffer) + 1;\r\n this.buffer = \"\";\r\n this.state = \"host\";\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse hostname\"] =\r\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\r\n if (this.stateOverride && this.url.scheme === \"file\") {\r\n --this.pointer;\r\n this.state = \"file host\";\r\n } else if (c === 58 && !this.arrFlag) {\r\n if (this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"port\";\r\n if (this.stateOverride === \"hostname\") {\r\n return false;\r\n }\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n --this.pointer;\r\n if (isSpecial(this.url) && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n } else if (this.stateOverride && this.buffer === \"\" &&\r\n (includesCredentials(this.url) || this.url.port !== null)) {\r\n this.parseError = true;\r\n return false;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n } else {\r\n if (c === 91) {\r\n this.arrFlag = true;\r\n } else if (c === 93) {\r\n this.arrFlag = false;\r\n }\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\r\n if (isASCIIDigit(c)) {\r\n this.buffer += cStr;\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92) ||\r\n this.stateOverride) {\r\n if (this.buffer !== \"\") {\r\n const port = parseInt(this.buffer);\r\n if (port > Math.pow(2, 16) - 1) {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n this.buffer = \"\";\r\n }\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\r\n this.url.scheme = \"file\";\r\n\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file slash\";\r\n } else if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNaN(c)) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 63) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n shortenPath(this.url);\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file host\";\r\n } else {\r\n if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n this.url.path.push(this.base.path[0]);\r\n } else {\r\n this.url.host = this.base.host;\r\n }\r\n }\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\r\n if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n --this.pointer;\r\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n this.parseError = true;\r\n this.state = \"path\";\r\n } else if (this.buffer === \"\") {\r\n this.url.host = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n } else {\r\n let host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n if (host === \"localhost\") {\r\n host = \"\";\r\n }\r\n this.url.host = host;\r\n\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n }\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\r\n if (isSpecial(this.url)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"path\";\r\n\r\n if (c !== 47 && c !== 92) {\r\n --this.pointer;\r\n }\r\n } else if (!this.stateOverride && c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (!this.stateOverride && c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (c !== undefined) {\r\n this.state = \"path\";\r\n if (c !== 47) {\r\n --this.pointer;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\r\n if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n (!this.stateOverride && (c === 63 || c === 35))) {\r\n if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n }\r\n\r\n if (isDoubleDot(this.buffer)) {\r\n shortenPath(this.url);\r\n if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n }\r\n } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n } else if (!isSingleDot(this.buffer)) {\r\n if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n if (this.url.host !== \"\" && this.url.host !== null) {\r\n this.parseError = true;\r\n this.url.host = \"\";\r\n }\r\n this.buffer = this.buffer[0] + \":\";\r\n }\r\n this.url.path.push(this.buffer);\r\n }\r\n this.buffer = \"\";\r\n if (this.url.scheme === \"file\" && (c === undefined || c === 63 || c === 35)) {\r\n while (this.url.path.length > 1 && this.url.path[0] === \"\") {\r\n this.parseError = true;\r\n this.url.path.shift();\r\n }\r\n }\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n }\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse cannot-be-a-base-URL path\"] = function parseCannotBeABaseURLPath(c) {\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n // TODO: Add: not a URL code point\r\n if (!isNaN(c) && c !== 37) {\r\n this.parseError = true;\r\n }\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n if (!isNaN(c)) {\r\n this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\r\n if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\r\n this.encodingOverride = \"utf-8\";\r\n }\r\n\r\n const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n for (let i = 0; i < buffer.length; ++i) {\r\n if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n this.url.query += percentEncode(buffer[i]);\r\n } else {\r\n this.url.query += String.fromCodePoint(buffer[i]);\r\n }\r\n }\r\n\r\n this.buffer = \"\";\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\r\n if (isNaN(c)) { // do nothing\r\n } else if (c === 0x0) {\r\n this.parseError = true;\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n let output = url.scheme + \":\";\r\n if (url.host !== null) {\r\n output += \"//\";\r\n\r\n if (url.username !== \"\" || url.password !== \"\") {\r\n output += url.username;\r\n if (url.password !== \"\") {\r\n output += \":\" + url.password;\r\n }\r\n output += \"@\";\r\n }\r\n\r\n output += serializeHost(url.host);\r\n\r\n if (url.port !== null) {\r\n output += \":\" + url.port;\r\n }\r\n } else if (url.host === null && url.scheme === \"file\") {\r\n output += \"//\";\r\n }\r\n\r\n if (url.cannotBeABaseURL) {\r\n output += url.path[0];\r\n } else {\r\n for (const string of url.path) {\r\n output += \"/\" + string;\r\n }\r\n }\r\n\r\n if (url.query !== null) {\r\n output += \"?\" + url.query;\r\n }\r\n\r\n if (!excludeFragment && url.fragment !== null) {\r\n output += \"#\" + url.fragment;\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n let result = tuple.scheme + \"://\";\r\n result += serializeHost(tuple.host);\r\n\r\n if (tuple.port !== null) {\r\n result += \":\" + tuple.port;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n // https://url.spec.whatwg.org/#concept-url-origin\r\n switch (url.scheme) {\r\n case \"blob\":\r\n try {\r\n return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n } catch (e) {\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n case \"ftp\":\r\n case \"gopher\":\r\n case \"http\":\r\n case \"https\":\r\n case \"ws\":\r\n case \"wss\":\r\n return serializeOrigin({\r\n scheme: url.scheme,\r\n host: url.host,\r\n port: url.port\r\n });\r\n case \"file\":\r\n // spec says \"exercise to the reader\", chrome says \"file://\"\r\n return \"file://\";\r\n default:\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n if (usm.failure) {\r\n return \"failure\";\r\n }\r\n\r\n return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n url.username = \"\";\r\n const decoded = punycode.ucs2.decode(username);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n url.password = \"\";\r\n const decoded = punycode.ucs2.decode(password);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // We don't handle blobs, so this just delegates:\r\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n","\"use strict\";\n\nmodule.exports.mixin = function mixin(target, source) {\n const keys = Object.getOwnPropertyNames(source);\n for (let i = 0; i < keys.length; ++i) {\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nmodule.exports.wrapperSymbol = Symbol(\"wrapper\");\nmodule.exports.implSymbol = Symbol(\"impl\");\n\nmodule.exports.wrapperForImpl = function (impl) {\n return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n return wrapper[module.exports.implSymbol];\n};\n\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n","module.exports = require(\"assert\");","module.exports = require(\"async_hooks\");","module.exports = require(\"buffer\");","module.exports = require(\"child_process\");","module.exports = require(\"console\");","module.exports = require(\"crypto\");","module.exports = require(\"diagnostics_channel\");","module.exports = require(\"dns\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"http2\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"node:events\");","module.exports = require(\"node:stream\");","module.exports = require(\"node:util\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"perf_hooks\");","module.exports = require(\"punycode\");","module.exports = require(\"querystring\");","module.exports = require(\"stream\");","module.exports = require(\"stream/web\");","module.exports = require(\"string_decoder\");","module.exports = require(\"tls\");","module.exports = require(\"tty\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"util/types\");","module.exports = require(\"worker_threads\");","module.exports = require(\"zlib\");","'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst inherits = require('node:util').inherits\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst PartStream = require('./PartStream')\nconst HeaderParser = require('./HeaderParser')\n\nconst DASH = 45\nconst B_ONEDASH = Buffer.from('-')\nconst B_CRLF = Buffer.from('\\r\\n')\nconst EMPTY_FN = function () {}\n\nfunction Dicer (cfg) {\n if (!(this instanceof Dicer)) { return new Dicer(cfg) }\n WritableStream.call(this, cfg)\n\n if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') }\n\n if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined }\n\n this._headerFirst = cfg.headerFirst\n\n this._dashes = 0\n this._parts = 0\n this._finished = false\n this._realFinish = false\n this._isPreamble = true\n this._justMatched = false\n this._firstWrite = true\n this._inHeader = true\n this._part = undefined\n this._cb = undefined\n this._ignoreData = false\n this._partOpts = { highWaterMark: cfg.partHwm }\n this._pause = false\n\n const self = this\n this._hparser = new HeaderParser(cfg)\n this._hparser.on('header', function (header) {\n self._inHeader = false\n self._part.emit('header', header)\n })\n}\ninherits(Dicer, WritableStream)\n\nDicer.prototype.emit = function (ev) {\n if (ev === 'finish' && !this._realFinish) {\n if (!this._finished) {\n const self = this\n process.nextTick(function () {\n self.emit('error', new Error('Unexpected end of multipart data'))\n if (self._part && !self._ignoreData) {\n const type = (self._isPreamble ? 'Preamble' : 'Part')\n self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data'))\n self._part.push(null)\n process.nextTick(function () {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n return\n }\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n })\n }\n } else { WritableStream.prototype.emit.apply(this, arguments) }\n}\n\nDicer.prototype._write = function (data, encoding, cb) {\n // ignore unexpected data (e.g. extra trailer data after finished)\n if (!this._hparser && !this._bparser) { return cb() }\n\n if (this._headerFirst && this._isPreamble) {\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() }\n }\n const r = this._hparser.push(data)\n if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }\n }\n\n // allows for \"easier\" testing\n if (this._firstWrite) {\n this._bparser.push(B_CRLF)\n this._firstWrite = false\n }\n\n this._bparser.push(data)\n\n if (this._pause) { this._cb = cb } else { cb() }\n}\n\nDicer.prototype.reset = function () {\n this._part = undefined\n this._bparser = undefined\n this._hparser = undefined\n}\n\nDicer.prototype.setBoundary = function (boundary) {\n const self = this\n this._bparser = new StreamSearch('\\r\\n--' + boundary)\n this._bparser.on('info', function (isMatch, data, start, end) {\n self._oninfo(isMatch, data, start, end)\n })\n}\n\nDicer.prototype._ignore = function () {\n if (this._part && !this._ignoreData) {\n this._ignoreData = true\n this._part.on('error', EMPTY_FN)\n // we must perform some kind of read on the stream even though we are\n // ignoring the data, otherwise node's Readable stream will not emit 'end'\n // after pushing null to the stream\n this._part.resume()\n }\n}\n\nDicer.prototype._oninfo = function (isMatch, data, start, end) {\n let buf; const self = this; let i = 0; let r; let shouldWriteMore = true\n\n if (!this._part && this._justMatched && data) {\n while (this._dashes < 2 && (start + i) < end) {\n if (data[start + i] === DASH) {\n ++i\n ++this._dashes\n } else {\n if (this._dashes) { buf = B_ONEDASH }\n this._dashes = 0\n break\n }\n }\n if (this._dashes === 2) {\n if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) }\n this.reset()\n this._finished = true\n // no more parts will be added\n if (self._parts === 0) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n }\n }\n if (this._dashes) { return }\n }\n if (this._justMatched) { this._justMatched = false }\n if (!this._part) {\n this._part = new PartStream(this._partOpts)\n this._part._read = function (n) {\n self._unpause()\n }\n if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() }\n if (!this._isPreamble) { this._inHeader = true }\n }\n if (data && start < end && !this._ignoreData) {\n if (this._isPreamble || !this._inHeader) {\n if (buf) { shouldWriteMore = this._part.push(buf) }\n shouldWriteMore = this._part.push(data.slice(start, end))\n if (!shouldWriteMore) { this._pause = true }\n } else if (!this._isPreamble && this._inHeader) {\n if (buf) { this._hparser.push(buf) }\n r = this._hparser.push(data.slice(start, end))\n if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) }\n }\n }\n if (isMatch) {\n this._hparser.reset()\n if (this._isPreamble) { this._isPreamble = false } else {\n if (start !== end) {\n ++this._parts\n this._part.on('end', function () {\n if (--self._parts === 0) {\n if (self._finished) {\n self._realFinish = true\n self.emit('finish')\n self._realFinish = false\n } else {\n self._unpause()\n }\n }\n })\n }\n }\n this._part.push(null)\n this._part = undefined\n this._ignoreData = false\n this._justMatched = true\n this._dashes = 0\n }\n}\n\nDicer.prototype._unpause = function () {\n if (!this._pause) { return }\n\n this._pause = false\n if (this._cb) {\n const cb = this._cb\n this._cb = undefined\n cb()\n }\n}\n\nmodule.exports = Dicer\n","'use strict'\n\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\nconst getLimit = require('../../../lib/utils/getLimit')\n\nconst StreamSearch = require('../../streamsearch/sbmh')\n\nconst B_DCRLF = Buffer.from('\\r\\n\\r\\n')\nconst RE_CRLF = /\\r\\n/g\nconst RE_HDR = /^([^:]+):[ \\t]?([\\x00-\\xFF]+)?$/ // eslint-disable-line no-control-regex\n\nfunction HeaderParser (cfg) {\n EventEmitter.call(this)\n\n cfg = cfg || {}\n const self = this\n this.nread = 0\n this.maxed = false\n this.npairs = 0\n this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000)\n this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024)\n this.buffer = ''\n this.header = {}\n this.finished = false\n this.ss = new StreamSearch(B_DCRLF)\n this.ss.on('info', function (isMatch, data, start, end) {\n if (data && !self.maxed) {\n if (self.nread + end - start >= self.maxHeaderSize) {\n end = self.maxHeaderSize - self.nread + start\n self.nread = self.maxHeaderSize\n self.maxed = true\n } else { self.nread += (end - start) }\n\n self.buffer += data.toString('binary', start, end)\n }\n if (isMatch) { self._finish() }\n })\n}\ninherits(HeaderParser, EventEmitter)\n\nHeaderParser.prototype.push = function (data) {\n const r = this.ss.push(data)\n if (this.finished) { return r }\n}\n\nHeaderParser.prototype.reset = function () {\n this.finished = false\n this.buffer = ''\n this.header = {}\n this.ss.reset()\n}\n\nHeaderParser.prototype._finish = function () {\n if (this.buffer) { this._parseHeader() }\n this.ss.matches = this.ss.maxMatches\n const header = this.header\n this.header = {}\n this.buffer = ''\n this.finished = true\n this.nread = this.npairs = 0\n this.maxed = false\n this.emit('header', header)\n}\n\nHeaderParser.prototype._parseHeader = function () {\n if (this.npairs === this.maxHeaderPairs) { return }\n\n const lines = this.buffer.split(RE_CRLF)\n const len = lines.length\n let m, h\n\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (lines[i].length === 0) { continue }\n if (lines[i][0] === '\\t' || lines[i][0] === ' ') {\n // folded header content\n // RFC2822 says to just remove the CRLF and not the whitespace following\n // it, so we follow the RFC and include the leading whitespace ...\n if (h) {\n this.header[h][this.header[h].length - 1] += lines[i]\n continue\n }\n }\n\n const posColon = lines[i].indexOf(':')\n if (\n posColon === -1 ||\n posColon === 0\n ) {\n return\n }\n m = RE_HDR.exec(lines[i])\n h = m[1].toLowerCase()\n this.header[h] = this.header[h] || []\n this.header[h].push((m[2] || ''))\n if (++this.npairs === this.maxHeaderPairs) { break }\n }\n}\n\nmodule.exports = HeaderParser\n","'use strict'\n\nconst inherits = require('node:util').inherits\nconst ReadableStream = require('node:stream').Readable\n\nfunction PartStream (opts) {\n ReadableStream.call(this, opts)\n}\ninherits(PartStream, ReadableStream)\n\nPartStream.prototype._read = function (n) {}\n\nmodule.exports = PartStream\n","'use strict'\n\n/**\n * Copyright Brian White. All rights reserved.\n *\n * @see https://github.com/mscdex/streamsearch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation\n * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool\n */\nconst EventEmitter = require('node:events').EventEmitter\nconst inherits = require('node:util').inherits\n\nfunction SBMH (needle) {\n if (typeof needle === 'string') {\n needle = Buffer.from(needle)\n }\n\n if (!Buffer.isBuffer(needle)) {\n throw new TypeError('The needle has to be a String or a Buffer.')\n }\n\n const needleLength = needle.length\n\n if (needleLength === 0) {\n throw new Error('The needle cannot be an empty String/Buffer.')\n }\n\n if (needleLength > 256) {\n throw new Error('The needle cannot have a length bigger than 256.')\n }\n\n this.maxMatches = Infinity\n this.matches = 0\n\n this._occ = new Array(256)\n .fill(needleLength) // Initialize occurrence table.\n this._lookbehind_size = 0\n this._needle = needle\n this._bufpos = 0\n\n this._lookbehind = Buffer.alloc(needleLength)\n\n // Populate occurrence table with analysis of the needle,\n // ignoring last letter.\n for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var\n this._occ[needle[i]] = needleLength - 1 - i\n }\n}\ninherits(SBMH, EventEmitter)\n\nSBMH.prototype.reset = function () {\n this._lookbehind_size = 0\n this.matches = 0\n this._bufpos = 0\n}\n\nSBMH.prototype.push = function (chunk, pos) {\n if (!Buffer.isBuffer(chunk)) {\n chunk = Buffer.from(chunk, 'binary')\n }\n const chlen = chunk.length\n this._bufpos = pos || 0\n let r\n while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) }\n return r\n}\n\nSBMH.prototype._sbmh_feed = function (data) {\n const len = data.length\n const needle = this._needle\n const needleLength = needle.length\n const lastNeedleChar = needle[needleLength - 1]\n\n // Positive: points to a position in `data`\n // pos == 3 points to data[3]\n // Negative: points to a position in the lookbehind buffer\n // pos == -2 points to lookbehind[lookbehind_size - 2]\n let pos = -this._lookbehind_size\n let ch\n\n if (pos < 0) {\n // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool\n // search with character lookup code that considers both the\n // lookbehind buffer and the current round's haystack data.\n //\n // Loop until\n // there is a match.\n // or until\n // we've moved past the position that requires the\n // lookbehind buffer. In this case we switch to the\n // optimized loop.\n // or until\n // the character to look at lies outside the haystack.\n while (pos < 0 && pos <= len - needleLength) {\n ch = this._sbmh_lookup_char(data, pos + needleLength - 1)\n\n if (\n ch === lastNeedleChar &&\n this._sbmh_memcmp(data, pos, needleLength - 1)\n ) {\n this._lookbehind_size = 0\n ++this.matches\n this.emit('info', true)\n\n return (this._bufpos = pos + needleLength)\n }\n pos += this._occ[ch]\n }\n\n // No match.\n\n if (pos < 0) {\n // There's too few data for Boyer-Moore-Horspool to run,\n // so let's use a different algorithm to skip as much as\n // we can.\n // Forward pos until\n // the trailing part of lookbehind + data\n // looks like the beginning of the needle\n // or until\n // pos == 0\n while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos }\n }\n\n if (pos >= 0) {\n // Discard lookbehind buffer.\n this.emit('info', false, this._lookbehind, 0, this._lookbehind_size)\n this._lookbehind_size = 0\n } else {\n // Cut off part of the lookbehind buffer that has\n // been processed and append the entire haystack\n // into it.\n const bytesToCutOff = this._lookbehind_size + pos\n if (bytesToCutOff > 0) {\n // The cut off data is guaranteed not to contain the needle.\n this.emit('info', false, this._lookbehind, 0, bytesToCutOff)\n }\n\n this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff,\n this._lookbehind_size - bytesToCutOff)\n this._lookbehind_size -= bytesToCutOff\n\n data.copy(this._lookbehind, this._lookbehind_size)\n this._lookbehind_size += len\n\n this._bufpos = len\n return len\n }\n }\n\n pos += (pos >= 0) * this._bufpos\n\n // Lookbehind buffer is now empty. We only need to check if the\n // needle is in the haystack.\n if (data.indexOf(needle, pos) !== -1) {\n pos = data.indexOf(needle, pos)\n ++this.matches\n if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) }\n\n return (this._bufpos = pos + needleLength)\n } else {\n pos = len - needleLength\n }\n\n // There was no match. If there's trailing haystack data that we cannot\n // match yet using the Boyer-Moore-Horspool algorithm (because the trailing\n // data is less than the needle size) then match using a modified\n // algorithm that starts matching from the beginning instead of the end.\n // Whatever trailing data is left after running this algorithm is added to\n // the lookbehind buffer.\n while (\n pos < len &&\n (\n data[pos] !== needle[0] ||\n (\n (Buffer.compare(\n data.subarray(pos, pos + len - pos),\n needle.subarray(0, len - pos)\n ) !== 0)\n )\n )\n ) {\n ++pos\n }\n if (pos < len) {\n data.copy(this._lookbehind, 0, pos, pos + (len - pos))\n this._lookbehind_size = len - pos\n }\n\n // Everything until pos is guaranteed not to contain needle data.\n if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) }\n\n this._bufpos = len\n return len\n}\n\nSBMH.prototype._sbmh_lookup_char = function (data, pos) {\n return (pos < 0)\n ? this._lookbehind[this._lookbehind_size + pos]\n : data[pos]\n}\n\nSBMH.prototype._sbmh_memcmp = function (data, pos, len) {\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false }\n }\n return true\n}\n\nmodule.exports = SBMH\n","'use strict'\n\nconst WritableStream = require('node:stream').Writable\nconst { inherits } = require('node:util')\nconst Dicer = require('../deps/dicer/lib/Dicer')\n\nconst MultipartParser = require('./types/multipart')\nconst UrlencodedParser = require('./types/urlencoded')\nconst parseParams = require('./utils/parseParams')\n\nfunction Busboy (opts) {\n if (!(this instanceof Busboy)) { return new Busboy(opts) }\n\n if (typeof opts !== 'object') {\n throw new TypeError('Busboy expected an options-Object.')\n }\n if (typeof opts.headers !== 'object') {\n throw new TypeError('Busboy expected an options-Object with headers-attribute.')\n }\n if (typeof opts.headers['content-type'] !== 'string') {\n throw new TypeError('Missing Content-Type-header.')\n }\n\n const {\n headers,\n ...streamOptions\n } = opts\n\n this.opts = {\n autoDestroy: false,\n ...streamOptions\n }\n WritableStream.call(this, this.opts)\n\n this._done = false\n this._parser = this.getParserByHeaders(headers)\n this._finished = false\n}\ninherits(Busboy, WritableStream)\n\nBusboy.prototype.emit = function (ev) {\n if (ev === 'finish') {\n if (!this._done) {\n this._parser?.end()\n return\n } else if (this._finished) {\n return\n }\n this._finished = true\n }\n WritableStream.prototype.emit.apply(this, arguments)\n}\n\nBusboy.prototype.getParserByHeaders = function (headers) {\n const parsed = parseParams(headers['content-type'])\n\n const cfg = {\n defCharset: this.opts.defCharset,\n fileHwm: this.opts.fileHwm,\n headers,\n highWaterMark: this.opts.highWaterMark,\n isPartAFile: this.opts.isPartAFile,\n limits: this.opts.limits,\n parsedConType: parsed,\n preservePath: this.opts.preservePath\n }\n\n if (MultipartParser.detect.test(parsed[0])) {\n return new MultipartParser(this, cfg)\n }\n if (UrlencodedParser.detect.test(parsed[0])) {\n return new UrlencodedParser(this, cfg)\n }\n throw new Error('Unsupported Content-Type.')\n}\n\nBusboy.prototype._write = function (chunk, encoding, cb) {\n this._parser.write(chunk, cb)\n}\n\nmodule.exports = Busboy\nmodule.exports.default = Busboy\nmodule.exports.Busboy = Busboy\n\nmodule.exports.Dicer = Dicer\n","'use strict'\n\n// TODO:\n// * support 1 nested multipart level\n// (see second multipart example here:\n// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data)\n// * support limits.fieldNameSize\n// -- this will require modifications to utils.parseParams\n\nconst { Readable } = require('node:stream')\nconst { inherits } = require('node:util')\n\nconst Dicer = require('../../deps/dicer/lib/Dicer')\n\nconst parseParams = require('../utils/parseParams')\nconst decodeText = require('../utils/decodeText')\nconst basename = require('../utils/basename')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_BOUNDARY = /^boundary$/i\nconst RE_FIELD = /^form-data$/i\nconst RE_CHARSET = /^charset$/i\nconst RE_FILENAME = /^filename$/i\nconst RE_NAME = /^name$/i\n\nMultipart.detect = /^multipart\\/form-data/i\nfunction Multipart (boy, cfg) {\n let i\n let len\n const self = this\n let boundary\n const limits = cfg.limits\n const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined))\n const parsedConType = cfg.parsedConType || []\n const defCharset = cfg.defCharset || 'utf8'\n const preservePath = cfg.preservePath\n const fileOpts = { highWaterMark: cfg.fileHwm }\n\n for (i = 0, len = parsedConType.length; i < len; ++i) {\n if (Array.isArray(parsedConType[i]) &&\n RE_BOUNDARY.test(parsedConType[i][0])) {\n boundary = parsedConType[i][1]\n break\n }\n }\n\n function checkFinished () {\n if (nends === 0 && finished && !boy._done) {\n finished = false\n self.end()\n }\n }\n\n if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') }\n\n const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n const fileSizeLimit = getLimit(limits, 'fileSize', Infinity)\n const filesLimit = getLimit(limits, 'files', Infinity)\n const fieldsLimit = getLimit(limits, 'fields', Infinity)\n const partsLimit = getLimit(limits, 'parts', Infinity)\n const headerPairsLimit = getLimit(limits, 'headerPairs', 2000)\n const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024)\n\n let nfiles = 0\n let nfields = 0\n let nends = 0\n let curFile\n let curField\n let finished = false\n\n this._needDrain = false\n this._pause = false\n this._cb = undefined\n this._nparts = 0\n this._boy = boy\n\n const parserCfg = {\n boundary,\n maxHeaderPairs: headerPairsLimit,\n maxHeaderSize: headerSizeLimit,\n partHwm: fileOpts.highWaterMark,\n highWaterMark: cfg.highWaterMark\n }\n\n this.parser = new Dicer(parserCfg)\n this.parser.on('drain', function () {\n self._needDrain = false\n if (self._cb && !self._pause) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }).on('part', function onPart (part) {\n if (++self._nparts > partsLimit) {\n self.parser.removeListener('part', onPart)\n self.parser.on('part', skipPart)\n boy.hitPartsLimit = true\n boy.emit('partsLimit')\n return skipPart(part)\n }\n\n // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let\n // us emit 'end' early since we know the part has ended if we are already\n // seeing the next part\n if (curField) {\n const field = curField\n field.emit('end')\n field.removeAllListeners('end')\n }\n\n part.on('header', function (header) {\n let contype\n let fieldname\n let parsed\n let charset\n let encoding\n let filename\n let nsize = 0\n\n if (header['content-type']) {\n parsed = parseParams(header['content-type'][0])\n if (parsed[0]) {\n contype = parsed[0].toLowerCase()\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_CHARSET.test(parsed[i][0])) {\n charset = parsed[i][1].toLowerCase()\n break\n }\n }\n }\n }\n\n if (contype === undefined) { contype = 'text/plain' }\n if (charset === undefined) { charset = defCharset }\n\n if (header['content-disposition']) {\n parsed = parseParams(header['content-disposition'][0])\n if (!RE_FIELD.test(parsed[0])) { return skipPart(part) }\n for (i = 0, len = parsed.length; i < len; ++i) {\n if (RE_NAME.test(parsed[i][0])) {\n fieldname = parsed[i][1]\n } else if (RE_FILENAME.test(parsed[i][0])) {\n filename = parsed[i][1]\n if (!preservePath) { filename = basename(filename) }\n }\n }\n } else { return skipPart(part) }\n\n if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' }\n\n let onData,\n onEnd\n\n if (isPartAFile(fieldname, contype, filename)) {\n // file/binary field\n if (nfiles === filesLimit) {\n if (!boy.hitFilesLimit) {\n boy.hitFilesLimit = true\n boy.emit('filesLimit')\n }\n return skipPart(part)\n }\n\n ++nfiles\n\n if (!boy._events.file) {\n self.parser._ignore()\n return\n }\n\n ++nends\n const file = new FileStream(fileOpts)\n curFile = file\n file.on('end', function () {\n --nends\n self._pause = false\n checkFinished()\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n })\n file._read = function (n) {\n if (!self._pause) { return }\n self._pause = false\n if (self._cb && !self._needDrain) {\n const cb = self._cb\n self._cb = undefined\n cb()\n }\n }\n boy.emit('file', fieldname, file, filename, encoding, contype)\n\n onData = function (data) {\n if ((nsize += data.length) > fileSizeLimit) {\n const extralen = fileSizeLimit - nsize + data.length\n if (extralen > 0) { file.push(data.slice(0, extralen)) }\n file.truncated = true\n file.bytesRead = fileSizeLimit\n part.removeAllListeners('data')\n file.emit('limit')\n return\n } else if (!file.push(data)) { self._pause = true }\n\n file.bytesRead = nsize\n }\n\n onEnd = function () {\n curFile = undefined\n file.push(null)\n }\n } else {\n // non-file field\n if (nfields === fieldsLimit) {\n if (!boy.hitFieldsLimit) {\n boy.hitFieldsLimit = true\n boy.emit('fieldsLimit')\n }\n return skipPart(part)\n }\n\n ++nfields\n ++nends\n let buffer = ''\n let truncated = false\n curField = part\n\n onData = function (data) {\n if ((nsize += data.length) > fieldSizeLimit) {\n const extralen = (fieldSizeLimit - (nsize - data.length))\n buffer += data.toString('binary', 0, extralen)\n truncated = true\n part.removeAllListeners('data')\n } else { buffer += data.toString('binary') }\n }\n\n onEnd = function () {\n curField = undefined\n if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) }\n boy.emit('field', fieldname, buffer, false, truncated, encoding, contype)\n --nends\n checkFinished()\n }\n }\n\n /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become\n broken. Streams2/streams3 is a huge black box of confusion, but\n somehow overriding the sync state seems to fix things again (and still\n seems to work for previous node versions).\n */\n part._readableState.sync = false\n\n part.on('data', onData)\n part.on('end', onEnd)\n }).on('error', function (err) {\n if (curFile) { curFile.emit('error', err) }\n })\n }).on('error', function (err) {\n boy.emit('error', err)\n }).on('finish', function () {\n finished = true\n checkFinished()\n })\n}\n\nMultipart.prototype.write = function (chunk, cb) {\n const r = this.parser.write(chunk)\n if (r && !this._pause) {\n cb()\n } else {\n this._needDrain = !r\n this._cb = cb\n }\n}\n\nMultipart.prototype.end = function () {\n const self = this\n\n if (self.parser.writable) {\n self.parser.end()\n } else if (!self._boy._done) {\n process.nextTick(function () {\n self._boy._done = true\n self._boy.emit('finish')\n })\n }\n}\n\nfunction skipPart (part) {\n part.resume()\n}\n\nfunction FileStream (opts) {\n Readable.call(this, opts)\n\n this.bytesRead = 0\n\n this.truncated = false\n}\n\ninherits(FileStream, Readable)\n\nFileStream.prototype._read = function (n) {}\n\nmodule.exports = Multipart\n","'use strict'\n\nconst Decoder = require('../utils/Decoder')\nconst decodeText = require('../utils/decodeText')\nconst getLimit = require('../utils/getLimit')\n\nconst RE_CHARSET = /^charset$/i\n\nUrlEncoded.detect = /^application\\/x-www-form-urlencoded/i\nfunction UrlEncoded (boy, cfg) {\n const limits = cfg.limits\n const parsedConType = cfg.parsedConType\n this.boy = boy\n\n this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)\n this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100)\n this.fieldsLimit = getLimit(limits, 'fields', Infinity)\n\n let charset\n for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var\n if (Array.isArray(parsedConType[i]) &&\n RE_CHARSET.test(parsedConType[i][0])) {\n charset = parsedConType[i][1].toLowerCase()\n break\n }\n }\n\n if (charset === undefined) { charset = cfg.defCharset || 'utf8' }\n\n this.decoder = new Decoder()\n this.charset = charset\n this._fields = 0\n this._state = 'key'\n this._checkingBytes = true\n this._bytesKey = 0\n this._bytesVal = 0\n this._key = ''\n this._val = ''\n this._keyTrunc = false\n this._valTrunc = false\n this._hitLimit = false\n}\n\nUrlEncoded.prototype.write = function (data, cb) {\n if (this._fields === this.fieldsLimit) {\n if (!this.boy.hitFieldsLimit) {\n this.boy.hitFieldsLimit = true\n this.boy.emit('fieldsLimit')\n }\n return cb()\n }\n\n let idxeq; let idxamp; let i; let p = 0; const len = data.length\n\n while (p < len) {\n if (this._state === 'key') {\n idxeq = idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x3D/* = */) {\n idxeq = i\n break\n } else if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesKey }\n }\n\n if (idxeq !== undefined) {\n // key with assignment\n if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) }\n this._state = 'val'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._val = ''\n this._bytesVal = 0\n this._valTrunc = false\n this.decoder.reset()\n\n p = idxeq + 1\n } else if (idxamp !== undefined) {\n // key with no assignment\n ++this._fields\n let key; const keyTrunc = this._keyTrunc\n if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key }\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n if (key.length) {\n this.boy.emit('field', decodeText(key, 'binary', this.charset),\n '',\n keyTrunc,\n false)\n }\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._keyTrunc = true\n }\n } else {\n if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n } else {\n idxamp = undefined\n for (i = p; i < len; ++i) {\n if (!this._checkingBytes) { ++p }\n if (data[i] === 0x26/* & */) {\n idxamp = i\n break\n }\n if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) {\n this._hitLimit = true\n break\n } else if (this._checkingBytes) { ++this._bytesVal }\n }\n\n if (idxamp !== undefined) {\n ++this._fields\n if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) }\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n this._state = 'key'\n\n this._hitLimit = false\n this._checkingBytes = true\n this._key = ''\n this._bytesKey = 0\n this._keyTrunc = false\n this.decoder.reset()\n\n p = idxamp + 1\n if (this._fields === this.fieldsLimit) { return cb() }\n } else if (this._hitLimit) {\n // we may not have hit the actual limit if there are encoded bytes...\n if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) }\n p = i\n if ((this._val === '' && this.fieldSizeLimit === 0) ||\n (this._bytesVal = this._val.length) === this.fieldSizeLimit) {\n // yep, we actually did hit the limit\n this._checkingBytes = false\n this._valTrunc = true\n }\n } else {\n if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) }\n p = len\n }\n }\n }\n cb()\n}\n\nUrlEncoded.prototype.end = function () {\n if (this.boy._done) { return }\n\n if (this._state === 'key' && this._key.length > 0) {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n '',\n this._keyTrunc,\n false)\n } else if (this._state === 'val') {\n this.boy.emit('field', decodeText(this._key, 'binary', this.charset),\n decodeText(this._val, 'binary', this.charset),\n this._keyTrunc,\n this._valTrunc)\n }\n this.boy._done = true\n this.boy.emit('finish')\n}\n\nmodule.exports = UrlEncoded\n","'use strict'\n\nconst RE_PLUS = /\\+/g\n\nconst HEX = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n]\n\nfunction Decoder () {\n this.buffer = undefined\n}\nDecoder.prototype.write = function (str) {\n // Replace '+' with ' ' before decoding\n str = str.replace(RE_PLUS, ' ')\n let res = ''\n let i = 0; let p = 0; const len = str.length\n for (; i < len; ++i) {\n if (this.buffer !== undefined) {\n if (!HEX[str.charCodeAt(i)]) {\n res += '%' + this.buffer\n this.buffer = undefined\n --i // retry character\n } else {\n this.buffer += str[i]\n ++p\n if (this.buffer.length === 2) {\n res += String.fromCharCode(parseInt(this.buffer, 16))\n this.buffer = undefined\n }\n }\n } else if (str[i] === '%') {\n if (i > p) {\n res += str.substring(p, i)\n p = i\n }\n this.buffer = ''\n ++p\n }\n }\n if (p < len && this.buffer === undefined) { res += str.substring(p) }\n return res\n}\nDecoder.prototype.reset = function () {\n this.buffer = undefined\n}\n\nmodule.exports = Decoder\n","'use strict'\n\nmodule.exports = function basename (path) {\n if (typeof path !== 'string') { return '' }\n for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var\n switch (path.charCodeAt(i)) {\n case 0x2F: // '/'\n case 0x5C: // '\\'\n path = path.slice(i + 1)\n return (path === '..' || path === '.' ? '' : path)\n }\n }\n return (path === '..' || path === '.' ? '' : path)\n}\n","'use strict'\n\n// Node has always utf-8\nconst utf8Decoder = new TextDecoder('utf-8')\nconst textDecoders = new Map([\n ['utf-8', utf8Decoder],\n ['utf8', utf8Decoder]\n])\n\nfunction getDecoder (charset) {\n let lc\n while (true) {\n switch (charset) {\n case 'utf-8':\n case 'utf8':\n return decoders.utf8\n case 'latin1':\n case 'ascii': // TODO: Make these a separate, strict decoder?\n case 'us-ascii':\n case 'iso-8859-1':\n case 'iso8859-1':\n case 'iso88591':\n case 'iso_8859-1':\n case 'windows-1252':\n case 'iso_8859-1:1987':\n case 'cp1252':\n case 'x-cp1252':\n return decoders.latin1\n case 'utf16le':\n case 'utf-16le':\n case 'ucs2':\n case 'ucs-2':\n return decoders.utf16le\n case 'base64':\n return decoders.base64\n default:\n if (lc === undefined) {\n lc = true\n charset = charset.toLowerCase()\n continue\n }\n return decoders.other.bind(charset)\n }\n }\n}\n\nconst decoders = {\n utf8: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.utf8Slice(0, data.length)\n },\n\n latin1: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n return data\n }\n return data.latin1Slice(0, data.length)\n },\n\n utf16le: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.ucs2Slice(0, data.length)\n },\n\n base64: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n return data.base64Slice(0, data.length)\n },\n\n other: (data, sourceEncoding) => {\n if (data.length === 0) {\n return ''\n }\n if (typeof data === 'string') {\n data = Buffer.from(data, sourceEncoding)\n }\n\n if (textDecoders.has(this.toString())) {\n try {\n return textDecoders.get(this).decode(data)\n } catch (e) { }\n }\n return typeof data === 'string'\n ? data\n : data.toString()\n }\n}\n\nfunction decodeText (text, sourceEncoding, destEncoding) {\n if (text) {\n return getDecoder(destEncoding)(text, sourceEncoding)\n }\n return text\n}\n\nmodule.exports = decodeText\n","'use strict'\n\nmodule.exports = function getLimit (limits, name, defaultLimit) {\n if (\n !limits ||\n limits[name] === undefined ||\n limits[name] === null\n ) { return defaultLimit }\n\n if (\n typeof limits[name] !== 'number' ||\n isNaN(limits[name])\n ) { throw new TypeError('Limit ' + name + ' is not a valid number') }\n\n return limits[name]\n}\n","/* eslint-disable object-property-newline */\n'use strict'\n\nconst decodeText = require('./decodeText')\n\nconst RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g\n\nconst EncodedLookup = {\n '%00': '\\x00', '%01': '\\x01', '%02': '\\x02', '%03': '\\x03', '%04': '\\x04',\n '%05': '\\x05', '%06': '\\x06', '%07': '\\x07', '%08': '\\x08', '%09': '\\x09',\n '%0a': '\\x0a', '%0A': '\\x0a', '%0b': '\\x0b', '%0B': '\\x0b', '%0c': '\\x0c',\n '%0C': '\\x0c', '%0d': '\\x0d', '%0D': '\\x0d', '%0e': '\\x0e', '%0E': '\\x0e',\n '%0f': '\\x0f', '%0F': '\\x0f', '%10': '\\x10', '%11': '\\x11', '%12': '\\x12',\n '%13': '\\x13', '%14': '\\x14', '%15': '\\x15', '%16': '\\x16', '%17': '\\x17',\n '%18': '\\x18', '%19': '\\x19', '%1a': '\\x1a', '%1A': '\\x1a', '%1b': '\\x1b',\n '%1B': '\\x1b', '%1c': '\\x1c', '%1C': '\\x1c', '%1d': '\\x1d', '%1D': '\\x1d',\n '%1e': '\\x1e', '%1E': '\\x1e', '%1f': '\\x1f', '%1F': '\\x1f', '%20': '\\x20',\n '%21': '\\x21', '%22': '\\x22', '%23': '\\x23', '%24': '\\x24', '%25': '\\x25',\n '%26': '\\x26', '%27': '\\x27', '%28': '\\x28', '%29': '\\x29', '%2a': '\\x2a',\n '%2A': '\\x2a', '%2b': '\\x2b', '%2B': '\\x2b', '%2c': '\\x2c', '%2C': '\\x2c',\n '%2d': '\\x2d', '%2D': '\\x2d', '%2e': '\\x2e', '%2E': '\\x2e', '%2f': '\\x2f',\n '%2F': '\\x2f', '%30': '\\x30', '%31': '\\x31', '%32': '\\x32', '%33': '\\x33',\n '%34': '\\x34', '%35': '\\x35', '%36': '\\x36', '%37': '\\x37', '%38': '\\x38',\n '%39': '\\x39', '%3a': '\\x3a', '%3A': '\\x3a', '%3b': '\\x3b', '%3B': '\\x3b',\n '%3c': '\\x3c', '%3C': '\\x3c', '%3d': '\\x3d', '%3D': '\\x3d', '%3e': '\\x3e',\n '%3E': '\\x3e', '%3f': '\\x3f', '%3F': '\\x3f', '%40': '\\x40', '%41': '\\x41',\n '%42': '\\x42', '%43': '\\x43', '%44': '\\x44', '%45': '\\x45', '%46': '\\x46',\n '%47': '\\x47', '%48': '\\x48', '%49': '\\x49', '%4a': '\\x4a', '%4A': '\\x4a',\n '%4b': '\\x4b', '%4B': '\\x4b', '%4c': '\\x4c', '%4C': '\\x4c', '%4d': '\\x4d',\n '%4D': '\\x4d', '%4e': '\\x4e', '%4E': '\\x4e', '%4f': '\\x4f', '%4F': '\\x4f',\n '%50': '\\x50', '%51': '\\x51', '%52': '\\x52', '%53': '\\x53', '%54': '\\x54',\n '%55': '\\x55', '%56': '\\x56', '%57': '\\x57', '%58': '\\x58', '%59': '\\x59',\n '%5a': '\\x5a', '%5A': '\\x5a', '%5b': '\\x5b', '%5B': '\\x5b', '%5c': '\\x5c',\n '%5C': '\\x5c', '%5d': '\\x5d', '%5D': '\\x5d', '%5e': '\\x5e', '%5E': '\\x5e',\n '%5f': '\\x5f', '%5F': '\\x5f', '%60': '\\x60', '%61': '\\x61', '%62': '\\x62',\n '%63': '\\x63', '%64': '\\x64', '%65': '\\x65', '%66': '\\x66', '%67': '\\x67',\n '%68': '\\x68', '%69': '\\x69', '%6a': '\\x6a', '%6A': '\\x6a', '%6b': '\\x6b',\n '%6B': '\\x6b', '%6c': '\\x6c', '%6C': '\\x6c', '%6d': '\\x6d', '%6D': '\\x6d',\n '%6e': '\\x6e', '%6E': '\\x6e', '%6f': '\\x6f', '%6F': '\\x6f', '%70': '\\x70',\n '%71': '\\x71', '%72': '\\x72', '%73': '\\x73', '%74': '\\x74', '%75': '\\x75',\n '%76': '\\x76', '%77': '\\x77', '%78': '\\x78', '%79': '\\x79', '%7a': '\\x7a',\n '%7A': '\\x7a', '%7b': '\\x7b', '%7B': '\\x7b', '%7c': '\\x7c', '%7C': '\\x7c',\n '%7d': '\\x7d', '%7D': '\\x7d', '%7e': '\\x7e', '%7E': '\\x7e', '%7f': '\\x7f',\n '%7F': '\\x7f', '%80': '\\x80', '%81': '\\x81', '%82': '\\x82', '%83': '\\x83',\n '%84': '\\x84', '%85': '\\x85', '%86': '\\x86', '%87': '\\x87', '%88': '\\x88',\n '%89': '\\x89', '%8a': '\\x8a', '%8A': '\\x8a', '%8b': '\\x8b', '%8B': '\\x8b',\n '%8c': '\\x8c', '%8C': '\\x8c', '%8d': '\\x8d', '%8D': '\\x8d', '%8e': '\\x8e',\n '%8E': '\\x8e', '%8f': '\\x8f', '%8F': '\\x8f', '%90': '\\x90', '%91': '\\x91',\n '%92': '\\x92', '%93': '\\x93', '%94': '\\x94', '%95': '\\x95', '%96': '\\x96',\n '%97': '\\x97', '%98': '\\x98', '%99': '\\x99', '%9a': '\\x9a', '%9A': '\\x9a',\n '%9b': '\\x9b', '%9B': '\\x9b', '%9c': '\\x9c', '%9C': '\\x9c', '%9d': '\\x9d',\n '%9D': '\\x9d', '%9e': '\\x9e', '%9E': '\\x9e', '%9f': '\\x9f', '%9F': '\\x9f',\n '%a0': '\\xa0', '%A0': '\\xa0', '%a1': '\\xa1', '%A1': '\\xa1', '%a2': '\\xa2',\n '%A2': '\\xa2', '%a3': '\\xa3', '%A3': '\\xa3', '%a4': '\\xa4', '%A4': '\\xa4',\n '%a5': '\\xa5', '%A5': '\\xa5', '%a6': '\\xa6', '%A6': '\\xa6', '%a7': '\\xa7',\n '%A7': '\\xa7', '%a8': '\\xa8', '%A8': '\\xa8', '%a9': '\\xa9', '%A9': '\\xa9',\n '%aa': '\\xaa', '%Aa': '\\xaa', '%aA': '\\xaa', '%AA': '\\xaa', '%ab': '\\xab',\n '%Ab': '\\xab', '%aB': '\\xab', '%AB': '\\xab', '%ac': '\\xac', '%Ac': '\\xac',\n '%aC': '\\xac', '%AC': '\\xac', '%ad': '\\xad', '%Ad': '\\xad', '%aD': '\\xad',\n '%AD': '\\xad', '%ae': '\\xae', '%Ae': '\\xae', '%aE': '\\xae', '%AE': '\\xae',\n '%af': '\\xaf', '%Af': '\\xaf', '%aF': '\\xaf', '%AF': '\\xaf', '%b0': '\\xb0',\n '%B0': '\\xb0', '%b1': '\\xb1', '%B1': '\\xb1', '%b2': '\\xb2', '%B2': '\\xb2',\n '%b3': '\\xb3', '%B3': '\\xb3', '%b4': '\\xb4', '%B4': '\\xb4', '%b5': '\\xb5',\n '%B5': '\\xb5', '%b6': '\\xb6', '%B6': '\\xb6', '%b7': '\\xb7', '%B7': '\\xb7',\n '%b8': '\\xb8', '%B8': '\\xb8', '%b9': '\\xb9', '%B9': '\\xb9', '%ba': '\\xba',\n '%Ba': '\\xba', '%bA': '\\xba', '%BA': '\\xba', '%bb': '\\xbb', '%Bb': '\\xbb',\n '%bB': '\\xbb', '%BB': '\\xbb', '%bc': '\\xbc', '%Bc': '\\xbc', '%bC': '\\xbc',\n '%BC': '\\xbc', '%bd': '\\xbd', '%Bd': '\\xbd', '%bD': '\\xbd', '%BD': '\\xbd',\n '%be': '\\xbe', '%Be': '\\xbe', '%bE': '\\xbe', '%BE': '\\xbe', '%bf': '\\xbf',\n '%Bf': '\\xbf', '%bF': '\\xbf', '%BF': '\\xbf', '%c0': '\\xc0', '%C0': '\\xc0',\n '%c1': '\\xc1', '%C1': '\\xc1', '%c2': '\\xc2', '%C2': '\\xc2', '%c3': '\\xc3',\n '%C3': '\\xc3', '%c4': '\\xc4', '%C4': '\\xc4', '%c5': '\\xc5', '%C5': '\\xc5',\n '%c6': '\\xc6', '%C6': '\\xc6', '%c7': '\\xc7', '%C7': '\\xc7', '%c8': '\\xc8',\n '%C8': '\\xc8', '%c9': '\\xc9', '%C9': '\\xc9', '%ca': '\\xca', '%Ca': '\\xca',\n '%cA': '\\xca', '%CA': '\\xca', '%cb': '\\xcb', '%Cb': '\\xcb', '%cB': '\\xcb',\n '%CB': '\\xcb', '%cc': '\\xcc', '%Cc': '\\xcc', '%cC': '\\xcc', '%CC': '\\xcc',\n '%cd': '\\xcd', '%Cd': '\\xcd', '%cD': '\\xcd', '%CD': '\\xcd', '%ce': '\\xce',\n '%Ce': '\\xce', '%cE': '\\xce', '%CE': '\\xce', '%cf': '\\xcf', '%Cf': '\\xcf',\n '%cF': '\\xcf', '%CF': '\\xcf', '%d0': '\\xd0', '%D0': '\\xd0', '%d1': '\\xd1',\n '%D1': '\\xd1', '%d2': '\\xd2', '%D2': '\\xd2', '%d3': '\\xd3', '%D3': '\\xd3',\n '%d4': '\\xd4', '%D4': '\\xd4', '%d5': '\\xd5', '%D5': '\\xd5', '%d6': '\\xd6',\n '%D6': '\\xd6', '%d7': '\\xd7', '%D7': '\\xd7', '%d8': '\\xd8', '%D8': '\\xd8',\n '%d9': '\\xd9', '%D9': '\\xd9', '%da': '\\xda', '%Da': '\\xda', '%dA': '\\xda',\n '%DA': '\\xda', '%db': '\\xdb', '%Db': '\\xdb', '%dB': '\\xdb', '%DB': '\\xdb',\n '%dc': '\\xdc', '%Dc': '\\xdc', '%dC': '\\xdc', '%DC': '\\xdc', '%dd': '\\xdd',\n '%Dd': '\\xdd', '%dD': '\\xdd', '%DD': '\\xdd', '%de': '\\xde', '%De': '\\xde',\n '%dE': '\\xde', '%DE': '\\xde', '%df': '\\xdf', '%Df': '\\xdf', '%dF': '\\xdf',\n '%DF': '\\xdf', '%e0': '\\xe0', '%E0': '\\xe0', '%e1': '\\xe1', '%E1': '\\xe1',\n '%e2': '\\xe2', '%E2': '\\xe2', '%e3': '\\xe3', '%E3': '\\xe3', '%e4': '\\xe4',\n '%E4': '\\xe4', '%e5': '\\xe5', '%E5': '\\xe5', '%e6': '\\xe6', '%E6': '\\xe6',\n '%e7': '\\xe7', '%E7': '\\xe7', '%e8': '\\xe8', '%E8': '\\xe8', '%e9': '\\xe9',\n '%E9': '\\xe9', '%ea': '\\xea', '%Ea': '\\xea', '%eA': '\\xea', '%EA': '\\xea',\n '%eb': '\\xeb', '%Eb': '\\xeb', '%eB': '\\xeb', '%EB': '\\xeb', '%ec': '\\xec',\n '%Ec': '\\xec', '%eC': '\\xec', '%EC': '\\xec', '%ed': '\\xed', '%Ed': '\\xed',\n '%eD': '\\xed', '%ED': '\\xed', '%ee': '\\xee', '%Ee': '\\xee', '%eE': '\\xee',\n '%EE': '\\xee', '%ef': '\\xef', '%Ef': '\\xef', '%eF': '\\xef', '%EF': '\\xef',\n '%f0': '\\xf0', '%F0': '\\xf0', '%f1': '\\xf1', '%F1': '\\xf1', '%f2': '\\xf2',\n '%F2': '\\xf2', '%f3': '\\xf3', '%F3': '\\xf3', '%f4': '\\xf4', '%F4': '\\xf4',\n '%f5': '\\xf5', '%F5': '\\xf5', '%f6': '\\xf6', '%F6': '\\xf6', '%f7': '\\xf7',\n '%F7': '\\xf7', '%f8': '\\xf8', '%F8': '\\xf8', '%f9': '\\xf9', '%F9': '\\xf9',\n '%fa': '\\xfa', '%Fa': '\\xfa', '%fA': '\\xfa', '%FA': '\\xfa', '%fb': '\\xfb',\n '%Fb': '\\xfb', '%fB': '\\xfb', '%FB': '\\xfb', '%fc': '\\xfc', '%Fc': '\\xfc',\n '%fC': '\\xfc', '%FC': '\\xfc', '%fd': '\\xfd', '%Fd': '\\xfd', '%fD': '\\xfd',\n '%FD': '\\xfd', '%fe': '\\xfe', '%Fe': '\\xfe', '%fE': '\\xfe', '%FE': '\\xfe',\n '%ff': '\\xff', '%Ff': '\\xff', '%fF': '\\xff', '%FF': '\\xff'\n}\n\nfunction encodedReplacer (match) {\n return EncodedLookup[match]\n}\n\nconst STATE_KEY = 0\nconst STATE_VALUE = 1\nconst STATE_CHARSET = 2\nconst STATE_LANG = 3\n\nfunction parseParams (str) {\n const res = []\n let state = STATE_KEY\n let charset = ''\n let inquote = false\n let escaping = false\n let p = 0\n let tmp = ''\n const len = str.length\n\n for (var i = 0; i < len; ++i) { // eslint-disable-line no-var\n const char = str[i]\n if (char === '\\\\' && inquote) {\n if (escaping) { escaping = false } else {\n escaping = true\n continue\n }\n } else if (char === '\"') {\n if (!escaping) {\n if (inquote) {\n inquote = false\n state = STATE_KEY\n } else { inquote = true }\n continue\n } else { escaping = false }\n } else {\n if (escaping && inquote) { tmp += '\\\\' }\n escaping = false\n if ((state === STATE_CHARSET || state === STATE_LANG) && char === \"'\") {\n if (state === STATE_CHARSET) {\n state = STATE_LANG\n charset = tmp.substring(1)\n } else { state = STATE_VALUE }\n tmp = ''\n continue\n } else if (state === STATE_KEY &&\n (char === '*' || char === '=') &&\n res.length) {\n state = char === '*'\n ? STATE_CHARSET\n : STATE_VALUE\n res[p] = [tmp, undefined]\n tmp = ''\n continue\n } else if (!inquote && char === ';') {\n state = STATE_KEY\n if (charset) {\n if (tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n }\n charset = ''\n } else if (tmp.length) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp }\n tmp = ''\n ++p\n continue\n } else if (!inquote && (char === ' ' || char === '\\t')) { continue }\n }\n tmp += char\n }\n if (charset && tmp.length) {\n tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),\n 'binary',\n charset)\n } else if (tmp) {\n tmp = decodeText(tmp, 'binary', 'utf8')\n }\n\n if (res[p] === undefined) {\n if (tmp) { res[p] = tmp }\n } else { res[p][1] = tmp }\n\n return res\n}\n\nmodule.exports = parseParams\n","// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nconst FormData$1 = require('form-data');\nconst url = require('url');\nconst proxyFromEnv = require('proxy-from-env');\nconst http = require('http');\nconst https = require('https');\nconst util = require('util');\nconst followRedirects = require('follow-redirects');\nconst zlib = require('zlib');\nconst stream = require('stream');\nconst EventEmitter = require('events');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nconst FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);\nconst url__default = /*#__PURE__*/_interopDefaultLegacy(url);\nconst http__default = /*#__PURE__*/_interopDefaultLegacy(http);\nconst https__default = /*#__PURE__*/_interopDefaultLegacy(https);\nconst util__default = /*#__PURE__*/_interopDefaultLegacy(util);\nconst followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);\nconst zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);\nconst stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);\nconst EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nconst utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData__default[\"default\"] || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nconst InterceptorManager$1 = InterceptorManager;\n\nconst transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nconst URLSearchParams = url__default[\"default\"].URLSearchParams;\n\nconst platform$1 = {\n isNode: true,\n classes: {\n URLSearchParams,\n FormData: FormData__default[\"default\"],\n Blob: typeof Blob !== 'undefined' && Blob || null\n },\n protocols: [ 'http', 'https', 'file', 'data' ]\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nconst platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nconst defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nconst parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nconst AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nconst VERSION = \"1.6.7\";\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\nconst DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n * Parse data uri to a Buffer or Blob\n *\n * @param {String} uri\n * @param {?Boolean} asBlob\n * @param {?Object} options\n * @param {?Function} options.Blob\n *\n * @returns {Buffer|Blob}\n */\nfunction fromDataURI(uri, asBlob, options) {\n const _Blob = options && options.Blob || platform.classes.Blob;\n const protocol = parseProtocol(uri);\n\n if (asBlob === undefined && _Blob) {\n asBlob = true;\n }\n\n if (protocol === 'data') {\n uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n\n const match = DATA_URL_PATTERN.exec(uri);\n\n if (!match) {\n throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);\n }\n\n const mime = match[1];\n const isBase64 = match[2];\n const body = match[3];\n const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n\n if (asBlob) {\n if (!_Blob) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n return new _Blob([buffer], {type: mime});\n }\n\n return buffer;\n }\n\n throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);\n}\n\n/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n const threshold = 1000 / freq;\n let timer = null;\n return function throttled(force, args) {\n const now = Date.now();\n if (force || now - timestamp > threshold) {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n timestamp = now;\n return fn.apply(null, args);\n }\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n timestamp = Date.now();\n return fn.apply(null, args);\n }, threshold - (now - timestamp));\n }\n };\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nconst kInternals = Symbol('internals');\n\nclass AxiosTransformStream extends stream__default[\"default\"].Transform{\n constructor(options) {\n options = utils$1.toFlatObject(options, {\n maxRate: 0,\n chunkSize: 64 * 1024,\n minChunkSize: 100,\n timeWindow: 500,\n ticksRate: 2,\n samplesCount: 15\n }, null, (prop, source) => {\n return !utils$1.isUndefined(source[prop]);\n });\n\n super({\n readableHighWaterMark: options.chunkSize\n });\n\n const self = this;\n\n const internals = this[kInternals] = {\n length: options.length,\n timeWindow: options.timeWindow,\n ticksRate: options.ticksRate,\n chunkSize: options.chunkSize,\n maxRate: options.maxRate,\n minChunkSize: options.minChunkSize,\n bytesSeen: 0,\n isCaptured: false,\n notifiedBytesLoaded: 0,\n ts: Date.now(),\n bytes: 0,\n onReadCallback: null\n };\n\n const _speedometer = speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow);\n\n this.on('newListener', event => {\n if (event === 'progress') {\n if (!internals.isCaptured) {\n internals.isCaptured = true;\n }\n }\n });\n\n let bytesNotified = 0;\n\n internals.updateProgress = throttle(function throttledHandler() {\n const totalBytes = internals.length;\n const bytesTransferred = internals.bytesSeen;\n const progressBytes = bytesTransferred - bytesNotified;\n if (!progressBytes || self.destroyed) return;\n\n const rate = _speedometer(progressBytes);\n\n bytesNotified = bytesTransferred;\n\n process.nextTick(() => {\n self.emit('progress', {\n 'loaded': bytesTransferred,\n 'total': totalBytes,\n 'progress': totalBytes ? (bytesTransferred / totalBytes) : undefined,\n 'bytes': progressBytes,\n 'rate': rate ? rate : undefined,\n 'estimated': rate && totalBytes && bytesTransferred <= totalBytes ?\n (totalBytes - bytesTransferred) / rate : undefined\n });\n });\n }, internals.ticksRate);\n\n const onFinish = () => {\n internals.updateProgress(true);\n };\n\n this.once('end', onFinish);\n this.once('error', onFinish);\n }\n\n _read(size) {\n const internals = this[kInternals];\n\n if (internals.onReadCallback) {\n internals.onReadCallback();\n }\n\n return super._read(size);\n }\n\n _transform(chunk, encoding, callback) {\n const self = this;\n const internals = this[kInternals];\n const maxRate = internals.maxRate;\n\n const readableHighWaterMark = this.readableHighWaterMark;\n\n const timeWindow = internals.timeWindow;\n\n const divider = 1000 / timeWindow;\n const bytesThreshold = (maxRate / divider);\n const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;\n\n function pushChunk(_chunk, _callback) {\n const bytes = Buffer.byteLength(_chunk);\n internals.bytesSeen += bytes;\n internals.bytes += bytes;\n\n if (internals.isCaptured) {\n internals.updateProgress();\n }\n\n if (self.push(_chunk)) {\n process.nextTick(_callback);\n } else {\n internals.onReadCallback = () => {\n internals.onReadCallback = null;\n process.nextTick(_callback);\n };\n }\n }\n\n const transformChunk = (_chunk, _callback) => {\n const chunkSize = Buffer.byteLength(_chunk);\n let chunkRemainder = null;\n let maxChunkSize = readableHighWaterMark;\n let bytesLeft;\n let passed = 0;\n\n if (maxRate) {\n const now = Date.now();\n\n if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {\n internals.ts = now;\n bytesLeft = bytesThreshold - internals.bytes;\n internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;\n passed = 0;\n }\n\n bytesLeft = bytesThreshold - internals.bytes;\n }\n\n if (maxRate) {\n if (bytesLeft <= 0) {\n // next time window\n return setTimeout(() => {\n _callback(null, _chunk);\n }, timeWindow - passed);\n }\n\n if (bytesLeft < maxChunkSize) {\n maxChunkSize = bytesLeft;\n }\n }\n\n if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {\n chunkRemainder = _chunk.subarray(maxChunkSize);\n _chunk = _chunk.subarray(0, maxChunkSize);\n }\n\n pushChunk(_chunk, chunkRemainder ? () => {\n process.nextTick(_callback, null, chunkRemainder);\n } : _callback);\n };\n\n transformChunk(chunk, function transformNextChunk(err, _chunk) {\n if (err) {\n return callback(err);\n }\n\n if (_chunk) {\n transformChunk(_chunk, transformNextChunk);\n } else {\n callback(null);\n }\n });\n }\n\n setLength(length) {\n this[kInternals].length = +length;\n return this;\n }\n}\n\nconst AxiosTransformStream$1 = AxiosTransformStream;\n\nconst {asyncIterator} = Symbol;\n\nconst readBlob = async function* (blob) {\n if (blob.stream) {\n yield* blob.stream();\n } else if (blob.arrayBuffer) {\n yield await blob.arrayBuffer();\n } else if (blob[asyncIterator]) {\n yield* blob[asyncIterator]();\n } else {\n yield blob;\n }\n};\n\nconst readBlob$1 = readBlob;\n\nconst BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';\n\nconst textEncoder = new util.TextEncoder();\n\nconst CRLF = '\\r\\n';\nconst CRLF_BYTES = textEncoder.encode(CRLF);\nconst CRLF_BYTES_COUNT = 2;\n\nclass FormDataPart {\n constructor(name, value) {\n const {escapeName} = this.constructor;\n const isStringValue = utils$1.isString(value);\n\n let headers = `Content-Disposition: form-data; name=\"${escapeName(name)}\"${\n !isStringValue && value.name ? `; filename=\"${escapeName(value.name)}\"` : ''\n }${CRLF}`;\n\n if (isStringValue) {\n value = textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g, CRLF));\n } else {\n headers += `Content-Type: ${value.type || \"application/octet-stream\"}${CRLF}`;\n }\n\n this.headers = textEncoder.encode(headers + CRLF);\n\n this.contentLength = isStringValue ? value.byteLength : value.size;\n\n this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;\n\n this.name = name;\n this.value = value;\n }\n\n async *encode(){\n yield this.headers;\n\n const {value} = this;\n\n if(utils$1.isTypedArray(value)) {\n yield value;\n } else {\n yield* readBlob$1(value);\n }\n\n yield CRLF_BYTES;\n }\n\n static escapeName(name) {\n return String(name).replace(/[\\r\\n\"]/g, (match) => ({\n '\\r' : '%0D',\n '\\n' : '%0A',\n '\"' : '%22',\n }[match]));\n }\n}\n\nconst formDataToStream = (form, headersHandler, options) => {\n const {\n tag = 'form-data-boundary',\n size = 25,\n boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)\n } = options || {};\n\n if(!utils$1.isFormData(form)) {\n throw TypeError('FormData instance required');\n }\n\n if (boundary.length < 1 || boundary.length > 70) {\n throw Error('boundary must be 10-70 characters long')\n }\n\n const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);\n const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);\n let contentLength = footerBytes.byteLength;\n\n const parts = Array.from(form.entries()).map(([name, value]) => {\n const part = new FormDataPart(name, value);\n contentLength += part.size;\n return part;\n });\n\n contentLength += boundaryBytes.byteLength * parts.length;\n\n contentLength = utils$1.toFiniteNumber(contentLength);\n\n const computedHeaders = {\n 'Content-Type': `multipart/form-data; boundary=${boundary}`\n };\n\n if (Number.isFinite(contentLength)) {\n computedHeaders['Content-Length'] = contentLength;\n }\n\n headersHandler && headersHandler(computedHeaders);\n\n return stream.Readable.from((async function *() {\n for(const part of parts) {\n yield boundaryBytes;\n yield* part.encode();\n }\n\n yield footerBytes;\n })());\n};\n\nconst formDataToStream$1 = formDataToStream;\n\nclass ZlibHeaderTransformStream extends stream__default[\"default\"].Transform {\n __transform(chunk, encoding, callback) {\n this.push(chunk);\n callback();\n }\n\n _transform(chunk, encoding, callback) {\n if (chunk.length !== 0) {\n this._transform = this.__transform;\n\n // Add Default Compression headers if no zlib headers are present\n if (chunk[0] !== 120) { // Hex: 78\n const header = Buffer.alloc(2);\n header[0] = 120; // Hex: 78\n header[1] = 156; // Hex: 9C \n this.push(header, encoding);\n }\n }\n\n this.__transform(chunk, encoding, callback);\n }\n}\n\nconst ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;\n\nconst callbackify = (fn, reducer) => {\n return utils$1.isAsyncFn(fn) ? function (...args) {\n const cb = args.pop();\n fn.apply(this, args).then((value) => {\n try {\n reducer ? cb(null, ...reducer(value)) : cb(null, value);\n } catch (err) {\n cb(err);\n }\n }, cb);\n } : fn;\n};\n\nconst callbackify$1 = callbackify;\n\nconst zlibOptions = {\n flush: zlib__default[\"default\"].constants.Z_SYNC_FLUSH,\n finishFlush: zlib__default[\"default\"].constants.Z_SYNC_FLUSH\n};\n\nconst brotliOptions = {\n flush: zlib__default[\"default\"].constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib__default[\"default\"].constants.BROTLI_OPERATION_FLUSH\n};\n\nconst isBrotliSupported = utils$1.isFunction(zlib__default[\"default\"].createBrotliDecompress);\n\nconst {http: httpFollow, https: httpsFollow} = followRedirects__default[\"default\"];\n\nconst isHttps = /https:?/;\n\nconst supportedProtocols = platform.protocols.map(protocol => {\n return protocol + ':';\n});\n\n/**\n * If the proxy or config beforeRedirects functions are defined, call them with the options\n * object.\n *\n * @param {Object} options - The options object that was passed to the request.\n *\n * @returns {Object}\n */\nfunction dispatchBeforeRedirect(options, responseDetails) {\n if (options.beforeRedirects.proxy) {\n options.beforeRedirects.proxy(options);\n }\n if (options.beforeRedirects.config) {\n options.beforeRedirects.config(options, responseDetails);\n }\n}\n\n/**\n * If the proxy or config afterRedirects functions are defined, call them with the options\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} configProxy configuration from Axios options object\n * @param {string} location\n *\n * @returns {http.ClientRequestArgs}\n */\nfunction setProxy(options, configProxy, location) {\n let proxy = configProxy;\n if (!proxy && proxy !== false) {\n const proxyUrl = proxyFromEnv.getProxyForUrl(location);\n if (proxyUrl) {\n proxy = new URL(proxyUrl);\n }\n }\n if (proxy) {\n // Basic proxy authorization\n if (proxy.username) {\n proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');\n }\n\n if (proxy.auth) {\n // Support proxy auth object form\n if (proxy.auth.username || proxy.auth.password) {\n proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');\n }\n const base64 = Buffer\n .from(proxy.auth, 'utf8')\n .toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n options.headers.host = options.hostname + (options.port ? ':' + options.port : '');\n const proxyHost = proxy.hostname || proxy.host;\n options.hostname = proxyHost;\n // Replace 'host' since options is not a URL object\n options.host = proxyHost;\n options.port = proxy.port;\n options.path = location;\n if (proxy.protocol) {\n options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;\n }\n }\n\n options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {\n // Configure proxy for redirected request, passing the original config proxy to apply\n // the exact same logic as if the redirected request was performed by axios directly.\n setProxy(redirectOptions, configProxy, redirectOptions.href);\n };\n}\n\nconst isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process';\n\n// temporary hotfix\n\nconst wrapAsync = (asyncExecutor) => {\n return new Promise((resolve, reject) => {\n let onDone;\n let isDone;\n\n const done = (value, isRejected) => {\n if (isDone) return;\n isDone = true;\n onDone && onDone(value, isRejected);\n };\n\n const _resolve = (value) => {\n done(value);\n resolve(value);\n };\n\n const _reject = (reason) => {\n done(reason, true);\n reject(reason);\n };\n\n asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);\n })\n};\n\nconst resolveFamily = ({address, family}) => {\n if (!utils$1.isString(address)) {\n throw TypeError('address must be a string');\n }\n return ({\n address,\n family: family || (address.indexOf('.') < 0 ? 6 : 4)\n });\n};\n\nconst buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family});\n\n/*eslint consistent-return:0*/\nconst httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {\n return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {\n let {data, lookup, family} = config;\n const {responseType, responseEncoding} = config;\n const method = config.method.toUpperCase();\n let isDone;\n let rejected = false;\n let req;\n\n if (lookup) {\n const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);\n // hotfix to support opt.all option which is required for node 20.x\n lookup = (hostname, opt, cb) => {\n _lookup(hostname, opt, (err, arg0, arg1) => {\n if (err) {\n return cb(err);\n }\n\n const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];\n\n opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);\n });\n };\n }\n\n // temporary internal emitter until the AxiosRequest class will be implemented\n const emitter = new EventEmitter__default[\"default\"]();\n\n const onFinished = () => {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(abort);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', abort);\n }\n\n emitter.removeAllListeners();\n };\n\n onDone((value, isRejected) => {\n isDone = true;\n if (isRejected) {\n rejected = true;\n onFinished();\n }\n });\n\n function abort(reason) {\n emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);\n }\n\n emitter.once('abort', reject);\n\n if (config.cancelToken || config.signal) {\n config.cancelToken && config.cancelToken.subscribe(abort);\n if (config.signal) {\n config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);\n }\n }\n\n // Parse url\n const fullPath = buildFullPath(config.baseURL, config.url);\n const parsed = new URL(fullPath, 'http://localhost');\n const protocol = parsed.protocol || supportedProtocols[0];\n\n if (protocol === 'data:') {\n let convertedData;\n\n if (method !== 'GET') {\n return settle(resolve, reject, {\n status: 405,\n statusText: 'method not allowed',\n headers: {},\n config\n });\n }\n\n try {\n convertedData = fromDataURI(config.url, responseType === 'blob', {\n Blob: config.env && config.env.Blob\n });\n } catch (err) {\n throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);\n }\n\n if (responseType === 'text') {\n convertedData = convertedData.toString(responseEncoding);\n\n if (!responseEncoding || responseEncoding === 'utf8') {\n convertedData = utils$1.stripBOM(convertedData);\n }\n } else if (responseType === 'stream') {\n convertedData = stream__default[\"default\"].Readable.from(convertedData);\n }\n\n return settle(resolve, reject, {\n data: convertedData,\n status: 200,\n statusText: 'OK',\n headers: new AxiosHeaders$1(),\n config\n });\n }\n\n if (supportedProtocols.indexOf(protocol) === -1) {\n return reject(new AxiosError(\n 'Unsupported protocol ' + protocol,\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n const headers = AxiosHeaders$1.from(config.headers).normalize();\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n // User-Agent is specified; handle case where no UA header is desired\n // Only set header if it hasn't been set in config\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const onDownloadProgress = config.onDownloadProgress;\n const onUploadProgress = config.onUploadProgress;\n const maxRate = config.maxRate;\n let maxUploadRate = undefined;\n let maxDownloadRate = undefined;\n\n // support for spec compliant FormData objects\n if (utils$1.isSpecCompliantForm(data)) {\n const userBoundary = headers.getContentType(/boundary=([-_\\w\\d]{10,70})/i);\n\n data = formDataToStream$1(data, (formHeaders) => {\n headers.set(formHeaders);\n }, {\n tag: `axios-${VERSION}-boundary`,\n boundary: userBoundary && userBoundary[1] || undefined\n });\n // support for https://www.npmjs.com/package/form-data api\n } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {\n headers.set(data.getHeaders());\n\n if (!headers.hasContentLength()) {\n try {\n const knownLength = await util__default[\"default\"].promisify(data.getLength).call(data);\n Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);\n /*eslint no-empty:0*/\n } catch (e) {\n }\n }\n } else if (utils$1.isBlob(data)) {\n data.size && headers.setContentType(data.type || 'application/octet-stream');\n headers.setContentLength(data.size || 0);\n data = stream__default[\"default\"].Readable.from(readBlob$1(data));\n } else if (data && !utils$1.isStream(data)) {\n if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils$1.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(new AxiosError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers.setContentLength(data.length, false);\n\n if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {\n return reject(new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n }\n\n const contentLength = utils$1.toFiniteNumber(headers.getContentLength());\n\n if (utils$1.isArray(maxRate)) {\n maxUploadRate = maxRate[0];\n maxDownloadRate = maxRate[1];\n } else {\n maxUploadRate = maxDownloadRate = maxRate;\n }\n\n if (data && (onUploadProgress || maxUploadRate)) {\n if (!utils$1.isStream(data)) {\n data = stream__default[\"default\"].Readable.from(data, {objectMode: false});\n }\n\n data = stream__default[\"default\"].pipeline([data, new AxiosTransformStream$1({\n length: contentLength,\n maxRate: utils$1.toFiniteNumber(maxUploadRate)\n })], utils$1.noop);\n\n onUploadProgress && data.on('progress', progress => {\n onUploadProgress(Object.assign(progress, {\n upload: true\n }));\n });\n }\n\n // HTTP basic authentication\n let auth = undefined;\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n if (!auth && parsed.username) {\n const urlUsername = parsed.username;\n const urlPassword = parsed.password;\n auth = urlUsername + ':' + urlPassword;\n }\n\n auth && headers.delete('authorization');\n\n let path;\n\n try {\n path = buildURL(\n parsed.pathname + parsed.search,\n config.params,\n config.paramsSerializer\n ).replace(/^\\?/, '');\n } catch (err) {\n const customErr = new Error(err.message);\n customErr.config = config;\n customErr.url = config.url;\n customErr.exists = true;\n return reject(customErr);\n }\n\n headers.set(\n 'Accept-Encoding',\n 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false\n );\n\n const options = {\n path,\n method: method,\n headers: headers.toJSON(),\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth,\n protocol,\n family,\n beforeRedirect: dispatchBeforeRedirect,\n beforeRedirects: {}\n };\n\n // cacheable-lookup integration hotfix\n !utils$1.isUndefined(lookup) && (options.lookup = lookup);\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname;\n options.port = parsed.port;\n setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n let transport;\n const isHttpsRequest = isHttps.test(options.protocol);\n options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsRequest ? https__default[\"default\"] : http__default[\"default\"];\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n if (config.beforeRedirect) {\n options.beforeRedirects.config = config.beforeRedirect;\n }\n transport = isHttpsRequest ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n } else {\n // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited\n options.maxBodyLength = Infinity;\n }\n\n if (config.insecureHTTPParser) {\n options.insecureHTTPParser = config.insecureHTTPParser;\n }\n\n // Create the request\n req = transport.request(options, function handleResponse(res) {\n if (req.destroyed) return;\n\n const streams = [res];\n\n const responseLength = +res.headers['content-length'];\n\n if (onDownloadProgress) {\n const transformStream = new AxiosTransformStream$1({\n length: utils$1.toFiniteNumber(responseLength),\n maxRate: utils$1.toFiniteNumber(maxDownloadRate)\n });\n\n onDownloadProgress && transformStream.on('progress', progress => {\n onDownloadProgress(Object.assign(progress, {\n download: true\n }));\n });\n\n streams.push(transformStream);\n }\n\n // decompress the response body transparently if required\n let responseStream = res;\n\n // return the last request in case of redirects\n const lastRequest = res.req || req;\n\n // if decompress disabled we should not decompress\n if (config.decompress !== false && res.headers['content-encoding']) {\n // if no content, but headers still say that it is encoded,\n // remove the header not confuse downstream operations\n if (method === 'HEAD' || res.statusCode === 204) {\n delete res.headers['content-encoding'];\n }\n\n switch ((res.headers['content-encoding'] || '').toLowerCase()) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'x-gzip':\n case 'compress':\n case 'x-compress':\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib__default[\"default\"].createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'deflate':\n streams.push(new ZlibHeaderTransformStream$1());\n\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib__default[\"default\"].createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'br':\n if (isBrotliSupported) {\n streams.push(zlib__default[\"default\"].createBrotliDecompress(brotliOptions));\n delete res.headers['content-encoding'];\n }\n }\n }\n\n responseStream = streams.length > 1 ? stream__default[\"default\"].pipeline(streams, utils$1.noop) : streams[0];\n\n const offListeners = stream__default[\"default\"].finished(responseStream, () => {\n offListeners();\n onFinished();\n });\n\n const response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: new AxiosHeaders$1(res.headers),\n config,\n request: lastRequest\n };\n\n if (responseType === 'stream') {\n response.data = responseStream;\n settle(resolve, reject, response);\n } else {\n const responseBuffer = [];\n let totalResponseBytes = 0;\n\n responseStream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n // stream.destroy() emit aborted event before calling reject() on Node.js v16\n rejected = true;\n responseStream.destroy();\n reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE, config, lastRequest));\n }\n });\n\n responseStream.on('aborted', function handlerStreamAborted() {\n if (rejected) {\n return;\n }\n\n const err = new AxiosError(\n 'maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n lastRequest\n );\n responseStream.destroy(err);\n reject(err);\n });\n\n responseStream.on('error', function handleStreamError(err) {\n if (req.destroyed) return;\n reject(AxiosError.from(err, null, config, lastRequest));\n });\n\n responseStream.on('end', function handleStreamEnd() {\n try {\n let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);\n if (responseType !== 'arraybuffer') {\n responseData = responseData.toString(responseEncoding);\n if (!responseEncoding || responseEncoding === 'utf8') {\n responseData = utils$1.stripBOM(responseData);\n }\n }\n response.data = responseData;\n } catch (err) {\n return reject(AxiosError.from(err, null, config, response.request, response));\n }\n settle(resolve, reject, response);\n });\n }\n\n emitter.once('abort', err => {\n if (!responseStream.destroyed) {\n responseStream.emit('error', err);\n responseStream.destroy();\n }\n });\n });\n\n emitter.once('abort', err => {\n reject(err);\n req.destroy(err);\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n // @todo remove\n // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;\n reject(AxiosError.from(err, null, config, req));\n });\n\n // set tcp keep alive to prevent drop connection by peer\n req.on('socket', function handleRequestSocket(socket) {\n // default interval of sending ack packet is 1 minute\n socket.setKeepAlive(true, 1000 * 60);\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n const timeout = parseInt(config.timeout, 10);\n\n if (Number.isNaN(timeout)) {\n reject(new AxiosError(\n 'error trying to parse `config.timeout` to int',\n AxiosError.ERR_BAD_OPTION_VALUE,\n config,\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devouring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n if (isDone) return;\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n req\n ));\n abort();\n });\n }\n\n\n // Send the request\n if (utils$1.isStream(data)) {\n let ended = false;\n let errored = false;\n\n data.on('end', () => {\n ended = true;\n });\n\n data.once('error', err => {\n errored = true;\n req.destroy(err);\n });\n\n data.on('close', () => {\n if (!ended && !errored) {\n abort(new CanceledError('Request stream has been aborted', config, req));\n }\n });\n\n data.pipe(req);\n } else {\n req.end(data);\n }\n });\n};\n\nconst cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\nconst isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nconst xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nconst adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nconst validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nconst Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nconst CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nconst HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","/**\n * SSR Window 4.0.2\n * Better handling for window object in SSR environment\n * https://github.com/nolimits4web/ssr-window\n *\n * Copyright 2021, Vladimir Kharlampidi\n *\n * Licensed under MIT\n *\n * Released on: December 13, 2021\n */\n/* eslint-disable no-param-reassign */\nfunction isObject(obj) {\n return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;\n}\nfunction extend(target, src) {\n if (target === void 0) {\n target = {};\n }\n if (src === void 0) {\n src = {};\n }\n Object.keys(src).forEach(key => {\n if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {\n extend(target[key], src[key]);\n }\n });\n}\nconst ssrDocument = {\n body: {},\n addEventListener() {},\n removeEventListener() {},\n activeElement: {\n blur() {},\n nodeName: ''\n },\n querySelector() {\n return null;\n },\n querySelectorAll() {\n return [];\n },\n getElementById() {\n return null;\n },\n createEvent() {\n return {\n initEvent() {}\n };\n },\n createElement() {\n return {\n children: [],\n childNodes: [],\n style: {},\n setAttribute() {},\n getElementsByTagName() {\n return [];\n }\n };\n },\n createElementNS() {\n return {};\n },\n importNode() {\n return null;\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n }\n};\nfunction getDocument() {\n const doc = typeof document !== 'undefined' ? document : {};\n extend(doc, ssrDocument);\n return doc;\n}\nconst ssrWindow = {\n document: ssrDocument,\n navigator: {\n userAgent: ''\n },\n location: {\n hash: '',\n host: '',\n hostname: '',\n href: '',\n origin: '',\n pathname: '',\n protocol: '',\n search: ''\n },\n history: {\n replaceState() {},\n pushState() {},\n go() {},\n back() {}\n },\n CustomEvent: function CustomEvent() {\n return this;\n },\n addEventListener() {},\n removeEventListener() {},\n getComputedStyle() {\n return {\n getPropertyValue() {\n return '';\n }\n };\n },\n Image() {},\n Date() {},\n screen: {},\n setTimeout() {},\n clearTimeout() {},\n matchMedia() {\n return {};\n },\n requestAnimationFrame(callback) {\n if (typeof setTimeout === 'undefined') {\n callback();\n return null;\n }\n return setTimeout(callback, 0);\n },\n cancelAnimationFrame(id) {\n if (typeof setTimeout === 'undefined') {\n return;\n }\n clearTimeout(id);\n }\n};\nfunction getWindow() {\n const win = typeof window !== 'undefined' ? window : {};\n extend(win, ssrWindow);\n return win;\n}\n\nexport { getWindow as a, getDocument as g };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\n\nfunction classesToTokens(classes) {\n if (classes === void 0) {\n classes = '';\n }\n return classes.trim().split(' ').filter(c => !!c.trim());\n}\n\nfunction deleteProps(obj) {\n const object = obj;\n Object.keys(object).forEach(key => {\n try {\n object[key] = null;\n } catch (e) {\n // no getter for object\n }\n try {\n delete object[key];\n } catch (e) {\n // something got wrong\n }\n });\n}\nfunction nextTick(callback, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setTimeout(callback, delay);\n}\nfunction now() {\n return Date.now();\n}\nfunction getComputedStyle(el) {\n const window = getWindow();\n let style;\n if (window.getComputedStyle) {\n style = window.getComputedStyle(el, null);\n }\n if (!style && el.currentStyle) {\n style = el.currentStyle;\n }\n if (!style) {\n style = el.style;\n }\n return style;\n}\nfunction getTranslate(el, axis) {\n if (axis === void 0) {\n axis = 'x';\n }\n const window = getWindow();\n let matrix;\n let curTransform;\n let transformMatrix;\n const curStyle = getComputedStyle(el);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;\n // Crazy IE10 Matrix\n else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);\n // Normal Browsers\n else curTransform = parseFloat(matrix[5]);\n }\n return curTransform || 0;\n}\nfunction isObject(o) {\n return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';\n}\nfunction isNode(node) {\n // eslint-disable-next-line\n if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {\n return node instanceof HTMLElement;\n }\n return node && (node.nodeType === 1 || node.nodeType === 11);\n}\nfunction extend() {\n const to = Object(arguments.length <= 0 ? undefined : arguments[0]);\n const noExtend = ['__proto__', 'constructor', 'prototype'];\n for (let i = 1; i < arguments.length; i += 1) {\n const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];\n if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {\n const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {\n to[nextKey] = {};\n if (nextSource[nextKey].__swiper__) {\n to[nextKey] = nextSource[nextKey];\n } else {\n extend(to[nextKey], nextSource[nextKey]);\n }\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n}\nfunction setCSSProperty(el, varName, varValue) {\n el.style.setProperty(varName, varValue);\n}\nfunction animateCSSModeScroll(_ref) {\n let {\n swiper,\n targetPosition,\n side\n } = _ref;\n const window = getWindow();\n const startPosition = -swiper.translate;\n let startTime = null;\n let time;\n const duration = swiper.params.speed;\n swiper.wrapperEl.style.scrollSnapType = 'none';\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n const dir = targetPosition > startPosition ? 'next' : 'prev';\n const isOutOfBound = (current, target) => {\n return dir === 'next' && current >= target || dir === 'prev' && current <= target;\n };\n const animate = () => {\n time = new Date().getTime();\n if (startTime === null) {\n startTime = time;\n }\n const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;\n let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);\n if (isOutOfBound(currentPosition, targetPosition)) {\n currentPosition = targetPosition;\n }\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n if (isOutOfBound(currentPosition, targetPosition)) {\n swiper.wrapperEl.style.overflow = 'hidden';\n swiper.wrapperEl.style.scrollSnapType = '';\n setTimeout(() => {\n swiper.wrapperEl.style.overflow = '';\n swiper.wrapperEl.scrollTo({\n [side]: currentPosition\n });\n });\n window.cancelAnimationFrame(swiper.cssModeFrameID);\n return;\n }\n swiper.cssModeFrameID = window.requestAnimationFrame(animate);\n };\n animate();\n}\nfunction getSlideTransformEl(slideEl) {\n return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl;\n}\nfunction elementChildren(element, selector) {\n if (selector === void 0) {\n selector = '';\n }\n return [...element.children].filter(el => el.matches(selector));\n}\nfunction showWarning(text) {\n try {\n console.warn(text);\n return;\n } catch (err) {\n // err\n }\n}\nfunction createElement(tag, classes) {\n if (classes === void 0) {\n classes = [];\n }\n const el = document.createElement(tag);\n el.classList.add(...(Array.isArray(classes) ? classes : classesToTokens(classes)));\n return el;\n}\nfunction elementOffset(el) {\n const window = getWindow();\n const document = getDocument();\n const box = el.getBoundingClientRect();\n const body = document.body;\n const clientTop = el.clientTop || body.clientTop || 0;\n const clientLeft = el.clientLeft || body.clientLeft || 0;\n const scrollTop = el === window ? window.scrollY : el.scrollTop;\n const scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: box.top + scrollTop - clientTop,\n left: box.left + scrollLeft - clientLeft\n };\n}\nfunction elementPrevAll(el, selector) {\n const prevEls = [];\n while (el.previousElementSibling) {\n const prev = el.previousElementSibling; // eslint-disable-line\n if (selector) {\n if (prev.matches(selector)) prevEls.push(prev);\n } else prevEls.push(prev);\n el = prev;\n }\n return prevEls;\n}\nfunction elementNextAll(el, selector) {\n const nextEls = [];\n while (el.nextElementSibling) {\n const next = el.nextElementSibling; // eslint-disable-line\n if (selector) {\n if (next.matches(selector)) nextEls.push(next);\n } else nextEls.push(next);\n el = next;\n }\n return nextEls;\n}\nfunction elementStyle(el, prop) {\n const window = getWindow();\n return window.getComputedStyle(el, null).getPropertyValue(prop);\n}\nfunction elementIndex(el) {\n let child = el;\n let i;\n if (child) {\n i = 0;\n // eslint-disable-next-line\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) i += 1;\n }\n return i;\n }\n return undefined;\n}\nfunction elementParents(el, selector) {\n const parents = []; // eslint-disable-line\n let parent = el.parentElement; // eslint-disable-line\n while (parent) {\n if (selector) {\n if (parent.matches(selector)) parents.push(parent);\n } else {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\nfunction elementTransitionEnd(el, callback) {\n function fireCallBack(e) {\n if (e.target !== el) return;\n callback.call(el, e);\n el.removeEventListener('transitionend', fireCallBack);\n }\n if (callback) {\n el.addEventListener('transitionend', fireCallBack);\n }\n}\nfunction elementOuterSize(el, size, includeMargins) {\n const window = getWindow();\n if (includeMargins) {\n return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom'));\n }\n return el.offsetWidth;\n}\nfunction makeElementsArray(el) {\n return (Array.isArray(el) ? el : [el]).filter(e => !!e);\n}\n\nexport { elementParents as a, elementOffset as b, createElement as c, now as d, elementChildren as e, elementOuterSize as f, getSlideTransformEl as g, elementIndex as h, classesToTokens as i, getTranslate as j, elementTransitionEnd as k, isObject as l, makeElementsArray as m, nextTick as n, elementStyle as o, elementNextAll as p, elementPrevAll as q, animateCSSModeScroll as r, setCSSProperty as s, showWarning as t, extend as u, deleteProps as v };\n","import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';\nimport { a as elementParents, o as elementStyle, e as elementChildren, s as setCSSProperty, f as elementOuterSize, p as elementNextAll, q as elementPrevAll, j as getTranslate, r as animateCSSModeScroll, n as nextTick, t as showWarning, c as createElement, d as now, u as extend, h as elementIndex, v as deleteProps } from './utils.mjs';\n\nlet support;\nfunction calcSupport() {\n const window = getWindow();\n const document = getDocument();\n return {\n smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style,\n touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)\n };\n}\nfunction getSupport() {\n if (!support) {\n support = calcSupport();\n }\n return support;\n}\n\nlet deviceCached;\nfunction calcDevice(_temp) {\n let {\n userAgent\n } = _temp === void 0 ? {} : _temp;\n const support = getSupport();\n const window = getWindow();\n const platform = window.navigator.platform;\n const ua = userAgent || window.navigator.userAgent;\n const device = {\n ios: false,\n android: false\n };\n const screenWidth = window.screen.width;\n const screenHeight = window.screen.height;\n const android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/); // eslint-disable-line\n let ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n const ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n const iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n const windows = platform === 'Win32';\n let macos = platform === 'MacIntel';\n\n // iPadOs 13 fix\n const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];\n if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {\n ipad = ua.match(/(Version)\\/([\\d.]+)/);\n if (!ipad) ipad = [0, 1, '13_0_0'];\n macos = false;\n }\n\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.android = true;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n\n // Export object\n return device;\n}\nfunction getDevice(overrides) {\n if (overrides === void 0) {\n overrides = {};\n }\n if (!deviceCached) {\n deviceCached = calcDevice(overrides);\n }\n return deviceCached;\n}\n\nlet browser;\nfunction calcBrowser() {\n const window = getWindow();\n const device = getDevice();\n let needPerspectiveFix = false;\n function isSafari() {\n const ua = window.navigator.userAgent.toLowerCase();\n return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;\n }\n if (isSafari()) {\n const ua = String(window.navigator.userAgent);\n if (ua.includes('Version/')) {\n const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));\n needPerspectiveFix = major < 16 || major === 16 && minor < 2;\n }\n }\n const isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent);\n const isSafariBrowser = isSafari();\n const need3dFix = isSafariBrowser || isWebView && device.ios;\n return {\n isSafari: needPerspectiveFix || isSafariBrowser,\n needPerspectiveFix,\n need3dFix,\n isWebView\n };\n}\nfunction getBrowser() {\n if (!browser) {\n browser = calcBrowser();\n }\n return browser;\n}\n\nfunction Resize(_ref) {\n let {\n swiper,\n on,\n emit\n } = _ref;\n const window = getWindow();\n let observer = null;\n let animationFrame = null;\n const resizeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('beforeResize');\n emit('resize');\n };\n const createObserver = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n observer = new ResizeObserver(entries => {\n animationFrame = window.requestAnimationFrame(() => {\n const {\n width,\n height\n } = swiper;\n let newWidth = width;\n let newHeight = height;\n entries.forEach(_ref2 => {\n let {\n contentBoxSize,\n contentRect,\n target\n } = _ref2;\n if (target && target !== swiper.el) return;\n newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;\n newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;\n });\n if (newWidth !== width || newHeight !== height) {\n resizeHandler();\n }\n });\n });\n observer.observe(swiper.el);\n };\n const removeObserver = () => {\n if (animationFrame) {\n window.cancelAnimationFrame(animationFrame);\n }\n if (observer && observer.unobserve && swiper.el) {\n observer.unobserve(swiper.el);\n observer = null;\n }\n };\n const orientationChangeHandler = () => {\n if (!swiper || swiper.destroyed || !swiper.initialized) return;\n emit('orientationchange');\n };\n on('init', () => {\n if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {\n createObserver();\n return;\n }\n window.addEventListener('resize', resizeHandler);\n window.addEventListener('orientationchange', orientationChangeHandler);\n });\n on('destroy', () => {\n removeObserver();\n window.removeEventListener('resize', resizeHandler);\n window.removeEventListener('orientationchange', orientationChangeHandler);\n });\n}\n\nfunction Observer(_ref) {\n let {\n swiper,\n extendParams,\n on,\n emit\n } = _ref;\n const observers = [];\n const window = getWindow();\n const attach = function (target, options) {\n if (options === void 0) {\n options = {};\n }\n const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n const observer = new ObserverFunc(mutations => {\n // The observerUpdate event should only be triggered\n // once despite the number of mutations. Additional\n // triggers are redundant and are very costly\n if (swiper.__preventObserver__) return;\n if (mutations.length === 1) {\n emit('observerUpdate', mutations[0]);\n return;\n }\n const observerUpdate = function observerUpdate() {\n emit('observerUpdate', mutations[0]);\n };\n if (window.requestAnimationFrame) {\n window.requestAnimationFrame(observerUpdate);\n } else {\n window.setTimeout(observerUpdate, 0);\n }\n });\n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n observers.push(observer);\n };\n const init = () => {\n if (!swiper.params.observer) return;\n if (swiper.params.observeParents) {\n const containerParents = elementParents(swiper.hostEl);\n for (let i = 0; i < containerParents.length; i += 1) {\n attach(containerParents[i]);\n }\n }\n // Observe container\n attach(swiper.hostEl, {\n childList: swiper.params.observeSlideChildren\n });\n\n // Observe wrapper\n attach(swiper.wrapperEl, {\n attributes: false\n });\n };\n const destroy = () => {\n observers.forEach(observer => {\n observer.disconnect();\n });\n observers.splice(0, observers.length);\n };\n extendParams({\n observer: false,\n observeParents: false,\n observeSlideChildren: false\n });\n on('init', init);\n on('destroy', destroy);\n}\n\n/* eslint-disable no-underscore-dangle */\n\nvar eventsEmitter = {\n on(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n events.split(' ').forEach(event => {\n if (!self.eventsListeners[event]) self.eventsListeners[event] = [];\n self.eventsListeners[event][method](handler);\n });\n return self;\n },\n once(events, handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n function onceHandler() {\n self.off(events, onceHandler);\n if (onceHandler.__emitterProxy) {\n delete onceHandler.__emitterProxy;\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n handler.apply(self, args);\n }\n onceHandler.__emitterProxy = handler;\n return self.on(events, onceHandler, priority);\n },\n onAny(handler, priority) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (typeof handler !== 'function') return self;\n const method = priority ? 'unshift' : 'push';\n if (self.eventsAnyListeners.indexOf(handler) < 0) {\n self.eventsAnyListeners[method](handler);\n }\n return self;\n },\n offAny(handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsAnyListeners) return self;\n const index = self.eventsAnyListeners.indexOf(handler);\n if (index >= 0) {\n self.eventsAnyListeners.splice(index, 1);\n }\n return self;\n },\n off(events, handler) {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n events.split(' ').forEach(event => {\n if (typeof handler === 'undefined') {\n self.eventsListeners[event] = [];\n } else if (self.eventsListeners[event]) {\n self.eventsListeners[event].forEach((eventHandler, index) => {\n if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {\n self.eventsListeners[event].splice(index, 1);\n }\n });\n }\n });\n return self;\n },\n emit() {\n const self = this;\n if (!self.eventsListeners || self.destroyed) return self;\n if (!self.eventsListeners) return self;\n let events;\n let data;\n let context;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (typeof args[0] === 'string' || Array.isArray(args[0])) {\n events = args[0];\n data = args.slice(1, args.length);\n context = self;\n } else {\n events = args[0].events;\n data = args[0].data;\n context = args[0].context || self;\n }\n data.unshift(context);\n const eventsArray = Array.isArray(events) ? events : events.split(' ');\n eventsArray.forEach(event => {\n if (self.eventsAnyListeners && self.eventsAnyListeners.length) {\n self.eventsAnyListeners.forEach(eventHandler => {\n eventHandler.apply(context, [event, ...data]);\n });\n }\n if (self.eventsListeners && self.eventsListeners[event]) {\n self.eventsListeners[event].forEach(eventHandler => {\n eventHandler.apply(context, data);\n });\n }\n });\n return self;\n }\n};\n\nfunction updateSize() {\n const swiper = this;\n let width;\n let height;\n const el = swiper.el;\n if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {\n width = swiper.params.width;\n } else {\n width = el.clientWidth;\n }\n if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {\n height = swiper.params.height;\n } else {\n height = el.clientHeight;\n }\n if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {\n return;\n }\n\n // Subtract paddings\n width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);\n height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);\n if (Number.isNaN(width)) width = 0;\n if (Number.isNaN(height)) height = 0;\n Object.assign(swiper, {\n width,\n height,\n size: swiper.isHorizontal() ? width : height\n });\n}\n\nfunction updateSlides() {\n const swiper = this;\n function getDirectionPropertyValue(node, label) {\n return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0);\n }\n const params = swiper.params;\n const {\n wrapperEl,\n slidesEl,\n size: swiperSize,\n rtlTranslate: rtl,\n wrongRTL\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;\n const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);\n const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;\n let snapGrid = [];\n const slidesGrid = [];\n const slidesSizesGrid = [];\n let offsetBefore = params.slidesOffsetBefore;\n if (typeof offsetBefore === 'function') {\n offsetBefore = params.slidesOffsetBefore.call(swiper);\n }\n let offsetAfter = params.slidesOffsetAfter;\n if (typeof offsetAfter === 'function') {\n offsetAfter = params.slidesOffsetAfter.call(swiper);\n }\n const previousSnapGridLength = swiper.snapGrid.length;\n const previousSlidesGridLength = swiper.slidesGrid.length;\n let spaceBetween = params.spaceBetween;\n let slidePosition = -offsetBefore;\n let prevSlideSize = 0;\n let index = 0;\n if (typeof swiperSize === 'undefined') {\n return;\n }\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n swiper.virtualSize = -spaceBetween;\n\n // reset margins\n slides.forEach(slideEl => {\n if (rtl) {\n slideEl.style.marginLeft = '';\n } else {\n slideEl.style.marginRight = '';\n }\n slideEl.style.marginBottom = '';\n slideEl.style.marginTop = '';\n });\n\n // reset cssMode offsets\n if (params.centeredSlides && params.cssMode) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');\n }\n const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;\n if (gridEnabled) {\n swiper.grid.initSlides(slides);\n } else if (swiper.grid) {\n swiper.grid.unsetSlides();\n }\n\n // Calc slides\n let slideSize;\n const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {\n return typeof params.breakpoints[key].slidesPerView !== 'undefined';\n }).length > 0;\n for (let i = 0; i < slidesLength; i += 1) {\n slideSize = 0;\n let slide;\n if (slides[i]) slide = slides[i];\n if (gridEnabled) {\n swiper.grid.updateSlide(i, slide, slides);\n }\n if (slides[i] && elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line\n\n if (params.slidesPerView === 'auto') {\n if (shouldResetSlideSize) {\n slides[i].style[swiper.getDirectionLabel('width')] = ``;\n }\n const slideStyles = getComputedStyle(slide);\n const currentTransform = slide.style.transform;\n const currentWebKitTransform = slide.style.webkitTransform;\n if (currentTransform) {\n slide.style.transform = 'none';\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = 'none';\n }\n if (params.roundLengths) {\n slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width', true) : elementOuterSize(slide, 'height', true);\n } else {\n // eslint-disable-next-line\n const width = getDirectionPropertyValue(slideStyles, 'width');\n const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');\n const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');\n const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');\n const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');\n const boxSizing = slideStyles.getPropertyValue('box-sizing');\n if (boxSizing && boxSizing === 'border-box') {\n slideSize = width + marginLeft + marginRight;\n } else {\n const {\n clientWidth,\n offsetWidth\n } = slide;\n slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);\n }\n }\n if (currentTransform) {\n slide.style.transform = currentTransform;\n }\n if (currentWebKitTransform) {\n slide.style.webkitTransform = currentWebKitTransform;\n }\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n } else {\n slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;\n if (params.roundLengths) slideSize = Math.floor(slideSize);\n if (slides[i]) {\n slides[i].style[swiper.getDirectionLabel('width')] = `${slideSize}px`;\n }\n }\n if (slides[i]) {\n slides[i].swiperSlideSize = slideSize;\n }\n slidesSizesGrid.push(slideSize);\n if (params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n } else {\n if (params.roundLengths) slidePosition = Math.floor(slidePosition);\n if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);\n slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n swiper.virtualSize += slideSize + spaceBetween;\n prevSlideSize = slideSize;\n index += 1;\n }\n swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;\n if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {\n wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (params.setWrapperSize) {\n wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;\n }\n if (gridEnabled) {\n swiper.grid.updateWrapperSize(slideSize, snapGrid);\n }\n\n // Remove last grid elements depending on width\n if (!params.centeredSlides) {\n const newSlidesGrid = [];\n for (let i = 0; i < snapGrid.length; i += 1) {\n let slidesGridItem = snapGrid[i];\n if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);\n if (snapGrid[i] <= swiper.virtualSize - swiperSize) {\n newSlidesGrid.push(slidesGridItem);\n }\n }\n snapGrid = newSlidesGrid;\n if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {\n snapGrid.push(swiper.virtualSize - swiperSize);\n }\n }\n if (isVirtual && params.loop) {\n const size = slidesSizesGrid[0] + spaceBetween;\n if (params.slidesPerGroup > 1) {\n const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);\n const groupSize = size * params.slidesPerGroup;\n for (let i = 0; i < groups; i += 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);\n }\n }\n for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {\n if (params.slidesPerGroup === 1) {\n snapGrid.push(snapGrid[snapGrid.length - 1] + size);\n }\n slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);\n swiper.virtualSize += size;\n }\n }\n if (snapGrid.length === 0) snapGrid = [0];\n if (spaceBetween !== 0) {\n const key = swiper.isHorizontal() && rtl ? 'marginLeft' : swiper.getDirectionLabel('marginRight');\n slides.filter((_, slideIndex) => {\n if (!params.cssMode || params.loop) return true;\n if (slideIndex === slides.length - 1) {\n return false;\n }\n return true;\n }).forEach(slideEl => {\n slideEl.style[key] = `${spaceBetween}px`;\n });\n }\n if (params.centeredSlides && params.centeredSlidesBounds) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n const maxSnap = allSlidesSize - swiperSize;\n snapGrid = snapGrid.map(snap => {\n if (snap <= 0) return -offsetBefore;\n if (snap > maxSnap) return maxSnap + offsetAfter;\n return snap;\n });\n }\n if (params.centerInsufficientSlides) {\n let allSlidesSize = 0;\n slidesSizesGrid.forEach(slideSizeValue => {\n allSlidesSize += slideSizeValue + (spaceBetween || 0);\n });\n allSlidesSize -= spaceBetween;\n if (allSlidesSize < swiperSize) {\n const allSlidesOffset = (swiperSize - allSlidesSize) / 2;\n snapGrid.forEach((snap, snapIndex) => {\n snapGrid[snapIndex] = snap - allSlidesOffset;\n });\n slidesGrid.forEach((snap, snapIndex) => {\n slidesGrid[snapIndex] = snap + allSlidesOffset;\n });\n }\n }\n Object.assign(swiper, {\n slides,\n snapGrid,\n slidesGrid,\n slidesSizesGrid\n });\n if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {\n setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);\n setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);\n const addToSnapGrid = -swiper.snapGrid[0];\n const addToSlidesGrid = -swiper.slidesGrid[0];\n swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);\n swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);\n }\n if (slidesLength !== previousSlidesLength) {\n swiper.emit('slidesLengthChange');\n }\n if (snapGrid.length !== previousSnapGridLength) {\n if (swiper.params.watchOverflow) swiper.checkOverflow();\n swiper.emit('snapGridLengthChange');\n }\n if (slidesGrid.length !== previousSlidesGridLength) {\n swiper.emit('slidesGridLengthChange');\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n swiper.emit('slidesUpdated');\n if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {\n const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;\n const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);\n if (slidesLength <= params.maxBackfaceHiddenSlides) {\n if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);\n } else if (hasClassBackfaceClassAdded) {\n swiper.el.classList.remove(backFaceHiddenClass);\n }\n }\n}\n\nfunction updateAutoHeight(speed) {\n const swiper = this;\n const activeSlides = [];\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n let newHeight = 0;\n let i;\n if (typeof speed === 'number') {\n swiper.setTransition(speed);\n } else if (speed === true) {\n swiper.setTransition(swiper.params.speed);\n }\n const getSlideByIndex = index => {\n if (isVirtual) {\n return swiper.slides[swiper.getSlideIndexByData(index)];\n }\n return swiper.slides[index];\n };\n // Find slides currently in view\n if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {\n if (swiper.params.centeredSlides) {\n (swiper.visibleSlides || []).forEach(slide => {\n activeSlides.push(slide);\n });\n } else {\n for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {\n const index = swiper.activeIndex + i;\n if (index > swiper.slides.length && !isVirtual) break;\n activeSlides.push(getSlideByIndex(index));\n }\n }\n } else {\n activeSlides.push(getSlideByIndex(swiper.activeIndex));\n }\n\n // Find new height from highest slide in view\n for (i = 0; i < activeSlides.length; i += 1) {\n if (typeof activeSlides[i] !== 'undefined') {\n const height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n\n // Update Height\n if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;\n}\n\nfunction updateSlidesOffset() {\n const swiper = this;\n const slides = swiper.slides;\n // eslint-disable-next-line\n const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;\n for (let i = 0; i < slides.length; i += 1) {\n slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();\n }\n}\n\nfunction updateSlidesProgress(translate) {\n if (translate === void 0) {\n translate = this && this.translate || 0;\n }\n const swiper = this;\n const params = swiper.params;\n const {\n slides,\n rtlTranslate: rtl,\n snapGrid\n } = swiper;\n if (slides.length === 0) return;\n if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();\n let offsetCenter = -translate;\n if (rtl) offsetCenter = translate;\n\n // Visible Slides\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass);\n });\n swiper.visibleSlidesIndexes = [];\n swiper.visibleSlides = [];\n let spaceBetween = params.spaceBetween;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;\n } else if (typeof spaceBetween === 'string') {\n spaceBetween = parseFloat(spaceBetween);\n }\n for (let i = 0; i < slides.length; i += 1) {\n const slide = slides[i];\n let slideOffset = slide.swiperSlideOffset;\n if (params.cssMode && params.centeredSlides) {\n slideOffset -= slides[0].swiperSlideOffset;\n }\n const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);\n const slideBefore = -(offsetCenter - slideOffset);\n const slideAfter = slideBefore + swiper.slidesSizesGrid[i];\n const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i];\n const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;\n if (isVisible) {\n swiper.visibleSlides.push(slide);\n swiper.visibleSlidesIndexes.push(i);\n slides[i].classList.add(params.slideVisibleClass);\n }\n if (isFullyVisible) {\n slides[i].classList.add(params.slideFullyVisibleClass);\n }\n slide.progress = rtl ? -slideProgress : slideProgress;\n slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;\n }\n}\n\nfunction updateProgress(translate) {\n const swiper = this;\n if (typeof translate === 'undefined') {\n const multiplier = swiper.rtlTranslate ? -1 : 1;\n // eslint-disable-next-line\n translate = swiper && swiper.translate && swiper.translate * multiplier || 0;\n }\n const params = swiper.params;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n let {\n progress,\n isBeginning,\n isEnd,\n progressLoop\n } = swiper;\n const wasBeginning = isBeginning;\n const wasEnd = isEnd;\n if (translatesDiff === 0) {\n progress = 0;\n isBeginning = true;\n isEnd = true;\n } else {\n progress = (translate - swiper.minTranslate()) / translatesDiff;\n const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;\n const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;\n isBeginning = isBeginningRounded || progress <= 0;\n isEnd = isEndRounded || progress >= 1;\n if (isBeginningRounded) progress = 0;\n if (isEndRounded) progress = 1;\n }\n if (params.loop) {\n const firstSlideIndex = swiper.getSlideIndexByData(0);\n const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);\n const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];\n const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];\n const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];\n const translateAbs = Math.abs(translate);\n if (translateAbs >= firstSlideTranslate) {\n progressLoop = (translateAbs - firstSlideTranslate) / translateMax;\n } else {\n progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;\n }\n if (progressLoop > 1) progressLoop -= 1;\n }\n Object.assign(swiper, {\n progress,\n progressLoop,\n isBeginning,\n isEnd\n });\n if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);\n if (isBeginning && !wasBeginning) {\n swiper.emit('reachBeginning toEdge');\n }\n if (isEnd && !wasEnd) {\n swiper.emit('reachEnd toEdge');\n }\n if (wasBeginning && !isBeginning || wasEnd && !isEnd) {\n swiper.emit('fromEdge');\n }\n swiper.emit('progress', progress);\n}\n\nfunction updateSlidesClasses() {\n const swiper = this;\n const {\n slides,\n params,\n slidesEl,\n activeIndex\n } = swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n const getFilteredSlide = selector => {\n return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];\n };\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n });\n let activeSlide;\n let prevSlide;\n let nextSlide;\n if (isVirtual) {\n if (params.loop) {\n let slideIndex = activeIndex - swiper.virtual.slidesBefore;\n if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;\n if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${slideIndex}\"]`);\n } else {\n activeSlide = getFilteredSlide(`[data-swiper-slide-index=\"${activeIndex}\"]`);\n }\n } else {\n if (gridEnabled) {\n activeSlide = slides.filter(slideEl => slideEl.column === activeIndex)[0];\n nextSlide = slides.filter(slideEl => slideEl.column === activeIndex + 1)[0];\n prevSlide = slides.filter(slideEl => slideEl.column === activeIndex - 1)[0];\n } else {\n activeSlide = slides[activeIndex];\n }\n }\n if (activeSlide) {\n // Active classes\n activeSlide.classList.add(params.slideActiveClass);\n if (gridEnabled) {\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n } else {\n // Next Slide\n nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !nextSlide) {\n nextSlide = slides[0];\n }\n if (nextSlide) {\n nextSlide.classList.add(params.slideNextClass);\n }\n\n // Prev Slide\n prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];\n if (params.loop && !prevSlide === 0) {\n prevSlide = slides[slides.length - 1];\n }\n if (prevSlide) {\n prevSlide.classList.add(params.slidePrevClass);\n }\n }\n }\n swiper.emitSlidesClasses();\n}\n\nconst processLazyPreloader = (swiper, imageEl) => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;\n const slideEl = imageEl.closest(slideSelector());\n if (slideEl) {\n let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (!lazyEl && swiper.isElement) {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n } else {\n // init later\n requestAnimationFrame(() => {\n if (slideEl.shadowRoot) {\n lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);\n if (lazyEl) lazyEl.remove();\n }\n });\n }\n }\n if (lazyEl) lazyEl.remove();\n }\n};\nconst unlazy = (swiper, index) => {\n if (!swiper.slides[index]) return;\n const imageEl = swiper.slides[index].querySelector('[loading=\"lazy\"]');\n if (imageEl) imageEl.removeAttribute('loading');\n};\nconst preload = swiper => {\n if (!swiper || swiper.destroyed || !swiper.params) return;\n let amount = swiper.params.lazyPreloadPrevNext;\n const len = swiper.slides.length;\n if (!len || !amount || amount < 0) return;\n amount = Math.min(amount, len);\n const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);\n const activeIndex = swiper.activeIndex;\n if (swiper.params.grid && swiper.params.grid.rows > 1) {\n const activeColumn = activeIndex;\n const preloadColumns = [activeColumn - amount];\n preloadColumns.push(...Array.from({\n length: amount\n }).map((_, i) => {\n return activeColumn + slidesPerView + i;\n }));\n swiper.slides.forEach((slideEl, i) => {\n if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);\n });\n return;\n }\n const slideIndexLastInView = activeIndex + slidesPerView - 1;\n if (swiper.params.rewind || swiper.params.loop) {\n for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {\n const realIndex = (i % len + len) % len;\n if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);\n }\n } else {\n for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {\n if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {\n unlazy(swiper, i);\n }\n }\n }\n};\n\nfunction getActiveIndexByTranslate(swiper) {\n const {\n slidesGrid,\n params\n } = swiper;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n let activeIndex;\n for (let i = 0; i < slidesGrid.length; i += 1) {\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {\n activeIndex = i;\n } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {\n activeIndex = i + 1;\n }\n } else if (translate >= slidesGrid[i]) {\n activeIndex = i;\n }\n }\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;\n }\n return activeIndex;\n}\nfunction updateActiveIndex(newActiveIndex) {\n const swiper = this;\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n const {\n snapGrid,\n params,\n activeIndex: previousIndex,\n realIndex: previousRealIndex,\n snapIndex: previousSnapIndex\n } = swiper;\n let activeIndex = newActiveIndex;\n let snapIndex;\n const getVirtualRealIndex = aIndex => {\n let realIndex = aIndex - swiper.virtual.slidesBefore;\n if (realIndex < 0) {\n realIndex = swiper.virtual.slides.length + realIndex;\n }\n if (realIndex >= swiper.virtual.slides.length) {\n realIndex -= swiper.virtual.slides.length;\n }\n return realIndex;\n };\n if (typeof activeIndex === 'undefined') {\n activeIndex = getActiveIndexByTranslate(swiper);\n }\n if (snapGrid.indexOf(translate) >= 0) {\n snapIndex = snapGrid.indexOf(translate);\n } else {\n const skip = Math.min(params.slidesPerGroupSkip, activeIndex);\n snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);\n }\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n if (activeIndex === previousIndex && !swiper.params.loop) {\n if (snapIndex !== previousSnapIndex) {\n swiper.snapIndex = snapIndex;\n swiper.emit('snapIndexChange');\n }\n return;\n }\n if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.realIndex = getVirtualRealIndex(activeIndex);\n return;\n }\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n\n // Get real index\n let realIndex;\n if (swiper.virtual && params.virtual.enabled && params.loop) {\n realIndex = getVirtualRealIndex(activeIndex);\n } else if (gridEnabled) {\n const firstSlideInColumn = swiper.slides.filter(slideEl => slideEl.column === activeIndex)[0];\n let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);\n if (Number.isNaN(activeSlideIndex)) {\n activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);\n }\n realIndex = Math.floor(activeSlideIndex / params.grid.rows);\n } else if (swiper.slides[activeIndex]) {\n const slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index');\n if (slideIndex) {\n realIndex = parseInt(slideIndex, 10);\n } else {\n realIndex = activeIndex;\n }\n } else {\n realIndex = activeIndex;\n }\n Object.assign(swiper, {\n previousSnapIndex,\n snapIndex,\n previousRealIndex,\n realIndex,\n previousIndex,\n activeIndex\n });\n if (swiper.initialized) {\n preload(swiper);\n }\n swiper.emit('activeIndexChange');\n swiper.emit('snapIndexChange');\n if (swiper.initialized || swiper.params.runCallbacksOnInit) {\n if (previousRealIndex !== realIndex) {\n swiper.emit('realIndexChange');\n }\n swiper.emit('slideChange');\n }\n}\n\nfunction updateClickedSlide(el, path) {\n const swiper = this;\n const params = swiper.params;\n let slide = el.closest(`.${params.slideClass}, swiper-slide`);\n if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {\n [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => {\n if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {\n slide = pathEl;\n }\n });\n }\n let slideFound = false;\n let slideIndex;\n if (slide) {\n for (let i = 0; i < swiper.slides.length; i += 1) {\n if (swiper.slides[i] === slide) {\n slideFound = true;\n slideIndex = i;\n break;\n }\n }\n }\n if (slide && slideFound) {\n swiper.clickedSlide = slide;\n if (swiper.virtual && swiper.params.virtual.enabled) {\n swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);\n } else {\n swiper.clickedIndex = slideIndex;\n }\n } else {\n swiper.clickedSlide = undefined;\n swiper.clickedIndex = undefined;\n return;\n }\n if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {\n swiper.slideToClickedSlide();\n }\n}\n\nvar update = {\n updateSize,\n updateSlides,\n updateAutoHeight,\n updateSlidesOffset,\n updateSlidesProgress,\n updateProgress,\n updateSlidesClasses,\n updateActiveIndex,\n updateClickedSlide\n};\n\nfunction getSwiperTranslate(axis) {\n if (axis === void 0) {\n axis = this.isHorizontal() ? 'x' : 'y';\n }\n const swiper = this;\n const {\n params,\n rtlTranslate: rtl,\n translate,\n wrapperEl\n } = swiper;\n if (params.virtualTranslate) {\n return rtl ? -translate : translate;\n }\n if (params.cssMode) {\n return translate;\n }\n let currentTranslate = getTranslate(wrapperEl, axis);\n currentTranslate += swiper.cssOverflowAdjustment();\n if (rtl) currentTranslate = -currentTranslate;\n return currentTranslate || 0;\n}\n\nfunction setTranslate(translate, byController) {\n const swiper = this;\n const {\n rtlTranslate: rtl,\n params,\n wrapperEl,\n progress\n } = swiper;\n let x = 0;\n let y = 0;\n const z = 0;\n if (swiper.isHorizontal()) {\n x = rtl ? -translate : translate;\n } else {\n y = translate;\n }\n if (params.roundLengths) {\n x = Math.floor(x);\n y = Math.floor(y);\n }\n swiper.previousTranslate = swiper.translate;\n swiper.translate = swiper.isHorizontal() ? x : y;\n if (params.cssMode) {\n wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;\n } else if (!params.virtualTranslate) {\n if (swiper.isHorizontal()) {\n x -= swiper.cssOverflowAdjustment();\n } else {\n y -= swiper.cssOverflowAdjustment();\n }\n wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;\n }\n\n // Check if we need to update progress\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== progress) {\n swiper.updateProgress(translate);\n }\n swiper.emit('setTranslate', swiper.translate, byController);\n}\n\nfunction minTranslate() {\n return -this.snapGrid[0];\n}\n\nfunction maxTranslate() {\n return -this.snapGrid[this.snapGrid.length - 1];\n}\n\nfunction translateTo(translate, speed, runCallbacks, translateBounds, internal) {\n if (translate === void 0) {\n translate = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (translateBounds === void 0) {\n translateBounds = true;\n }\n const swiper = this;\n const {\n params,\n wrapperEl\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return false;\n }\n const minTranslate = swiper.minTranslate();\n const maxTranslate = swiper.maxTranslate();\n let newTranslate;\n if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;\n\n // Update progress\n swiper.updateProgress(newTranslate);\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n if (speed === 0) {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: -newTranslate,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: -newTranslate,\n behavior: 'smooth'\n });\n }\n return true;\n }\n if (speed === 0) {\n swiper.setTransition(0);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionEnd');\n }\n } else {\n swiper.setTransition(speed);\n swiper.setTranslate(newTranslate);\n if (runCallbacks) {\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.emit('transitionStart');\n }\n if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onTranslateToWrapperTransitionEnd) {\n swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n swiper.onTranslateToWrapperTransitionEnd = null;\n delete swiper.onTranslateToWrapperTransitionEnd;\n if (runCallbacks) {\n swiper.emit('transitionEnd');\n }\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);\n }\n }\n return true;\n}\n\nvar translate = {\n getTranslate: getSwiperTranslate,\n setTranslate,\n minTranslate,\n maxTranslate,\n translateTo\n};\n\nfunction setTransition(duration, byController) {\n const swiper = this;\n if (!swiper.params.cssMode) {\n swiper.wrapperEl.style.transitionDuration = `${duration}ms`;\n swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';\n }\n swiper.emit('setTransition', duration, byController);\n}\n\nfunction transitionEmit(_ref) {\n let {\n swiper,\n runCallbacks,\n direction,\n step\n } = _ref;\n const {\n activeIndex,\n previousIndex\n } = swiper;\n let dir = direction;\n if (!dir) {\n if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';\n }\n swiper.emit(`transition${step}`);\n if (runCallbacks && activeIndex !== previousIndex) {\n if (dir === 'reset') {\n swiper.emit(`slideResetTransition${step}`);\n return;\n }\n swiper.emit(`slideChangeTransition${step}`);\n if (dir === 'next') {\n swiper.emit(`slideNextTransition${step}`);\n } else {\n swiper.emit(`slidePrevTransition${step}`);\n }\n }\n}\n\nfunction transitionStart(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n if (params.cssMode) return;\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'Start'\n });\n}\n\nfunction transitionEnd(runCallbacks, direction) {\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.animating = false;\n if (params.cssMode) return;\n swiper.setTransition(0);\n transitionEmit({\n swiper,\n runCallbacks,\n direction,\n step: 'End'\n });\n}\n\nvar transition = {\n setTransition,\n transitionStart,\n transitionEnd\n};\n\nfunction slideTo(index, speed, runCallbacks, internal, initial) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n index = parseInt(index, 10);\n }\n const swiper = this;\n let slideIndex = index;\n if (slideIndex < 0) slideIndex = 0;\n const {\n params,\n snapGrid,\n slidesGrid,\n previousIndex,\n activeIndex,\n rtlTranslate: rtl,\n wrapperEl,\n enabled\n } = swiper;\n if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial || swiper.destroyed) {\n return false;\n }\n const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);\n let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);\n if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;\n const translate = -snapGrid[snapIndex];\n // Normalize slideIndex\n if (params.normalizeSlideIndex) {\n for (let i = 0; i < slidesGrid.length; i += 1) {\n const normalizedTranslate = -Math.floor(translate * 100);\n const normalizedGrid = Math.floor(slidesGrid[i] * 100);\n const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);\n if (typeof slidesGrid[i + 1] !== 'undefined') {\n if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {\n slideIndex = i;\n } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {\n slideIndex = i + 1;\n }\n } else if (normalizedTranslate >= normalizedGrid) {\n slideIndex = i;\n }\n }\n }\n // Directions locks\n if (swiper.initialized && slideIndex !== activeIndex) {\n if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) {\n return false;\n }\n if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {\n if ((activeIndex || 0) !== slideIndex) {\n return false;\n }\n }\n }\n if (slideIndex !== (previousIndex || 0) && runCallbacks) {\n swiper.emit('beforeSlideChangeStart');\n }\n\n // Update progress\n swiper.updateProgress(translate);\n let direction;\n if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';\n\n // Update Index\n if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {\n swiper.updateActiveIndex(slideIndex);\n // Update Height\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n swiper.updateSlidesClasses();\n if (params.effect !== 'slide') {\n swiper.setTranslate(translate);\n }\n if (direction !== 'reset') {\n swiper.transitionStart(runCallbacks, direction);\n swiper.transitionEnd(runCallbacks, direction);\n }\n return false;\n }\n if (params.cssMode) {\n const isH = swiper.isHorizontal();\n const t = rtl ? translate : -translate;\n if (speed === 0) {\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n if (isVirtual) {\n swiper.wrapperEl.style.scrollSnapType = 'none';\n swiper._immediateVirtual = true;\n }\n if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {\n swiper._cssModeVirtualInitialSet = true;\n requestAnimationFrame(() => {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n });\n } else {\n wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;\n }\n if (isVirtual) {\n requestAnimationFrame(() => {\n swiper.wrapperEl.style.scrollSnapType = '';\n swiper._immediateVirtual = false;\n });\n }\n } else {\n if (!swiper.support.smoothScroll) {\n animateCSSModeScroll({\n swiper,\n targetPosition: t,\n side: isH ? 'left' : 'top'\n });\n return true;\n }\n wrapperEl.scrollTo({\n [isH ? 'left' : 'top']: t,\n behavior: 'smooth'\n });\n }\n return true;\n }\n swiper.setTransition(speed);\n swiper.setTranslate(translate);\n swiper.updateActiveIndex(slideIndex);\n swiper.updateSlidesClasses();\n swiper.emit('beforeTransitionStart', speed, internal);\n swiper.transitionStart(runCallbacks, direction);\n if (speed === 0) {\n swiper.transitionEnd(runCallbacks, direction);\n } else if (!swiper.animating) {\n swiper.animating = true;\n if (!swiper.onSlideToWrapperTransitionEnd) {\n swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {\n if (!swiper || swiper.destroyed) return;\n if (e.target !== this) return;\n swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n swiper.onSlideToWrapperTransitionEnd = null;\n delete swiper.onSlideToWrapperTransitionEnd;\n swiper.transitionEnd(runCallbacks, direction);\n };\n }\n swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);\n }\n return true;\n}\n\nfunction slideToLoop(index, speed, runCallbacks, internal) {\n if (index === void 0) {\n index = 0;\n }\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (typeof index === 'string') {\n const indexAsNumber = parseInt(index, 10);\n index = indexAsNumber;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;\n let newIndex = index;\n if (swiper.params.loop) {\n if (swiper.virtual && swiper.params.virtual.enabled) {\n // eslint-disable-next-line\n newIndex = newIndex + swiper.virtual.slidesBefore;\n } else {\n let targetSlideIndex;\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n targetSlideIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column;\n } else {\n targetSlideIndex = swiper.getSlideIndexByData(newIndex);\n }\n const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length;\n const {\n centeredSlides\n } = swiper.params;\n let slidesPerView = swiper.params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10));\n if (centeredSlides && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n let needLoopFix = cols - targetSlideIndex < slidesPerView;\n if (centeredSlides) {\n needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);\n }\n if (needLoopFix) {\n const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';\n swiper.loopFix({\n direction,\n slideTo: true,\n activeSlideIndex: direction === 'next' ? targetSlideIndex + 1 : targetSlideIndex - cols + 1,\n slideRealIndex: direction === 'next' ? swiper.realIndex : undefined\n });\n }\n if (gridEnabled) {\n const slideIndex = newIndex * swiper.params.grid.rows;\n newIndex = swiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex)[0].column;\n } else {\n newIndex = swiper.getSlideIndexByData(newIndex);\n }\n }\n }\n requestAnimationFrame(() => {\n swiper.slideTo(newIndex, speed, runCallbacks, internal);\n });\n return swiper;\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideNext(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n enabled,\n params,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n let perGroup = params.slidesPerGroup;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);\n }\n const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'next'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n });\n return true;\n }\n }\n if (params.rewind && swiper.isEnd) {\n return swiper.slideTo(0, speed, runCallbacks, internal);\n }\n return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slidePrev(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n const {\n params,\n snapGrid,\n slidesGrid,\n rtlTranslate,\n enabled,\n animating\n } = swiper;\n if (!enabled || swiper.destroyed) return swiper;\n const isVirtual = swiper.virtual && params.virtual.enabled;\n if (params.loop) {\n if (animating && !isVirtual && params.loopPreventsSliding) return false;\n swiper.loopFix({\n direction: 'prev'\n });\n // eslint-disable-next-line\n swiper._clientLeft = swiper.wrapperEl.clientLeft;\n }\n const translate = rtlTranslate ? swiper.translate : -swiper.translate;\n function normalize(val) {\n if (val < 0) return -Math.floor(Math.abs(val));\n return Math.floor(val);\n }\n const normalizedTranslate = normalize(translate);\n const normalizedSnapGrid = snapGrid.map(val => normalize(val));\n let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];\n if (typeof prevSnap === 'undefined' && params.cssMode) {\n let prevSnapIndex;\n snapGrid.forEach((snap, snapIndex) => {\n if (normalizedTranslate >= snap) {\n // prevSnap = snap;\n prevSnapIndex = snapIndex;\n }\n });\n if (typeof prevSnapIndex !== 'undefined') {\n prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];\n }\n }\n let prevIndex = 0;\n if (typeof prevSnap !== 'undefined') {\n prevIndex = slidesGrid.indexOf(prevSnap);\n if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;\n if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {\n prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;\n prevIndex = Math.max(prevIndex, 0);\n }\n }\n if (params.rewind && swiper.isBeginning) {\n const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n return swiper.slideTo(lastIndex, speed, runCallbacks, internal);\n } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {\n requestAnimationFrame(() => {\n swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n });\n return true;\n }\n return swiper.slideTo(prevIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideReset(speed, runCallbacks, internal) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);\n}\n\n/* eslint no-unused-vars: \"off\" */\nfunction slideToClosest(speed, runCallbacks, internal, threshold) {\n if (speed === void 0) {\n speed = this.params.speed;\n }\n if (runCallbacks === void 0) {\n runCallbacks = true;\n }\n if (threshold === void 0) {\n threshold = 0.5;\n }\n const swiper = this;\n if (swiper.destroyed) return;\n let index = swiper.activeIndex;\n const skip = Math.min(swiper.params.slidesPerGroupSkip, index);\n const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);\n const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;\n if (translate >= swiper.snapGrid[snapIndex]) {\n // The current translate is on or after the current snap index, so the choice\n // is between the current index and the one after it.\n const currentSnap = swiper.snapGrid[snapIndex];\n const nextSnap = swiper.snapGrid[snapIndex + 1];\n if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {\n index += swiper.params.slidesPerGroup;\n }\n } else {\n // The current translate is before the current snap index, so the choice\n // is between the current index and the one before it.\n const prevSnap = swiper.snapGrid[snapIndex - 1];\n const currentSnap = swiper.snapGrid[snapIndex];\n if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {\n index -= swiper.params.slidesPerGroup;\n }\n }\n index = Math.max(index, 0);\n index = Math.min(index, swiper.slidesGrid.length - 1);\n return swiper.slideTo(index, speed, runCallbacks, internal);\n}\n\nfunction slideToClickedSlide() {\n const swiper = this;\n if (swiper.destroyed) return;\n const {\n params,\n slidesEl\n } = swiper;\n const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;\n let slideToIndex = swiper.clickedIndex;\n let realIndex;\n const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;\n if (params.loop) {\n if (swiper.animating) return;\n realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);\n if (params.centeredSlides) {\n if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else if (slideToIndex > swiper.slides.length - slidesPerView) {\n swiper.loopFix();\n slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index=\"${realIndex}\"]`)[0]);\n nextTick(() => {\n swiper.slideTo(slideToIndex);\n });\n } else {\n swiper.slideTo(slideToIndex);\n }\n } else {\n swiper.slideTo(slideToIndex);\n }\n}\n\nvar slide = {\n slideTo,\n slideToLoop,\n slideNext,\n slidePrev,\n slideReset,\n slideToClosest,\n slideToClickedSlide\n};\n\nfunction loopCreate(slideRealIndex) {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n const initSlides = () => {\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n slides.forEach((el, index) => {\n el.setAttribute('data-swiper-slide-index', index);\n });\n };\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1);\n const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0;\n const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0;\n const addBlankSlides = amountOfSlides => {\n for (let i = 0; i < amountOfSlides; i += 1) {\n const slideEl = swiper.isElement ? createElement('swiper-slide', [params.slideBlankClass]) : createElement('div', [params.slideClass, params.slideBlankClass]);\n swiper.slidesEl.append(slideEl);\n }\n };\n if (shouldFillGroup) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else if (shouldFillGrid) {\n if (params.loopAddBlankSlides) {\n const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows;\n addBlankSlides(slidesToAdd);\n swiper.recalcSlides();\n swiper.updateSlides();\n } else {\n showWarning('Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');\n }\n initSlides();\n } else {\n initSlides();\n }\n swiper.loopFix({\n slideRealIndex,\n direction: params.centeredSlides ? undefined : 'next'\n });\n}\n\nfunction loopFix(_temp) {\n let {\n slideRealIndex,\n slideTo = true,\n direction,\n setTranslate,\n activeSlideIndex,\n byController,\n byMousewheel\n } = _temp === void 0 ? {} : _temp;\n const swiper = this;\n if (!swiper.params.loop) return;\n swiper.emit('beforeLoopFix');\n const {\n slides,\n allowSlidePrev,\n allowSlideNext,\n slidesEl,\n params\n } = swiper;\n const {\n centeredSlides\n } = params;\n swiper.allowSlidePrev = true;\n swiper.allowSlideNext = true;\n if (swiper.virtual && params.virtual.enabled) {\n if (slideTo) {\n if (!params.centeredSlides && swiper.snapIndex === 0) {\n swiper.slideTo(swiper.virtual.slides.length, 0, false, true);\n } else if (params.centeredSlides && swiper.snapIndex < params.slidesPerView) {\n swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);\n } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {\n swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n swiper.emit('loopFix');\n return;\n }\n let slidesPerView = params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = swiper.slidesPerViewDynamic();\n } else {\n slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));\n if (centeredSlides && slidesPerView % 2 === 0) {\n slidesPerView = slidesPerView + 1;\n }\n }\n const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup;\n let loopedSlides = slidesPerGroup;\n if (loopedSlides % slidesPerGroup !== 0) {\n loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup;\n }\n loopedSlides += params.loopAdditionalSlides;\n swiper.loopedSlides = loopedSlides;\n const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;\n if (slides.length < slidesPerView + loopedSlides) {\n showWarning('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters');\n } else if (gridEnabled && params.grid.fill === 'row') {\n showWarning('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`');\n }\n const prependSlidesIndexes = [];\n const appendSlidesIndexes = [];\n let activeIndex = swiper.activeIndex;\n if (typeof activeSlideIndex === 'undefined') {\n activeSlideIndex = swiper.getSlideIndex(slides.filter(el => el.classList.contains(params.slideActiveClass))[0]);\n } else {\n activeIndex = activeSlideIndex;\n }\n const isNext = direction === 'next' || !direction;\n const isPrev = direction === 'prev' || !direction;\n let slidesPrepended = 0;\n let slidesAppended = 0;\n const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;\n const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;\n const activeColIndexWithShift = activeColIndex + (centeredSlides && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0);\n // prepend last slides before start\n if (activeColIndexWithShift < loopedSlides) {\n slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup);\n for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n const colIndexToPrepend = cols - index - 1;\n for (let i = slides.length - 1; i >= 0; i -= 1) {\n if (slides[i].column === colIndexToPrepend) prependSlidesIndexes.push(i);\n }\n // slides.forEach((slide, slideIndex) => {\n // if (slide.column === colIndexToPrepend) prependSlidesIndexes.push(slideIndex);\n // });\n } else {\n prependSlidesIndexes.push(cols - index - 1);\n }\n }\n } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {\n slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);\n for (let i = 0; i < slidesAppended; i += 1) {\n const index = i - Math.floor(i / cols) * cols;\n if (gridEnabled) {\n slides.forEach((slide, slideIndex) => {\n if (slide.column === index) appendSlidesIndexes.push(slideIndex);\n });\n } else {\n appendSlidesIndexes.push(index);\n }\n }\n }\n swiper.__preventObserver__ = true;\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n if (isPrev) {\n prependSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.prepend(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n if (isNext) {\n appendSlidesIndexes.forEach(index => {\n slides[index].swiperLoopMoveDOM = true;\n slidesEl.append(slides[index]);\n slides[index].swiperLoopMoveDOM = false;\n });\n }\n swiper.recalcSlides();\n if (params.slidesPerView === 'auto') {\n swiper.updateSlides();\n } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) {\n swiper.slides.forEach((slide, slideIndex) => {\n swiper.grid.updateSlide(slideIndex, slide, swiper.slides);\n });\n }\n if (params.watchSlidesProgress) {\n swiper.updateSlidesOffset();\n }\n if (slideTo) {\n if (prependSlidesIndexes.length > 0 && isPrev) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n if (setTranslate) {\n const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex + shift, 0, false, true);\n swiper.touchEventsData.currentTranslate = swiper.translate;\n }\n }\n } else if (appendSlidesIndexes.length > 0 && isNext) {\n if (typeof slideRealIndex === 'undefined') {\n const currentSlideTranslate = swiper.slidesGrid[activeIndex];\n const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];\n const diff = newSlideTranslate - currentSlideTranslate;\n if (byMousewheel) {\n swiper.setTranslate(swiper.translate - diff);\n } else {\n swiper.slideTo(activeIndex - slidesAppended, 0, false, true);\n if (setTranslate) {\n swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;\n swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;\n }\n }\n } else {\n const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length;\n swiper.slideTo(swiper.activeIndex - shift, 0, false, true);\n }\n }\n }\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.controller && swiper.controller.control && !byController) {\n const loopParams = {\n slideRealIndex,\n direction,\n setTranslate,\n activeSlideIndex,\n byController: true\n };\n if (Array.isArray(swiper.controller.control)) {\n swiper.controller.control.forEach(c => {\n if (!c.destroyed && c.params.loop) c.loopFix({\n ...loopParams,\n slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n });\n } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {\n swiper.controller.control.loopFix({\n ...loopParams,\n slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false\n });\n }\n }\n swiper.emit('loopFix');\n}\n\nfunction loopDestroy() {\n const swiper = this;\n const {\n params,\n slidesEl\n } = swiper;\n if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;\n swiper.recalcSlides();\n const newSlidesOrder = [];\n swiper.slides.forEach(slideEl => {\n const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex;\n newSlidesOrder[index] = slideEl;\n });\n swiper.slides.forEach(slideEl => {\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n newSlidesOrder.forEach(slideEl => {\n slidesEl.append(slideEl);\n });\n swiper.recalcSlides();\n swiper.slideTo(swiper.realIndex, 0);\n}\n\nvar loop = {\n loopCreate,\n loopFix,\n loopDestroy\n};\n\nfunction setGrabCursor(moving) {\n const swiper = this;\n if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;\n const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n el.style.cursor = 'move';\n el.style.cursor = moving ? 'grabbing' : 'grab';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nfunction unsetGrabCursor() {\n const swiper = this;\n if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {\n return;\n }\n if (swiper.isElement) {\n swiper.__preventObserver__ = true;\n }\n swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';\n if (swiper.isElement) {\n requestAnimationFrame(() => {\n swiper.__preventObserver__ = false;\n });\n }\n}\n\nvar grabCursor = {\n setGrabCursor,\n unsetGrabCursor\n};\n\n// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd\nfunction closestElement(selector, base) {\n if (base === void 0) {\n base = this;\n }\n function __closestFrom(el) {\n if (!el || el === getDocument() || el === getWindow()) return null;\n if (el.assignedSlot) el = el.assignedSlot;\n const found = el.closest(selector);\n if (!found && !el.getRootNode) {\n return null;\n }\n return found || __closestFrom(el.getRootNode().host);\n }\n return __closestFrom(base);\n}\nfunction preventEdgeSwipe(swiper, event, startX) {\n const window = getWindow();\n const {\n params\n } = swiper;\n const edgeSwipeDetection = params.edgeSwipeDetection;\n const edgeSwipeThreshold = params.edgeSwipeThreshold;\n if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {\n if (edgeSwipeDetection === 'prevent') {\n event.preventDefault();\n return true;\n }\n return false;\n }\n return true;\n}\nfunction onTouchStart(event) {\n const swiper = this;\n const document = getDocument();\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n const data = swiper.touchEventsData;\n if (e.type === 'pointerdown') {\n if (data.pointerId !== null && data.pointerId !== e.pointerId) {\n return;\n }\n data.pointerId = e.pointerId;\n } else if (e.type === 'touchstart' && e.targetTouches.length === 1) {\n data.touchId = e.targetTouches[0].identifier;\n }\n if (e.type === 'touchstart') {\n // don't proceed touch event\n preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX);\n return;\n }\n const {\n params,\n touches,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (swiper.animating && params.preventInteractionOnTransition) {\n return;\n }\n if (!swiper.animating && params.cssMode && params.loop) {\n swiper.loopFix();\n }\n let targetEl = e.target;\n if (params.touchEventsTarget === 'wrapper') {\n if (!swiper.wrapperEl.contains(targetEl)) return;\n }\n if ('which' in e && e.which === 3) return;\n if ('button' in e && e.button > 0) return;\n if (data.isTouched && data.isMoved) return;\n\n // change target el for shadow root component\n const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';\n // eslint-disable-next-line\n const eventPath = e.composedPath ? e.composedPath() : e.path;\n if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {\n targetEl = eventPath[0];\n }\n const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;\n const isTargetShadow = !!(e.target && e.target.shadowRoot);\n\n // use closestElement for shadow root element to get the actual closest for nested shadow root element\n if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {\n swiper.allowClick = true;\n return;\n }\n if (params.swipeHandler) {\n if (!targetEl.closest(params.swipeHandler)) return;\n }\n touches.currentX = e.pageX;\n touches.currentY = e.pageY;\n const startX = touches.currentX;\n const startY = touches.currentY;\n\n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore\n\n if (!preventEdgeSwipe(swiper, e, startX)) {\n return;\n }\n Object.assign(data, {\n isTouched: true,\n isMoved: false,\n allowTouchCallbacks: true,\n isScrolling: undefined,\n startMoving: undefined\n });\n touches.startX = startX;\n touches.startY = startY;\n data.touchStartTime = now();\n swiper.allowClick = true;\n swiper.updateSize();\n swiper.swipeDirection = undefined;\n if (params.threshold > 0) data.allowThresholdMove = false;\n let preventDefault = true;\n if (targetEl.matches(data.focusableElements)) {\n preventDefault = false;\n if (targetEl.nodeName === 'SELECT') {\n data.isTouched = false;\n }\n }\n if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl) {\n document.activeElement.blur();\n }\n const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;\n if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {\n e.preventDefault();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {\n swiper.freeMode.onTouchStart();\n }\n swiper.emit('touchStart', e);\n}\n\nfunction onTouchMove(event) {\n const document = getDocument();\n const swiper = this;\n const data = swiper.touchEventsData;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && event.pointerType === 'mouse') return;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n if (e.type === 'pointermove') {\n if (data.touchId !== null) return; // return from pointer if we use touch\n const id = e.pointerId;\n if (id !== data.pointerId) return;\n }\n let targetTouch;\n if (e.type === 'touchmove') {\n targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0];\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n } else {\n targetTouch = e;\n }\n if (!data.isTouched) {\n if (data.startMoving && data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n return;\n }\n const pageX = targetTouch.pageX;\n const pageY = targetTouch.pageY;\n if (e.preventedByNestedSwiper) {\n touches.startX = pageX;\n touches.startY = pageY;\n return;\n }\n if (!swiper.allowTouchMove) {\n if (!e.target.matches(data.focusableElements)) {\n swiper.allowClick = false;\n }\n if (data.isTouched) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY\n });\n data.touchStartTime = now();\n }\n return;\n }\n if (params.touchReleaseOnEdges && !params.loop) {\n if (swiper.isVertical()) {\n // Vertical\n if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {\n data.isTouched = false;\n data.isMoved = false;\n return;\n }\n } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) {\n return;\n }\n }\n if (document.activeElement) {\n if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {\n data.isMoved = true;\n swiper.allowClick = false;\n return;\n }\n }\n if (data.allowTouchCallbacks) {\n swiper.emit('touchMove', e);\n }\n touches.previousX = touches.currentX;\n touches.previousY = touches.currentY;\n touches.currentX = pageX;\n touches.currentY = pageY;\n const diffX = touches.currentX - touches.startX;\n const diffY = touches.currentY - touches.startY;\n if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;\n if (typeof data.isScrolling === 'undefined') {\n let touchAngle;\n if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {\n data.isScrolling = false;\n } else {\n // eslint-disable-next-line\n if (diffX * diffX + diffY * diffY >= 25) {\n touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;\n data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;\n }\n }\n }\n if (data.isScrolling) {\n swiper.emit('touchMoveOpposite', e);\n }\n if (typeof data.startMoving === 'undefined') {\n if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {\n data.startMoving = true;\n }\n }\n if (data.isScrolling) {\n data.isTouched = false;\n return;\n }\n if (!data.startMoving) {\n return;\n }\n swiper.allowClick = false;\n if (!params.cssMode && e.cancelable) {\n e.preventDefault();\n }\n if (params.touchMoveStopPropagation && !params.nested) {\n e.stopPropagation();\n }\n let diff = swiper.isHorizontal() ? diffX : diffY;\n let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;\n if (params.oneWayMovement) {\n diff = Math.abs(diff) * (rtl ? 1 : -1);\n touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);\n }\n touches.diff = diff;\n diff *= params.touchRatio;\n if (rtl) {\n diff = -diff;\n touchesDiff = -touchesDiff;\n }\n const prevTouchesDirection = swiper.touchesDirection;\n swiper.swipeDirection = diff > 0 ? 'prev' : 'next';\n swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';\n const isLoop = swiper.params.loop && !params.cssMode;\n const allowLoopFix = swiper.touchesDirection === 'next' && swiper.allowSlideNext || swiper.touchesDirection === 'prev' && swiper.allowSlidePrev;\n if (!data.isMoved) {\n if (isLoop && allowLoopFix) {\n swiper.loopFix({\n direction: swiper.swipeDirection\n });\n }\n data.startTranslate = swiper.getTranslate();\n swiper.setTransition(0);\n if (swiper.animating) {\n const evt = new window.CustomEvent('transitionend', {\n bubbles: true,\n cancelable: true\n });\n swiper.wrapperEl.dispatchEvent(evt);\n }\n data.allowMomentumBounce = false;\n // Grab Cursor\n if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(true);\n }\n swiper.emit('sliderFirstMove', e);\n }\n let loopFixed;\n new Date().getTime();\n if (data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {\n Object.assign(touches, {\n startX: pageX,\n startY: pageY,\n currentX: pageX,\n currentY: pageY,\n startTranslate: data.currentTranslate\n });\n data.loopSwapReset = true;\n data.startTranslate = data.currentTranslate;\n return;\n }\n swiper.emit('sliderMove', e);\n data.isMoved = true;\n data.currentTranslate = diff + data.startTranslate;\n let disableParentSwiper = true;\n let resistanceRatio = params.resistanceRatio;\n if (params.touchReleaseOnEdges) {\n resistanceRatio = 0;\n }\n if (diff > 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] : swiper.minTranslate())) {\n swiper.loopFix({\n direction: 'prev',\n setTranslate: true,\n activeSlideIndex: 0\n });\n }\n if (data.currentTranslate > swiper.minTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;\n }\n }\n } else if (diff < 0) {\n if (isLoop && allowLoopFix && !loopFixed && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] : swiper.maxTranslate())) {\n swiper.loopFix({\n direction: 'next',\n setTranslate: true,\n activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))\n });\n }\n if (data.currentTranslate < swiper.maxTranslate()) {\n disableParentSwiper = false;\n if (params.resistance) {\n data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;\n }\n }\n }\n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n\n // Directions locks\n if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {\n data.currentTranslate = data.startTranslate;\n }\n if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {\n data.currentTranslate = data.startTranslate;\n }\n\n // Threshold\n if (params.threshold > 0) {\n if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {\n if (!data.allowThresholdMove) {\n data.allowThresholdMove = true;\n touches.startX = touches.currentX;\n touches.startY = touches.currentY;\n data.currentTranslate = data.startTranslate;\n touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;\n return;\n }\n } else {\n data.currentTranslate = data.startTranslate;\n return;\n }\n }\n if (!params.followFinger || params.cssMode) return;\n\n // Update active index in free mode\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {\n swiper.freeMode.onTouchMove();\n }\n // Update progress\n swiper.updateProgress(data.currentTranslate);\n // Update translate\n swiper.setTranslate(data.currentTranslate);\n}\n\nfunction onTouchEnd(event) {\n const swiper = this;\n const data = swiper.touchEventsData;\n let e = event;\n if (e.originalEvent) e = e.originalEvent;\n let targetTouch;\n const isTouchEvent = e.type === 'touchend' || e.type === 'touchcancel';\n if (!isTouchEvent) {\n if (data.touchId !== null) return; // return from pointer if we use touch\n if (e.pointerId !== data.pointerId) return;\n targetTouch = e;\n } else {\n targetTouch = [...e.changedTouches].filter(t => t.identifier === data.touchId)[0];\n if (!targetTouch || targetTouch.identifier !== data.touchId) return;\n }\n if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) {\n const proceed = ['pointercancel', 'contextmenu'].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView);\n if (!proceed) {\n return;\n }\n }\n data.pointerId = null;\n data.touchId = null;\n const {\n params,\n touches,\n rtlTranslate: rtl,\n slidesGrid,\n enabled\n } = swiper;\n if (!enabled) return;\n if (!params.simulateTouch && e.pointerType === 'mouse') return;\n if (data.allowTouchCallbacks) {\n swiper.emit('touchEnd', e);\n }\n data.allowTouchCallbacks = false;\n if (!data.isTouched) {\n if (data.isMoved && params.grabCursor) {\n swiper.setGrabCursor(false);\n }\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n\n // Return Grab Cursor\n if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {\n swiper.setGrabCursor(false);\n }\n\n // Time diff\n const touchEndTime = now();\n const timeDiff = touchEndTime - data.touchStartTime;\n\n // Tap, doubleTap, Click\n if (swiper.allowClick) {\n const pathTree = e.path || e.composedPath && e.composedPath();\n swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);\n swiper.emit('tap click', e);\n if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {\n swiper.emit('doubleTap doubleClick', e);\n }\n }\n data.lastClickTime = now();\n nextTick(() => {\n if (!swiper.destroyed) swiper.allowClick = true;\n });\n if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) {\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n return;\n }\n data.isTouched = false;\n data.isMoved = false;\n data.startMoving = false;\n let currentPos;\n if (params.followFinger) {\n currentPos = rtl ? swiper.translate : -swiper.translate;\n } else {\n currentPos = -data.currentTranslate;\n }\n if (params.cssMode) {\n return;\n }\n if (params.freeMode && params.freeMode.enabled) {\n swiper.freeMode.onTouchEnd({\n currentPos\n });\n return;\n }\n\n // Find current slide\n const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;\n let stopIndex = 0;\n let groupSize = swiper.slidesSizesGrid[0];\n for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {\n const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (typeof slidesGrid[i + increment] !== 'undefined') {\n if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {\n stopIndex = i;\n groupSize = slidesGrid[i + increment] - slidesGrid[i];\n }\n } else if (swipeToLast || currentPos >= slidesGrid[i]) {\n stopIndex = i;\n groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];\n }\n }\n let rewindFirstIndex = null;\n let rewindLastIndex = null;\n if (params.rewind) {\n if (swiper.isBeginning) {\n rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;\n } else if (swiper.isEnd) {\n rewindFirstIndex = 0;\n }\n }\n // Find current slide size\n const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;\n const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;\n if (timeDiff > params.longSwipesMs) {\n // Long touches\n if (!params.longSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n if (swiper.swipeDirection === 'next') {\n if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);\n }\n if (swiper.swipeDirection === 'prev') {\n if (ratio > 1 - params.longSwipesRatio) {\n swiper.slideTo(stopIndex + increment);\n } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {\n swiper.slideTo(rewindLastIndex);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n } else {\n // Short swipes\n if (!params.shortSwipes) {\n swiper.slideTo(swiper.activeIndex);\n return;\n }\n const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);\n if (!isNavButtonTarget) {\n if (swiper.swipeDirection === 'next') {\n swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);\n }\n if (swiper.swipeDirection === 'prev') {\n swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);\n }\n } else if (e.target === swiper.navigation.nextEl) {\n swiper.slideTo(stopIndex + increment);\n } else {\n swiper.slideTo(stopIndex);\n }\n }\n}\n\nfunction onResize() {\n const swiper = this;\n const {\n params,\n el\n } = swiper;\n if (el && el.offsetWidth === 0) return;\n\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Save locks\n const {\n allowSlideNext,\n allowSlidePrev,\n snapGrid\n } = swiper;\n const isVirtual = swiper.virtual && swiper.params.virtual.enabled;\n\n // Disable locks on resize\n swiper.allowSlideNext = true;\n swiper.allowSlidePrev = true;\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateSlidesClasses();\n const isVirtualLoop = isVirtual && params.loop;\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {\n swiper.slideTo(swiper.slides.length - 1, 0, false, true);\n } else {\n if (swiper.params.loop && !isVirtual) {\n swiper.slideToLoop(swiper.realIndex, 0, false, true);\n } else {\n swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n }\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n clearTimeout(swiper.autoplay.resizeTimeout);\n swiper.autoplay.resizeTimeout = setTimeout(() => {\n if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {\n swiper.autoplay.resume();\n }\n }, 500);\n }\n // Return locks after resize\n swiper.allowSlidePrev = allowSlidePrev;\n swiper.allowSlideNext = allowSlideNext;\n if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n}\n\nfunction onClick(e) {\n const swiper = this;\n if (!swiper.enabled) return;\n if (!swiper.allowClick) {\n if (swiper.params.preventClicks) e.preventDefault();\n if (swiper.params.preventClicksPropagation && swiper.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n}\n\nfunction onScroll() {\n const swiper = this;\n const {\n wrapperEl,\n rtlTranslate,\n enabled\n } = swiper;\n if (!enabled) return;\n swiper.previousTranslate = swiper.translate;\n if (swiper.isHorizontal()) {\n swiper.translate = -wrapperEl.scrollLeft;\n } else {\n swiper.translate = -wrapperEl.scrollTop;\n }\n // eslint-disable-next-line\n if (swiper.translate === 0) swiper.translate = 0;\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n let newProgress;\n const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();\n if (translatesDiff === 0) {\n newProgress = 0;\n } else {\n newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;\n }\n if (newProgress !== swiper.progress) {\n swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);\n }\n swiper.emit('setTranslate', swiper.translate, false);\n}\n\nfunction onLoad(e) {\n const swiper = this;\n processLazyPreloader(swiper, e.target);\n if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) {\n return;\n }\n swiper.update();\n}\n\nfunction onDocumentTouchStart() {\n const swiper = this;\n if (swiper.documentTouchHandlerProceeded) return;\n swiper.documentTouchHandlerProceeded = true;\n if (swiper.params.touchReleaseOnEdges) {\n swiper.el.style.touchAction = 'auto';\n }\n}\n\nconst events = (swiper, method) => {\n const document = getDocument();\n const {\n params,\n el,\n wrapperEl,\n device\n } = swiper;\n const capture = !!params.nested;\n const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n const swiperMethod = method;\n\n // Touch Events\n document[domMethod]('touchstart', swiper.onDocumentTouchStart, {\n passive: false,\n capture\n });\n el[domMethod]('touchstart', swiper.onTouchStart, {\n passive: false\n });\n el[domMethod]('pointerdown', swiper.onTouchStart, {\n passive: false\n });\n document[domMethod]('touchmove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('pointermove', swiper.onTouchMove, {\n passive: false,\n capture\n });\n document[domMethod]('touchend', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerup', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointercancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('touchcancel', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerout', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('pointerleave', swiper.onTouchEnd, {\n passive: true\n });\n document[domMethod]('contextmenu', swiper.onTouchEnd, {\n passive: true\n });\n\n // Prevent Links Clicks\n if (params.preventClicks || params.preventClicksPropagation) {\n el[domMethod]('click', swiper.onClick, true);\n }\n if (params.cssMode) {\n wrapperEl[domMethod]('scroll', swiper.onScroll);\n }\n\n // Resize handler\n if (params.updateOnWindowResize) {\n swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);\n } else {\n swiper[swiperMethod]('observerUpdate', onResize, true);\n }\n\n // Images loader\n el[domMethod]('load', swiper.onLoad, {\n capture: true\n });\n};\nfunction attachEvents() {\n const swiper = this;\n const {\n params\n } = swiper;\n swiper.onTouchStart = onTouchStart.bind(swiper);\n swiper.onTouchMove = onTouchMove.bind(swiper);\n swiper.onTouchEnd = onTouchEnd.bind(swiper);\n swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper);\n if (params.cssMode) {\n swiper.onScroll = onScroll.bind(swiper);\n }\n swiper.onClick = onClick.bind(swiper);\n swiper.onLoad = onLoad.bind(swiper);\n events(swiper, 'on');\n}\nfunction detachEvents() {\n const swiper = this;\n events(swiper, 'off');\n}\nvar events$1 = {\n attachEvents,\n detachEvents\n};\n\nconst isGridEnabled = (swiper, params) => {\n return swiper.grid && params.grid && params.grid.rows > 1;\n};\nfunction setBreakpoint() {\n const swiper = this;\n const {\n realIndex,\n initialized,\n params,\n el\n } = swiper;\n const breakpoints = params.breakpoints;\n if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;\n\n // Get breakpoint for window width and update parameters\n const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);\n if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;\n const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;\n const breakpointParams = breakpointOnlyParams || swiper.originalParams;\n const wasMultiRow = isGridEnabled(swiper, params);\n const isMultiRow = isGridEnabled(swiper, breakpointParams);\n const wasEnabled = params.enabled;\n if (wasMultiRow && !isMultiRow) {\n el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);\n swiper.emitContainerClasses();\n } else if (!wasMultiRow && isMultiRow) {\n el.classList.add(`${params.containerModifierClass}grid`);\n if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {\n el.classList.add(`${params.containerModifierClass}grid-column`);\n }\n swiper.emitContainerClasses();\n }\n\n // Toggle navigation, pagination, scrollbar\n ['navigation', 'pagination', 'scrollbar'].forEach(prop => {\n if (typeof breakpointParams[prop] === 'undefined') return;\n const wasModuleEnabled = params[prop] && params[prop].enabled;\n const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;\n if (wasModuleEnabled && !isModuleEnabled) {\n swiper[prop].disable();\n }\n if (!wasModuleEnabled && isModuleEnabled) {\n swiper[prop].enable();\n }\n });\n const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;\n const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);\n const wasLoop = params.loop;\n if (directionChanged && initialized) {\n swiper.changeDirection();\n }\n extend(swiper.params, breakpointParams);\n const isEnabled = swiper.params.enabled;\n const hasLoop = swiper.params.loop;\n Object.assign(swiper, {\n allowTouchMove: swiper.params.allowTouchMove,\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev\n });\n if (wasEnabled && !isEnabled) {\n swiper.disable();\n } else if (!wasEnabled && isEnabled) {\n swiper.enable();\n }\n swiper.currentBreakpoint = breakpoint;\n swiper.emit('_beforeBreakpoint', breakpointParams);\n if (initialized) {\n if (needsReLoop) {\n swiper.loopDestroy();\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (!wasLoop && hasLoop) {\n swiper.loopCreate(realIndex);\n swiper.updateSlides();\n } else if (wasLoop && !hasLoop) {\n swiper.loopDestroy();\n }\n }\n swiper.emit('breakpoint', breakpointParams);\n}\n\nfunction getBreakpoint(breakpoints, base, containerEl) {\n if (base === void 0) {\n base = 'window';\n }\n if (!breakpoints || base === 'container' && !containerEl) return undefined;\n let breakpoint = false;\n const window = getWindow();\n const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;\n const points = Object.keys(breakpoints).map(point => {\n if (typeof point === 'string' && point.indexOf('@') === 0) {\n const minRatio = parseFloat(point.substr(1));\n const value = currentHeight * minRatio;\n return {\n value,\n point\n };\n }\n return {\n value: point,\n point\n };\n });\n points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));\n for (let i = 0; i < points.length; i += 1) {\n const {\n point,\n value\n } = points[i];\n if (base === 'window') {\n if (window.matchMedia(`(min-width: ${value}px)`).matches) {\n breakpoint = point;\n }\n } else if (value <= containerEl.clientWidth) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n}\n\nvar breakpoints = {\n setBreakpoint,\n getBreakpoint\n};\n\nfunction prepareClasses(entries, prefix) {\n const resultClasses = [];\n entries.forEach(item => {\n if (typeof item === 'object') {\n Object.keys(item).forEach(classNames => {\n if (item[classNames]) {\n resultClasses.push(prefix + classNames);\n }\n });\n } else if (typeof item === 'string') {\n resultClasses.push(prefix + item);\n }\n });\n return resultClasses;\n}\nfunction addClasses() {\n const swiper = this;\n const {\n classNames,\n params,\n rtl,\n el,\n device\n } = swiper;\n // prettier-ignore\n const suffixes = prepareClasses(['initialized', params.direction, {\n 'free-mode': swiper.params.freeMode && params.freeMode.enabled\n }, {\n 'autoheight': params.autoHeight\n }, {\n 'rtl': rtl\n }, {\n 'grid': params.grid && params.grid.rows > 1\n }, {\n 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'\n }, {\n 'android': device.android\n }, {\n 'ios': device.ios\n }, {\n 'css-mode': params.cssMode\n }, {\n 'centered': params.cssMode && params.centeredSlides\n }, {\n 'watch-progress': params.watchSlidesProgress\n }], params.containerModifierClass);\n classNames.push(...suffixes);\n el.classList.add(...classNames);\n swiper.emitContainerClasses();\n}\n\nfunction removeClasses() {\n const swiper = this;\n const {\n el,\n classNames\n } = swiper;\n el.classList.remove(...classNames);\n swiper.emitContainerClasses();\n}\n\nvar classes = {\n addClasses,\n removeClasses\n};\n\nfunction checkOverflow() {\n const swiper = this;\n const {\n isLocked: wasLocked,\n params\n } = swiper;\n const {\n slidesOffsetBefore\n } = params;\n if (slidesOffsetBefore) {\n const lastSlideIndex = swiper.slides.length - 1;\n const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;\n swiper.isLocked = swiper.size > lastSlideRightEdge;\n } else {\n swiper.isLocked = swiper.snapGrid.length === 1;\n }\n if (params.allowSlideNext === true) {\n swiper.allowSlideNext = !swiper.isLocked;\n }\n if (params.allowSlidePrev === true) {\n swiper.allowSlidePrev = !swiper.isLocked;\n }\n if (wasLocked && wasLocked !== swiper.isLocked) {\n swiper.isEnd = false;\n }\n if (wasLocked !== swiper.isLocked) {\n swiper.emit(swiper.isLocked ? 'lock' : 'unlock');\n }\n}\nvar checkOverflow$1 = {\n checkOverflow\n};\n\nvar defaults = {\n init: true,\n direction: 'horizontal',\n oneWayMovement: false,\n swiperElementNodeName: 'SWIPER-CONTAINER',\n touchEventsTarget: 'wrapper',\n initialSlide: 0,\n speed: 300,\n cssMode: false,\n updateOnWindowResize: true,\n resizeObserver: true,\n nested: false,\n createElements: false,\n eventsPrefix: 'swiper',\n enabled: true,\n focusableElements: 'input, select, option, textarea, button, video, label',\n // Overrides\n width: null,\n height: null,\n //\n preventInteractionOnTransition: false,\n // ssr\n userAgent: null,\n url: null,\n // To support iOS's swipe-to-go-back gesture (when being used in-app).\n edgeSwipeDetection: false,\n edgeSwipeThreshold: 20,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide',\n // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n\n // Breakpoints\n breakpoints: undefined,\n breakpointsBase: 'window',\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerGroup: 1,\n slidesPerGroupSkip: 0,\n slidesPerGroupAuto: false,\n centeredSlides: false,\n centeredSlidesBounds: false,\n slidesOffsetBefore: 0,\n // in px\n slidesOffsetAfter: 0,\n // in px\n normalizeSlideIndex: true,\n centerInsufficientSlides: false,\n // Disable swiper and hide navigation when container not overflow\n watchOverflow: true,\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n allowTouchMove: true,\n threshold: 5,\n touchMoveStopPropagation: false,\n touchStartPreventDefault: true,\n touchStartForcePreventDefault: false,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Progress\n watchSlidesProgress: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // loop\n loop: false,\n loopAddBlankSlides: true,\n loopAdditionalSlides: 0,\n loopPreventsSliding: true,\n // rewind\n rewind: false,\n // Swiping/no swiping\n allowSlidePrev: true,\n allowSlideNext: true,\n swipeHandler: null,\n // '.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n noSwipingSelector: null,\n // Passive Listeners\n passiveListeners: true,\n maxBackfaceHiddenSlides: 10,\n // NS\n containerModifierClass: 'swiper-',\n // NEW\n slideClass: 'swiper-slide',\n slideBlankClass: 'swiper-slide-blank',\n slideActiveClass: 'swiper-slide-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideFullyVisibleClass: 'swiper-slide-fully-visible',\n slideNextClass: 'swiper-slide-next',\n slidePrevClass: 'swiper-slide-prev',\n wrapperClass: 'swiper-wrapper',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n lazyPreloadPrevNext: 0,\n // Callbacks\n runCallbacksOnInit: true,\n // Internals\n _emitClasses: false\n};\n\nfunction moduleExtendParams(params, allModulesParams) {\n return function extendParams(obj) {\n if (obj === void 0) {\n obj = {};\n }\n const moduleParamName = Object.keys(obj)[0];\n const moduleParams = obj[moduleParamName];\n if (typeof moduleParams !== 'object' || moduleParams === null) {\n extend(allModulesParams, obj);\n return;\n }\n if (params[moduleParamName] === true) {\n params[moduleParamName] = {\n enabled: true\n };\n }\n if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {\n params[moduleParamName].auto = true;\n }\n if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {\n params[moduleParamName].auto = true;\n }\n if (!(moduleParamName in params && 'enabled' in moduleParams)) {\n extend(allModulesParams, obj);\n return;\n }\n if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {\n params[moduleParamName].enabled = true;\n }\n if (!params[moduleParamName]) params[moduleParamName] = {\n enabled: false\n };\n extend(allModulesParams, obj);\n };\n}\n\n/* eslint no-param-reassign: \"off\" */\nconst prototypes = {\n eventsEmitter,\n update,\n translate,\n transition,\n slide,\n loop,\n grabCursor,\n events: events$1,\n breakpoints,\n checkOverflow: checkOverflow$1,\n classes\n};\nconst extendedDefaults = {};\nclass Swiper {\n constructor() {\n let el;\n let params;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {\n params = args[0];\n } else {\n [el, params] = args;\n }\n if (!params) params = {};\n params = extend({}, params);\n if (el && !params.el) params.el = el;\n const document = getDocument();\n if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) {\n const swipers = [];\n document.querySelectorAll(params.el).forEach(containerEl => {\n const newParams = extend({}, params, {\n el: containerEl\n });\n swipers.push(new Swiper(newParams));\n });\n // eslint-disable-next-line no-constructor-return\n return swipers;\n }\n\n // Swiper Instance\n const swiper = this;\n swiper.__swiper__ = true;\n swiper.support = getSupport();\n swiper.device = getDevice({\n userAgent: params.userAgent\n });\n swiper.browser = getBrowser();\n swiper.eventsListeners = {};\n swiper.eventsAnyListeners = [];\n swiper.modules = [...swiper.__modules__];\n if (params.modules && Array.isArray(params.modules)) {\n swiper.modules.push(...params.modules);\n }\n const allModulesParams = {};\n swiper.modules.forEach(mod => {\n mod({\n params,\n swiper,\n extendParams: moduleExtendParams(params, allModulesParams),\n on: swiper.on.bind(swiper),\n once: swiper.once.bind(swiper),\n off: swiper.off.bind(swiper),\n emit: swiper.emit.bind(swiper)\n });\n });\n\n // Extend defaults with modules params\n const swiperParams = extend({}, defaults, allModulesParams);\n\n // Extend defaults with passed params\n swiper.params = extend({}, swiperParams, extendedDefaults, params);\n swiper.originalParams = extend({}, swiper.params);\n swiper.passedParams = extend({}, params);\n\n // add event listeners\n if (swiper.params && swiper.params.on) {\n Object.keys(swiper.params.on).forEach(eventName => {\n swiper.on(eventName, swiper.params.on[eventName]);\n });\n }\n if (swiper.params && swiper.params.onAny) {\n swiper.onAny(swiper.params.onAny);\n }\n\n // Extend Swiper\n Object.assign(swiper, {\n enabled: swiper.params.enabled,\n el,\n // Classes\n classNames: [],\n // Slides\n slides: [],\n slidesGrid: [],\n snapGrid: [],\n slidesSizesGrid: [],\n // isDirection\n isHorizontal() {\n return swiper.params.direction === 'horizontal';\n },\n isVertical() {\n return swiper.params.direction === 'vertical';\n },\n // Indexes\n activeIndex: 0,\n realIndex: 0,\n //\n isBeginning: true,\n isEnd: false,\n // Props\n translate: 0,\n previousTranslate: 0,\n progress: 0,\n velocity: 0,\n animating: false,\n cssOverflowAdjustment() {\n // Returns 0 unless `translate` is > 2**23\n // Should be subtracted from css values to prevent overflow\n return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;\n },\n // Locks\n allowSlideNext: swiper.params.allowSlideNext,\n allowSlidePrev: swiper.params.allowSlidePrev,\n // Touch Events\n touchEventsData: {\n isTouched: undefined,\n isMoved: undefined,\n allowTouchCallbacks: undefined,\n touchStartTime: undefined,\n isScrolling: undefined,\n currentTranslate: undefined,\n startTranslate: undefined,\n allowThresholdMove: undefined,\n // Form elements to match\n focusableElements: swiper.params.focusableElements,\n // Last click time\n lastClickTime: 0,\n clickTimeout: undefined,\n // Velocities\n velocities: [],\n allowMomentumBounce: undefined,\n startMoving: undefined,\n pointerId: null,\n touchId: null\n },\n // Clicks\n allowClick: true,\n // Touches\n allowTouchMove: swiper.params.allowTouchMove,\n touches: {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n },\n // Images\n imagesToLoad: [],\n imagesLoaded: 0\n });\n swiper.emit('_swiper');\n\n // Init\n if (swiper.params.init) {\n swiper.init();\n }\n\n // Return app instance\n // eslint-disable-next-line no-constructor-return\n return swiper;\n }\n getDirectionLabel(property) {\n if (this.isHorizontal()) {\n return property;\n }\n // prettier-ignore\n return {\n 'width': 'height',\n 'margin-top': 'margin-left',\n 'margin-bottom ': 'margin-right',\n 'margin-left': 'margin-top',\n 'margin-right': 'margin-bottom',\n 'padding-left': 'padding-top',\n 'padding-right': 'padding-bottom',\n 'marginRight': 'marginBottom'\n }[property];\n }\n getSlideIndex(slideEl) {\n const {\n slidesEl,\n params\n } = this;\n const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n const firstSlideIndex = elementIndex(slides[0]);\n return elementIndex(slideEl) - firstSlideIndex;\n }\n getSlideIndexByData(index) {\n return this.getSlideIndex(this.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index)[0]);\n }\n recalcSlides() {\n const swiper = this;\n const {\n slidesEl,\n params\n } = swiper;\n swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);\n }\n enable() {\n const swiper = this;\n if (swiper.enabled) return;\n swiper.enabled = true;\n if (swiper.params.grabCursor) {\n swiper.setGrabCursor();\n }\n swiper.emit('enable');\n }\n disable() {\n const swiper = this;\n if (!swiper.enabled) return;\n swiper.enabled = false;\n if (swiper.params.grabCursor) {\n swiper.unsetGrabCursor();\n }\n swiper.emit('disable');\n }\n setProgress(progress, speed) {\n const swiper = this;\n progress = Math.min(Math.max(progress, 0), 1);\n const min = swiper.minTranslate();\n const max = swiper.maxTranslate();\n const current = (max - min) * progress + min;\n swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n emitContainerClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const cls = swiper.el.className.split(' ').filter(className => {\n return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;\n });\n swiper.emit('_containerClasses', cls.join(' '));\n }\n getSlideClasses(slideEl) {\n const swiper = this;\n if (swiper.destroyed) return '';\n return slideEl.className.split(' ').filter(className => {\n return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;\n }).join(' ');\n }\n emitSlidesClasses() {\n const swiper = this;\n if (!swiper.params._emitClasses || !swiper.el) return;\n const updates = [];\n swiper.slides.forEach(slideEl => {\n const classNames = swiper.getSlideClasses(slideEl);\n updates.push({\n slideEl,\n classNames\n });\n swiper.emit('_slideClass', slideEl, classNames);\n });\n swiper.emit('_slideClasses', updates);\n }\n slidesPerViewDynamic(view, exact) {\n if (view === void 0) {\n view = 'current';\n }\n if (exact === void 0) {\n exact = false;\n }\n const swiper = this;\n const {\n params,\n slides,\n slidesGrid,\n slidesSizesGrid,\n size: swiperSize,\n activeIndex\n } = swiper;\n let spv = 1;\n if (typeof params.slidesPerView === 'number') return params.slidesPerView;\n if (params.centeredSlides) {\n let slideSize = slides[activeIndex] ? Math.ceil(slides[activeIndex].swiperSlideSize) : 0;\n let breakLoop;\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n if (slides[i] && !breakLoop) {\n slideSize += Math.ceil(slides[i].swiperSlideSize);\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n if (slides[i] && !breakLoop) {\n slideSize += slides[i].swiperSlideSize;\n spv += 1;\n if (slideSize > swiperSize) breakLoop = true;\n }\n }\n } else {\n // eslint-disable-next-line\n if (view === 'current') {\n for (let i = activeIndex + 1; i < slides.length; i += 1) {\n const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n } else {\n // previous\n for (let i = activeIndex - 1; i >= 0; i -= 1) {\n const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;\n if (slideInView) {\n spv += 1;\n }\n }\n }\n }\n return spv;\n }\n update() {\n const swiper = this;\n if (!swiper || swiper.destroyed) return;\n const {\n snapGrid,\n params\n } = swiper;\n // Breakpoints\n if (params.breakpoints) {\n swiper.setBreakpoint();\n }\n [...swiper.el.querySelectorAll('[loading=\"lazy\"]')].forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n }\n });\n swiper.updateSize();\n swiper.updateSlides();\n swiper.updateProgress();\n swiper.updateSlidesClasses();\n function setTranslate() {\n const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;\n const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());\n swiper.setTranslate(newTranslate);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n let translated;\n if (params.freeMode && params.freeMode.enabled && !params.cssMode) {\n setTranslate();\n if (params.autoHeight) {\n swiper.updateAutoHeight();\n }\n } else {\n if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {\n const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;\n translated = swiper.slideTo(slides.length - 1, 0, false, true);\n } else {\n translated = swiper.slideTo(swiper.activeIndex, 0, false, true);\n }\n if (!translated) {\n setTranslate();\n }\n }\n if (params.watchOverflow && snapGrid !== swiper.snapGrid) {\n swiper.checkOverflow();\n }\n swiper.emit('update');\n }\n changeDirection(newDirection, needUpdate) {\n if (needUpdate === void 0) {\n needUpdate = true;\n }\n const swiper = this;\n const currentDirection = swiper.params.direction;\n if (!newDirection) {\n // eslint-disable-next-line\n newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';\n }\n if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {\n return swiper;\n }\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);\n swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);\n swiper.emitContainerClasses();\n swiper.params.direction = newDirection;\n swiper.slides.forEach(slideEl => {\n if (newDirection === 'vertical') {\n slideEl.style.width = '';\n } else {\n slideEl.style.height = '';\n }\n });\n swiper.emit('changeDirection');\n if (needUpdate) swiper.update();\n return swiper;\n }\n changeLanguageDirection(direction) {\n const swiper = this;\n if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;\n swiper.rtl = direction === 'rtl';\n swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;\n if (swiper.rtl) {\n swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'rtl';\n } else {\n swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);\n swiper.el.dir = 'ltr';\n }\n swiper.update();\n }\n mount(element) {\n const swiper = this;\n if (swiper.mounted) return true;\n\n // Find el\n let el = element || swiper.params.el;\n if (typeof el === 'string') {\n el = document.querySelector(el);\n }\n if (!el) {\n return false;\n }\n el.swiper = swiper;\n if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === swiper.params.swiperElementNodeName.toUpperCase()) {\n swiper.isElement = true;\n }\n const getWrapperSelector = () => {\n return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;\n };\n const getWrapper = () => {\n if (el && el.shadowRoot && el.shadowRoot.querySelector) {\n const res = el.shadowRoot.querySelector(getWrapperSelector());\n // Children needs to return slot items\n return res;\n }\n return elementChildren(el, getWrapperSelector())[0];\n };\n // Find Wrapper\n let wrapperEl = getWrapper();\n if (!wrapperEl && swiper.params.createElements) {\n wrapperEl = createElement('div', swiper.params.wrapperClass);\n el.append(wrapperEl);\n elementChildren(el, `.${swiper.params.slideClass}`).forEach(slideEl => {\n wrapperEl.append(slideEl);\n });\n }\n Object.assign(swiper, {\n el,\n wrapperEl,\n slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,\n hostEl: swiper.isElement ? el.parentNode.host : el,\n mounted: true,\n // RTL\n rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl',\n rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'),\n wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box'\n });\n return true;\n }\n init(el) {\n const swiper = this;\n if (swiper.initialized) return swiper;\n const mounted = swiper.mount(el);\n if (mounted === false) return swiper;\n swiper.emit('beforeInit');\n\n // Set breakpoint\n if (swiper.params.breakpoints) {\n swiper.setBreakpoint();\n }\n\n // Add Classes\n swiper.addClasses();\n\n // Update size\n swiper.updateSize();\n\n // Update slides\n swiper.updateSlides();\n if (swiper.params.watchOverflow) {\n swiper.checkOverflow();\n }\n\n // Set Grab Cursor\n if (swiper.params.grabCursor && swiper.enabled) {\n swiper.setGrabCursor();\n }\n\n // Slide To Initial Slide\n if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {\n swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);\n } else {\n swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);\n }\n\n // Create loop\n if (swiper.params.loop) {\n swiper.loopCreate();\n }\n\n // Attach events\n swiper.attachEvents();\n const lazyElements = [...swiper.el.querySelectorAll('[loading=\"lazy\"]')];\n if (swiper.isElement) {\n lazyElements.push(...swiper.hostEl.querySelectorAll('[loading=\"lazy\"]'));\n }\n lazyElements.forEach(imageEl => {\n if (imageEl.complete) {\n processLazyPreloader(swiper, imageEl);\n } else {\n imageEl.addEventListener('load', e => {\n processLazyPreloader(swiper, e.target);\n });\n }\n });\n preload(swiper);\n\n // Init Flag\n swiper.initialized = true;\n preload(swiper);\n\n // Emit\n swiper.emit('init');\n swiper.emit('afterInit');\n return swiper;\n }\n destroy(deleteInstance, cleanStyles) {\n if (deleteInstance === void 0) {\n deleteInstance = true;\n }\n if (cleanStyles === void 0) {\n cleanStyles = true;\n }\n const swiper = this;\n const {\n params,\n el,\n wrapperEl,\n slides\n } = swiper;\n if (typeof swiper.params === 'undefined' || swiper.destroyed) {\n return null;\n }\n swiper.emit('beforeDestroy');\n\n // Init Flag\n swiper.initialized = false;\n\n // Detach events\n swiper.detachEvents();\n\n // Destroy loop\n if (params.loop) {\n swiper.loopDestroy();\n }\n\n // Cleanup styles\n if (cleanStyles) {\n swiper.removeClasses();\n el.removeAttribute('style');\n wrapperEl.removeAttribute('style');\n if (slides && slides.length) {\n slides.forEach(slideEl => {\n slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);\n slideEl.removeAttribute('style');\n slideEl.removeAttribute('data-swiper-slide-index');\n });\n }\n }\n swiper.emit('destroy');\n\n // Detach emitter events\n Object.keys(swiper.eventsListeners).forEach(eventName => {\n swiper.off(eventName);\n });\n if (deleteInstance !== false) {\n swiper.el.swiper = null;\n deleteProps(swiper);\n }\n swiper.destroyed = true;\n return null;\n }\n static extendDefaults(newDefaults) {\n extend(extendedDefaults, newDefaults);\n }\n static get extendedDefaults() {\n return extendedDefaults;\n }\n static get defaults() {\n return defaults;\n }\n static installModule(mod) {\n if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];\n const modules = Swiper.prototype.__modules__;\n if (typeof mod === 'function' && modules.indexOf(mod) < 0) {\n modules.push(mod);\n }\n }\n static use(module) {\n if (Array.isArray(module)) {\n module.forEach(m => Swiper.installModule(m));\n return Swiper;\n }\n Swiper.installModule(module);\n return Swiper;\n }\n}\nObject.keys(prototypes).forEach(prototypeGroup => {\n Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {\n Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];\n });\n});\nSwiper.use([Resize, Observer]);\n\nexport { Swiper as S, defaults as d };\n","/**\n * Swiper 11.0.7\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2024 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: February 27, 2024\n */\n\nexport { S as Swiper, S as default } from './shared/swiper-core.mjs';\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"@actions/core\");\nconst github_1 = require(\"@actions/github\");\nconst destinations_1 = require(\"./destinations\");\nconst fetch_alerts_1 = require(\"./fetch-alerts\");\nasync function run() {\n try {\n const token = (0, core_1.getInput)('token');\n const microsoftTeamsWebhookUrl = (0, core_1.getInput)('microsoft_teams_webhook');\n const slackWebhookUrl = (0, core_1.getInput)('slack_webhook');\n const pagerDutyIntegrationKey = (0, core_1.getInput)('pager_duty_integration_key');\n const zenDutyApiKey = (0, core_1.getInput)('zenduty_api_key');\n const zenDutyServiceId = (0, core_1.getInput)('zenduty_service_id');\n const zenDutyEscalationPolicyId = (0, core_1.getInput)('zenduty_escalation_policy_id');\n const emailFrom = (0, core_1.getInput)('email_from');\n const emailList = (0, core_1.getInput)('email_list');\n const emailSubject = (0, core_1.getInput)('email_subject');\n const emailTransportSmtpHost = (0, core_1.getInput)('email_transport_smtp_host');\n const emailTransportSmtpPort = parseInt((0, core_1.getInput)('email_transport_smtp_port'));\n const emailTransportSmtpUser = (0, core_1.getInput)('email_transport_smtp_user');\n const emailTransportSmtpPassword = (0, core_1.getInput)('email_transport_smtp_password');\n const count = parseInt((0, core_1.getInput)('count'));\n const severity = (0, core_1.getInput)('severity');\n const { owner } = github_1.context.repo;\n const { repo } = github_1.context.repo;\n const alerts = await (0, fetch_alerts_1.fetchAlerts)(token, repo, owner, severity, count);\n if (alerts.length > 0) {\n if (microsoftTeamsWebhookUrl) {\n await (0, destinations_1.sendAlertsToMicrosoftTeams)(microsoftTeamsWebhookUrl, alerts);\n }\n if (slackWebhookUrl) {\n if (!(0, destinations_1.validateSlackWebhookUrl)(slackWebhookUrl)) {\n (0, core_1.setFailed)(new Error('Invalid Slack Webhook URL'));\n }\n else {\n await (0, destinations_1.sendAlertsToSlack)(slackWebhookUrl, alerts);\n }\n }\n if (pagerDutyIntegrationKey) {\n await (0, destinations_1.sendAlertsToPagerDuty)(pagerDutyIntegrationKey, alerts);\n }\n if (zenDutyApiKey) {\n if (zenDutyServiceId && zenDutyEscalationPolicyId) {\n await (0, destinations_1.sendAlertsToZenduty)(zenDutyApiKey, zenDutyServiceId, zenDutyEscalationPolicyId, alerts);\n }\n else {\n (0, core_1.setFailed)(new Error('Check your Zenduty Service ID and Escalation Policy ID'));\n }\n }\n if (emailFrom && emailList) {\n const emailWikiLink = 'https://github.com/kunalnagarco/action-cve/wiki/Send-alerts-to-email';\n if (emailTransportSmtpUser && emailTransportSmtpPassword) {\n const emailTransportSmtpConfig = {\n host: emailTransportSmtpHost,\n port: emailTransportSmtpPort,\n secure: emailTransportSmtpPort === 465 && true,\n auth: {\n user: emailTransportSmtpUser,\n pass: emailTransportSmtpPassword,\n },\n };\n (0, destinations_1.sendAlertsToEmailSmtp)(emailTransportSmtpConfig, alerts, emailList, emailFrom, emailSubject);\n }\n else {\n (0, core_1.setFailed)(new Error(`Invalid SMTP config. Please check the wiki for more info: ${emailWikiLink}`));\n }\n }\n }\n }\n catch (err) {\n if (err instanceof Error) {\n (0, core_1.setFailed)(err);\n }\n }\n}\nrun();\n//# sourceMappingURL=main.js.map"],"names":[],"sourceRoot":""} \ No newline at end of file